From 9f8e628ff905820a8f81b47dfa6b8f15163f5e0b Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Tue, 31 Oct 2017 18:54:36 +0900 Subject: Enable audio management with Sound Manager automatically Originally, configuration.xml(Audio policy file for Sound Manager) must be replaced manually to use Sound Manager. And /etc/pulse/default.pa file must be modified not to load module router manually for now. The module-router couldn't coexist with soundmanager for now. (In the future, coexist for supporting legacy apps) This patch enables Audio Management system based on Sound Manager and Genivi Audio Manager automatically. [Patch Set3] - Remove bbappend - Override pulseaudio-config - Override audiomanager-plugins-config - Add PREFERRED_PROVIDER to the packagegroup-hmi-framework.bb [Patch Set6] - Remove recipes related to soundmanager from hmi-framework - Create a new feature as agl-audio-soundmanager-framework [Patch Set7] - Use PROVIDES instead of RPROVIDES Bug-AGL: SPEC-1025, SPEC-1026, SPEC-1027 Change-Id: I26e484e130feac2bedc13839110a6208579b8bbc Signed-off-by: Kazumasa Mitsunari --- .../amcp_dbus.conf | 20 + .../amrp_dbus.conf | 21 + .../configuration.xml | 516 +++++++++++++++++++++ .../customtypes.xsd | 63 +++ .../soundmanager-dbus.conf | 18 + ...audiomanager-plugins-config-soundmanager_7.4.bb | 40 ++ 6 files changed, 678 insertions(+) create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/amcp_dbus.conf create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/amrp_dbus.conf create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/configuration.xml create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/customtypes.xsd create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/soundmanager-dbus.conf create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager_7.4.bb (limited to 'meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager') diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/amcp_dbus.conf b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/amcp_dbus.conf new file mode 100644 index 00000000..49544d5e --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/amcp_dbus.conf @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/amrp_dbus.conf b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/amrp_dbus.conf new file mode 100644 index 00000000..6832d305 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/amrp_dbus.conf @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/configuration.xml b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/configuration.xml new file mode 100644 index 00000000..3dc69c12 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/configuration.xml @@ -0,0 +1,516 @@ + + + + + 0 + UNKNOWN + SourceTemplate + 0 + TRUE + UNKNOWN + SS_OFF + CF_GENIVI_STEREO + CF_GENIVI_MONO + IS_OFF + + A_AVAILABLE + AR_UNKNOWN + + + SP_GENIVI_TREBLE + 5 + + + SP_GENIVI_MID + 5 + + + SP_GENIVI_BASS + 5 + + + MSP_GENIVI_TREBLE + 5 + + + MSP_GENIVI_MID + 5 + + + MSP_GENIVI_BASS + 5 + + REG_TEMPLATE + TRUE + 1 + + MSP_UNKNOWN,SP_UNKNOWN + MSP_GENIVI_TREBLE,SP_GENIVI_TREBLE + + + + 0 + SoundManager + mediaplayer + BASE + REG_ROUTER + + + 2 + SoundManager + ALSA#Playback + BASE + REG_ROUTER + + + 3 + SoundManager + music + BASE + REG_ROUTER + + + 4 + SoundManager + Navi + INT + REG_ROUTER + + + 5 + SoundManager + phone + PHONE + REG_ROUTER + + + 0 + SoundManager + radio + BASE + REG_ROUTER + + + + + 0 + UNKNOWN + SinkTemplate + 0 + TRUE + 100 + BASE + MS_UNMUTED + CF_GENIVI_STEREO + CF_GENIVI_MONO + + A_AVAILABLE + AR_GENIVI_NEWMEDIA + + + SP_GENIVI_TREBLE + 5 + + + SP_GENIVI_MID + 5 + + + SP_GENIVI_BASS + 5 + + + MSP_GENIVI_TREBLE + 5 + + + MSP_GENIVI_MID + 5 + + + MSP_GENIVI_BASS + 5 + + REG_TEMPLATE + TRUE + 1 + + 0,0.0 + 1,0.01 + 2,0.02 + 3,0.03 + 4,0.04 + 5,0.05 + 6,0.06 + 7,0.07 + 8,0.08 + 9,0.09 + 10,0.1 + 11,0.11 + 12,0.12 + 14,0.14 + 15,0.15 + 17,0.17 + 20,0.2 + 22,0.22 + 25,0.25 + 28,0.28 + 31,0.31 + 35,0.35 + 40,0.4 + 45,0.45 + 50,0.5 + 56,0.56 + 62,0.62 + 70,0.7 + 80,0.8 + 90,0.9 + 100,1.0 + + + 0.0,-192.0 + 0.01,-40.0 + 0.02,-34.0 + 0.03,-30.0 + 0.04,-27.0 + 0.05,-26.0 + 0.06,-24.0 + 0.07,-23.0 + 0.08,-22.0 + 0.09,-21.0 + 0.1,-20.0 + 0.11,-19.0 + 0.12,-18.0 + 0.14,-17.0 + 0.15,-16.0 + 0.17,-15.0 + 0.2,-14.0 + 0.22,-13.0 + 0.25,-12.0 + 0.28,-11.0 + 0.31,-10.0 + 0.35,-9.0 + 0.4,-8.0 + 0.45,-7.0 + 0.5,-6.0 + 0.56,-5.0 + 0.62,-4.0 + 0.7,-3.0 + 0.8,-2.0 + 0.9,-1.0 + 1.0,0.0 + + + MSP_UNKNOWN,SP_UNKNOWN + MSP_GENIVI_TREBLE,SP_GENIVI_TREBLE + + + + 1 + SoundManager + rsnd-dai.0-ak4642-hifi#Analog#Stereo + BASE + REG_CONTROLLER + + + 2 + SoundManager + Microchip#MOST:0#Multichannel + BASE + REG_CONTROLLER + + + + + + + + 0 + SoundManager + org.genivi.audiomanager + SoundManager + FALSE + TRUE + DS_CONTROLLED + REG_ROUTER + + + + + BASE + C_PLAYBACK + 1 + Microchip#MOST:0#Multichannel^rsnd-dai.0-ak4642-hifi#Analog#Stereo=mediaplayer^music^ALSA#Playback^radio + + + INT + C_PLAYBACK + 2 + Microchip#MOST:0#Multichannel^rsnd-dai.0-ak4642-hifi#Analog#Stereo=Navi + + + PHONE + C_PLAYBACK + 3 + Microchip#MOST:0#Multichannel^rsnd-dai.0-ak4642-hifi#Analog#Stereo=phone + + + + + + + USER_CONNECTION_REQUEST + + name(CLASS, REQUESTING) EQ "BASE" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + + ACTION_DISCONNECT + + "BASE" + CS_CONNECTED + + + + + + + USER_CONNECTION_REQUEST + + name(CLASS, REQUESTING) EQ "INT" + + ACTION_LIMIT + + "BASE" + -1000 + 01 + + + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + priority(CONNECTIONOFCLASS, REQUESTING, OTHERS) LT priority(CONNECTION, REQUESTING) + + ACTION_PUSH + + "INT" + O_NEWEST + + + TRUE + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + + ACTION_PUSH + + "INT" + O_OLDEST + + + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, "PHONE") INC CS_CONNECTED + + ACTION_MUTE + + REQUESTING + + + + ACTION_CONNECT + + REQUESTING + + + TRUE + + + + + USER_CONNECTION_REQUEST + + name(CLASS, REQUESTING) EQ "PHONE" + + ACTION_LIMIT + + "BASE" + -1000 + 02 + + + + + name(CLASS, REQUESTING) EQ "PHONE" + connectionState(CONNECTIONOFCLASS, "INT") INC CS_CONNECTED + + ACTION_MUTE + + "INT" + + + + + name(SINK, REQUESTING) EQ "AMP" + + ACTION_CONNECT + + REQUESTING + 5000 + + + TRUE + + + + + + USER_DISCONNECTION_REQUEST + + + ACTION_DISCONNECT + + REQUESTING + REQUESTING + + + + + name(CLASS, REQUESTING) EQ "INT" + + ACTION_UNLIMIT + + "BASE" + 01 + + + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + + ACTION_POP + + "INT" + O_OLDEST + + + + + name(CLASS, REQUESTING) EQ "PHONE" + connectionState(CONNECTIONOFCLASS, "INT") INC CS_CONNECTED + + ACTION_UNMUTE + + "INT" + + + + + name(CLASS, REQUESTING) EQ "PHONE" + + ACTION_UNLIMIT + + "BASE" + 02 + + + + + name(CLASS, REQUESTING) EQ "BASE" + connectionState(CONNECTIONOFCLASS, "BASE") INC CS_SUSPENDED + + ACTION_RESUME + + "BASE" + CS_SUSPENDED + + + + + + + USER_SET_VOLUME + + + ACTION_SET_VOLUME + + REQUESTING + + + + + + + + USER_SET_SINK_MUTE_STATE + + muteState(USER,REQUESTING) EQ MS_MUTED + + ACTION_MUTE + + REQUESTING + + + + + muteState(USER,REQUESTING) EQ MS_UNMUTED + + ACTION_UNMUTE + + REQUESTING + + + + + + + + USER_SET_SINK_MAIN_SOUND_PROPERTY + + + ACTION_SET_PROPERTY + + REQUESTING + + + + + + + + USER_SET_SOURCE_MAIN_SOUND_PROPERTY + + + ACTION_SET_PROPERTY + + REQUESTING + + + + + + + + USER_CONNECTION_REQUEST + + + ACTION_CONNECT + + REQUESTING + 5000 + + + + + + + + + SYP_DEBUG_LOG + 5 + + + diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/customtypes.xsd b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/customtypes.xsd new file mode 100644 index 00000000..2604fb71 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/customtypes.xsd @@ -0,0 +1,63 @@ + + + + + This enumeration list the source/sink availability change reason. + + + + + + + This enumeration list the source and sink sound property. The sound properties of Genivi Audio manager can be extended to include project specific properties. Three sound properties like volume persistence, connection persistence and volume support are extended. + + + + + + + This enumeration lists the connection format for the source and sinks. + + + + + + + This enumeration contains the type of notification possible. + + + + + + + This enumeration lists the system properties. + + + + + 1 + + + + + + + + + + + + This enumeration lists the Main Properties for source and sinks. + + + + + + + + + + + + + diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/soundmanager-dbus.conf b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/soundmanager-dbus.conf new file mode 100644 index 00000000..cacb60e9 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager/soundmanager-dbus.conf @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager_7.4.bb b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager_7.4.bb new file mode 100644 index 00000000..6c3bf26e --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config-soundmanager/audiomanager-plugins-config-soundmanager_7.4.bb @@ -0,0 +1,40 @@ +DESCRIPTION = "Configurations for Audiomanager Plugins with Sound Manager" +HOMEPAGE = "" +LICENSE = "MPLv2" +SECTION = "multimedia" + +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" +RDEPENDS_${PN} = "libxml2 zlib dbus-lib" + +SRC_URI = " \ + file://amcp_dbus.conf \ + file://amrp_dbus.conf \ + file://configuration.xml \ + file://customtypes.xsd \ + file://soundmanager-dbus.conf \ +" + +FILES_${PN} = " \ + ${sysconfdir}/dbus-1/system.d/amcp_dbus.conf \ + ${sysconfdir}/dbus-1/system.d/amrp_dbus.conf \ + ${sysconfdir}/dbus-1/system.d/soundmanager-dbus.conf \ + ${sysconfdir}/audiomanager/control/configuration.xml \ + ${sysconfdir}/audiomanager/control/customtypes.xsd \ +" + +FILES_${PN}-dbg += " \ + /usr/lib/audiomanager/command/.debug \ + /usr/lib/audiomanager/routing/.debug \ +" + +do_install() { + install -d ${D}${sysconfdir}/dbus-1/system.d + install -m 644 ${WORKDIR}/amcp_dbus.conf ${D}${sysconfdir}/dbus-1/system.d/ + install -m 644 ${WORKDIR}/amrp_dbus.conf ${D}${sysconfdir}/dbus-1/system.d/ + install -m 644 ${WORKDIR}/soundmanager-dbus.conf ${D}${sysconfdir}/dbus-1/system.d/ + install -d ${D}${sysconfdir}/audiomanager/control + install -m 644 ${WORKDIR}/configuration.xml ${D}${sysconfdir}/audiomanager/control/ + install -m 644 ${WORKDIR}/customtypes.xsd ${D}${sysconfdir}/audiomanager/control/ +} + +PROVIDES_${PN} += "virtual/audiomanager-plugins-config" -- cgit 1.2.3-korg