summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--ahl-binding/ahl-binding.c26
-rw-r--r--ahl-binding/ahl-deviceenum.c4
-rw-r--r--ahl-binding/ahl-json.c2
-rw-r--r--ahl-policy/CMakeLists.txt5
-rw-r--r--ahl-policy/ahl-policy.c101
-rw-r--r--ahl-policy/ahl-policy.h4
-rw-r--r--conf.d/cmake/config.cmake4
-rw-r--r--conf.d/project/.asoundrc (renamed from conf.d/project/.asoundrc-audiok)105
-rw-r--r--conf.d/project/ahl-aaaa-config.json (renamed from conf.d/project/ahl-audiok4a-config.json)6
-rw-r--r--conf.d/project/ahl-fulup4a-config.json5
11 files changed, 192 insertions, 76 deletions
diff --git a/README.md b/README.md
index 046c2e7..f9b55ed 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,11 @@
```
# Initial clone with submodules
-git clone https://github.com/Audiokinetic-Automotive/afb-audiohighlevel.git
+git clone --recurse-submodules https://github.com/Audiokinetic-Automotive/afb-audiohighlevel.git
+cd audio-binding
+
+# Do not forget submodules with pulling
+git pull --recurse-submodules https://github.com/Audiokinetic-Automotive/afb-audiohighlevel.git
```
diff --git a/ahl-binding/ahl-binding.c b/ahl-binding/ahl-binding.c
index c205c8e..0b2348a 100644
--- a/ahl-binding/ahl-binding.c
+++ b/ahl-binding/ahl-binding.c
@@ -867,12 +867,19 @@ PUBLIC void audiohlapi_volume(struct afb_req req)
json_object *paramJ= json_object_new_string(volumeStr);
json_object_object_add(pPolicyEndpointJ, "arg_volume", paramJ);
- int policyAllowed = Policy_SetVolume(pPolicyEndpointJ);
+ json_object * pPolicyVolumeReply = NULL;
+ int policyAllowed = Policy_SetVolume(pPolicyEndpointJ,&pPolicyVolumeReply);
if (!policyAllowed)
{
afb_req_fail(req, "Audio policy violation", "Set volume not allowed in current context");
return;
}
+
+ err = wrap_json_unpack(pPolicyVolumeReply,"{s:i}","volume",&pEndpointInfo->iVolume);
+ if (err) {
+ afb_req_fail_f(req, "Invalid policy reply", "Policy volume change reply not a valid json object=%s", json_object_get_string(pPolicyVolumeReply));
+ return;
+ }
#else
// Simulate that policy returns target state (accepted)
pEndpointInfo->iVolume = atoi(volumeStr);
@@ -951,15 +958,28 @@ PUBLIC void audiohlapi_property(struct afb_req req)
json_object_object_add(pPolicyEndpointJ, "arg_property_value", propValueJ);
// Call policy to allow custom policy actions in current context
- int policyAllowed = Policy_SetProperty(pPolicyEndpointJ);
+ json_object * pPropertyReply = NULL;
+ int policyAllowed = Policy_SetProperty(pPolicyEndpointJ,&pPropertyReply);
if (!policyAllowed)
{
afb_req_fail(req, "Audio policy violation", "Set endpoint property not allowed in current context");
return;
}
+
+ json_object * pPropReplyValue = NULL;
+ err = wrap_json_unpack(pPropertyReply,"{s:o}","value",&pPropReplyValue);
+ if (err) {
+ afb_req_fail_f(req, "Invalid policy reply", "Policy property change reply not a valid json object=%s", json_object_get_string(pPropertyReply));
+ return;
+ }
+ if (pEndpointInfo->pPropTable && pPropReplyValue) {
+ json_object_get(pPropReplyValue);
+ g_hash_table_insert(pEndpointInfo->pPropTable, propertyName, pPropReplyValue);
+ }
#else
// Simulate that policy returns target state (accepted)
- if (pEndpointInfo->pPropTable)
+ if (pEndpointInfo->pPropTable && propValueJ)
+ json_object_get(propValueJ);
g_hash_table_insert(pEndpointInfo->pPropTable, propertyName, propValueJ);
#endif
}
diff --git a/ahl-binding/ahl-deviceenum.c b/ahl-binding/ahl-deviceenum.c
index 763b2ca..f672417 100644
--- a/ahl-binding/ahl-deviceenum.c
+++ b/ahl-binding/ahl-deviceenum.c
@@ -43,14 +43,14 @@ static int SeparateDomainFromDeviceURI( char * in_pDeviceURI, char ** out_pDomai
if (*out_pDomain == NULL)
{
AFB_ERROR("Error tokenizing device URI -> %s",in_pDeviceURI);
- return 1;
+ return AHL_FAIL;
}
// TODO: Validate domain is known string (e.g. ALSA,Pulse,GStreamer)
*out_pDevice = strtok(NULL, ".");
if (*out_pDevice == NULL)
{
AFB_ERROR("Error tokenizing device URI -> %s",in_pDeviceURI);
- return 1;
+ return AHL_FAIL;
}
return AHL_SUCCESS;
}
diff --git a/ahl-binding/ahl-json.c b/ahl-binding/ahl-json.c
index 5e8bf97..b711b43 100644
--- a/ahl-binding/ahl-json.c
+++ b/ahl-binding/ahl-json.c
@@ -279,7 +279,7 @@ void JSONPublicPackageEndpoint(EndpointInfoT * pEndpointInfo,json_object **endpo
json_object *pPropTableJ = NULL;
EndpointPropTableToJSON(pEndpointInfo->pPropTable,&pPropTableJ);
- json_object_object_add(*endpointInfoJ,"properties",pPropTableJ);
+ json_object_object_add(*endpointInfoJ,"property_table",pPropTableJ);
}
// Package only information that can useful to application clients when opening a stream
diff --git a/ahl-policy/CMakeLists.txt b/ahl-policy/CMakeLists.txt
index aa3ab9c..346669d 100644
--- a/ahl-policy/CMakeLists.txt
+++ b/ahl-policy/CMakeLists.txt
@@ -23,6 +23,11 @@ PROJECT_TARGET_ADD(ahl-policy)
# Define project Targets
ADD_LIBRARY(${TARGET_NAME} STATIC ahl-policy.c)
+
+ if($ENV{AK_DEMO})
+ add_definitions(-DAK_POLICY_DEMO)
+ endif()
+
# Define target includes
TARGET_INCLUDE_DIRECTORIES(${TARGET_NAME}
PUBLIC ${GLIB_PKG_INCLUDE_DIRS}
diff --git a/ahl-policy/ahl-policy.c b/ahl-policy/ahl-policy.c
index a7a5a3b..78e99ae 100644
--- a/ahl-policy/ahl-policy.c
+++ b/ahl-policy/ahl-policy.c
@@ -27,7 +27,8 @@
#ifndef AHL_DISCONNECT_POLICY
-//#define AK_POLICY_DEMO //For Audiokinetic demo only
+#define VOLUME_SUFFIX "_Volume"
+#define VOLUME_RAMP_SUFFIX "_Ramp"
typedef struct StreamPolicyInfo {
streamID_t streamID;
@@ -137,7 +138,7 @@ static int getStreamConfig(char *pAudioRole, StreamConfigT *pStreamConfig)
return POLICY_SUCCESS;
}
-static int PolicySetVolume(int iEndpointID, int iEndpointType, char *pHalApiName, char *AudioRole, DeviceURITypeT deviceType, int iVolume, bool bMute)
+static int PolicySetVolume(int iEndpointID, int iEndpointType, char *pHalApiName, char *AudioRole, DeviceURITypeT deviceType, int iVolume, bool bRamp, bool bRaiseEvent)
{
if(pHalApiName == NULL || (strcasecmp(pHalApiName, AHL_POLICY_UNDEFINED_HALNAME) == 0))
{
@@ -163,15 +164,13 @@ static int PolicySetVolume(int iEndpointID, int iEndpointType, char *pHalApiName
case DEVICEURITYPE_ALSA_PLUG:
case DEVICEURITYPE_ALSA_SOFTVOL:
gsHALControlName = g_string_new(AudioRole);
- if(bMute == false)
+ if(bRamp)
{
- AFB_DEBUG("Using ramp");
- g_string_append(gsHALControlName,"_Ramp");
+ g_string_append(gsHALControlName,VOLUME_RAMP_SUFFIX);
}
else
{
- AFB_DEBUG("Not using ramp");
- g_string_append(gsHALControlName,"_Vol"); // no ramping
+ g_string_append(gsHALControlName,VOLUME_SUFFIX); // no ramping
}
break;
default:
@@ -203,7 +202,7 @@ static int PolicySetVolume(int iEndpointID, int iEndpointType, char *pHalApiName
}
AFB_DEBUG("HAL ctlset response=%s", json_object_to_json_string(j_response));
- if (bMute == false) {
+ if (bRaiseEvent) {
// Package event data
json_object * eventDataJ = NULL;
err = wrap_json_pack(&eventDataJ,"{s:s,s:i,s:i,s:i,s:s}","event_name", AHL_ENDPOINT_VOLUME_EVENT,"endpoint_id", iEndpointID, "endpoint_type", iEndpointType,"value",iVolume, "audio_role", AudioRole);
@@ -234,7 +233,7 @@ static int PolicyGetVolume(int iEndpointID, int iEndpointType, char *pHalApiName
case DEVICEURITYPE_ALSA_PLUG:
case DEVICEURITYPE_ALSA_SOFTVOL:
gsHALControlName = g_string_new(AudioRole);
- g_string_append(gsHALControlName,"_Vol"); // Return target value
+ g_string_append(gsHALControlName,VOLUME_SUFFIX); // Return target value
break;
default:
// Set volume to zero for display purpose only.
@@ -404,7 +403,7 @@ static int PolicyRunningIdleTransition(EndPointPolicyInfoT *pCurrEndPointPolicy,
g_array_remove_index(pCurrEndPointPolicy->streamInfo, i);
if(pCurrEndPointPolicy->streamInfo->len > 0) //need to unduck
{
- //check the last element(Akways highest priority)
+ //check the last element (always highest priority)
StreamPolicyInfoT HighPriorityStreamInfo = g_array_index(pCurrEndPointPolicy->streamInfo,StreamPolicyInfoT,pCurrEndPointPolicy->streamInfo->len-1);
switch(currentPolicyStreamInfo.interruptBehavior)
{
@@ -416,7 +415,8 @@ static int PolicyRunningIdleTransition(EndPointPolicyInfoT *pCurrEndPointPolicy,
HighPriorityStreamInfo.pAudioRole,
pCurrEndPointPolicy->deviceType,
HighPriorityStreamInfo.iDuckVolume,
- false);
+ true, // ramp volume
+ true);// raise event
if(err)
{
return POLICY_FAIL;
@@ -424,7 +424,20 @@ static int PolicyRunningIdleTransition(EndPointPolicyInfoT *pCurrEndPointPolicy,
return POLICY_SUCCESS;
case INTERRUPTBEHAVIOR_PAUSE:
- PolicyPostStateEvent(HighPriorityStreamInfo.streamID,STREAM_EVENT_RESUME);
+ PolicyPostStateEvent(HighPriorityStreamInfo.streamID,STREAM_EVENT_RESUME);
+ // unmute stream (safety net for legacy streams)
+ err = PolicySetVolume(pCurrEndPointPolicy->endpointID,
+ pCurrEndPointPolicy->type,
+ pCurrEndPointPolicy->pHalApiName,
+ HighPriorityStreamInfo.pAudioRole,
+ pCurrEndPointPolicy->deviceType,
+ pCurrEndPointPolicy->iVolume, // restore volume
+ false, // ramp volume
+ false);// raise event
+ if(err)
+ {
+ return POLICY_FAIL;
+ }
return POLICY_SUCCESS;
case INTERRUPTBEHAVIOR_CANCEL:
PolicyPostStateEvent(HighPriorityStreamInfo.streamID,STREAM_EVENT_START);
@@ -463,7 +476,7 @@ static int PolicyIdleRunningTransition(EndPointPolicyInfoT *pCurrEndPointPolicy,
{
case INTERRUPTBEHAVIOR_CONTINUE:
//Save the current Volume and set the docking volume
- pCurrentActiveStreamInfo->iDuckVolume = pStreamInfo->endpoint.iVolume;
+ pCurrentActiveStreamInfo->iDuckVolume = pCurrEndPointPolicy->iVolume;
StreamConfigT StreamConfig;
err = getStreamConfig(pStreamInfo->pRoleName, &StreamConfig);
if(err == POLICY_FAIL)
@@ -477,15 +490,30 @@ static int PolicyIdleRunningTransition(EndPointPolicyInfoT *pCurrEndPointPolicy,
pCurrentActiveStreamInfo->pAudioRole,
pCurrEndPointPolicy->deviceType,
StreamConfig.iVolumeDuckValue,
- false);
+ true, // volume ramp
+ true); // raise event
if(err)
{
- AFB_ERROR("Set Volume return with errorcode%i for streamID: %i and Hal:%s", err, pCurrentActiveStreamInfo->streamID, pCurrEndPointPolicy->pHalApiName);
+ AFB_ERROR("Set volume return with errorcode %i for streamID: %i and Hal:%s", err, pCurrentActiveStreamInfo->streamID, pCurrEndPointPolicy->pHalApiName);
return POLICY_FAIL;
}
break;
case INTERRUPTBEHAVIOR_PAUSE:
- PolicyPostStateEvent(pCurrentActiveStreamInfo->streamID,STREAM_EVENT_PAUSE);
+ PolicyPostStateEvent(pCurrentActiveStreamInfo->streamID,STREAM_EVENT_PAUSE);
+ // mute stream as a safety net for legacy streams
+ err = PolicySetVolume(pCurrEndPointPolicy->endpointID,
+ pCurrEndPointPolicy->type,
+ pCurrEndPointPolicy->pHalApiName,
+ pCurrentActiveStreamInfo->pAudioRole,
+ pCurrEndPointPolicy->deviceType,
+ 0, // mute volume
+ false, // volume ramp
+ false); // raise event
+ if(err)
+ {
+ AFB_ERROR("Set volume return with errorcode %i for streamID: %i and Hal:%s", err, pCurrentActiveStreamInfo->streamID, pCurrEndPointPolicy->pHalApiName);
+ return POLICY_FAIL;
+ }
break;
case INTERRUPTBEHAVIOR_CANCEL:
PolicyPostStateEvent(pCurrentActiveStreamInfo->streamID,STREAM_EVENT_STOP);
@@ -536,7 +564,8 @@ static void PolicySpeedModify(int speed)
pCurStream->pAudioRole,
pCurEndpoint->deviceType,
volume,
- false);
+ true, // volume ramp
+ true); // raise event
}
}
}
@@ -796,7 +825,8 @@ int Policy_SetStreamMute(json_object *pStreamJ)
Stream.pRoleName,
Stream.endpoint.deviceURIType,
0, // mute volume
- true); // no ramp and no volume event
+ false, // no volume ramp
+ false); // no volume event
if(err)
{
AFB_ERROR("StreamID:%i Set Volume return with errorcode%i",Stream.streamID, err);
@@ -812,7 +842,8 @@ int Policy_SetStreamMute(json_object *pStreamJ)
Stream.pRoleName,
Stream.endpoint.deviceURIType,
Stream.endpoint.iVolume, // restore volume
- true); // no ramp and no volume event
+ false, // no volume ramp
+ false); // no volume event
if(err)
{
AFB_ERROR("Endpoint:%i Set Volume return with errorcode%i",Stream.streamID, err);
@@ -825,7 +856,7 @@ int Policy_SetStreamMute(json_object *pStreamJ)
return AHL_POLICY_ACCEPT;
}
-int Policy_SetVolume(json_object *pEndpointJ)
+int Policy_SetVolume(json_object *pEndpointJ,json_object ** ppVolumeReply)
{
char *volumeStr = NULL;
EndPointInterfaceInfoT Endpoint;
@@ -853,17 +884,24 @@ int Policy_SetVolume(json_object *pEndpointJ)
Endpoint.pRoleName,
Endpoint.deviceURIType,
vol,
- false); // Volume ramp and send events
+ true, // volume ramp
+ true); // send events (to be forwarded to application clients)
if (err)
{
AFB_ERROR("Set Volume return with errorcode %i", err);
return AHL_POLICY_REJECT;
}
+ err = wrap_json_pack(ppVolumeReply,"{s:i}","volume",vol);
+ if (err)
+ {
+ return AHL_POLICY_REJECT;
+ }
+
return AHL_POLICY_ACCEPT;
}
-int Policy_SetProperty(json_object *pEndpointJ)
+int Policy_SetProperty(json_object *pEndpointJ,json_object ** ppPropertyReply)
{
char *propertyName = NULL;
EndPointInterfaceInfoT Endpoint;
@@ -889,7 +927,7 @@ int Policy_SetProperty(json_object *pEndpointJ)
json_type currentTypeJ = json_object_get_type(propValueJ);
json_object *propArray = NULL;
- if(!json_object_object_get_ex(pEndpointJ, "properties", &propArray))
+ if(!json_object_object_get_ex(pEndpointJ, "property_table", &propArray))
{
return AHL_POLICY_REJECT;
}
@@ -910,11 +948,13 @@ int Policy_SetProperty(json_object *pEndpointJ)
if(strcasecmp(propElementName,propertyName)==0)
{
json_object *propElementValueJ=NULL;
- if(!json_object_object_get_ex(propElementJ, "property_value", &propElementValueJ))
+ AFB_NOTICE("property element =%s",json_object_get_string(propElementJ));
+ if(json_object_object_get_ex(propElementJ, "property_value", &propElementValueJ))
{
json_type elementTypeJ = json_object_get_type(propElementValueJ);
// Apply policy on set property if needed here
+
// Here we only validate that the type is the same
if(currentTypeJ != elementTypeJ)
{
@@ -950,9 +990,17 @@ int Policy_SetProperty(json_object *pEndpointJ)
return AHL_POLICY_REJECT;
}
- // Raise Event to update HLB
+ // Raise event to notify HLB clients
+ // Same mechanic that policy could use if a particular state change would need to affect a property
audiohlapi_raise_event(pEventDataJ);
+ // HLB expects synchronous return of policy effected value
+ err = wrap_json_pack(ppPropertyReply,"{s:o}","value",propValueJ);
+ if (err)
+ {
+ return AHL_POLICY_REJECT;
+ }
+
return AHL_POLICY_ACCEPT;
}
@@ -1031,7 +1079,8 @@ int Policy_Endpoint_Init(json_object *pInPolicyEndpointJ,json_object **pOutPolic
pRoleName,
deviceURIType,
StreamConfig.iVolumeInit,
- true); // Do not raise event and no volume ramp
+ false, // no volume ramp
+ false); // Do not raise event
if(err) {
goto OnError;
}
diff --git a/ahl-policy/ahl-policy.h b/ahl-policy/ahl-policy.h
index 0200973..ca42016 100644
--- a/ahl-policy/ahl-policy.h
+++ b/ahl-policy/ahl-policy.h
@@ -36,8 +36,8 @@ int Policy_CloseStream(json_object *pStreamJ);
int Policy_SetStreamState(json_object *pStreamJ);
int Policy_SetStreamMute(json_object *pStreamJ);
int Policy_PostAction(json_object *pActionJ);
-int Policy_SetVolume(json_object *pEndpointJ);
-int Policy_SetProperty(json_object *pEndpointJ);
+int Policy_SetVolume(json_object *pEndpointJ,json_object ** ppVolumeReply);
+int Policy_SetProperty(json_object *pEndpointJ,json_object ** ppPropertyReply);
int Policy_Init();
void Policy_Term();
void Policy_OnEvent(const char *evtname, json_object *eventJ);
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake
index ff824cf..5f84437 100644
--- a/conf.d/cmake/config.cmake
+++ b/conf.d/cmake/config.cmake
@@ -29,7 +29,6 @@ set(PROJECT_AUTHOR_MAIL "tvuong@audiokinetic.com")
set(PROJECT_LICENCE "Apache-V2")
set(PROJECT_LANGUAGES,"C")
-
# Where are stored default templates files from submodule or subtree app-templates in your project tree
# relative to the root project directory
set(PROJECT_APP_TEMPLATES_DIR "conf.d/app-templates")
@@ -53,8 +52,7 @@ set(CONTROL_SUPPORT_LUA 1 CACHE BOOL "Active or not LUA Support")
# PKG_CONFIG required packages
# -----------------------------
-set (PKG_REQUIRED_LIST
- glib-2.0
+set (PKG_REQUIRED_LIST
alsa>=1.1.2
libsystemd>=222
libmicrohttpd>=0.9.55
diff --git a/conf.d/project/.asoundrc-audiok b/conf.d/project/.asoundrc
index cba88e5..8dde445 100644
--- a/conf.d/project/.asoundrc-audiok
+++ b/conf.d/project/.asoundrc
@@ -1,6 +1,6 @@
-
-
-##### AGL Conf #####
+#AGL Audio High Level ALSA configuration
+#This define 2 sounds card with 8 audio roles each
+#The alsa soft volume control name must match with the HAL Control Name
pcm.SoftMixer {
type dmix
ipc_key 1024
@@ -10,9 +10,9 @@ pcm.SoftMixer {
# Define target effective sound card (cannot be a plugin)
slave {
pcm "hw:0" # Main sound card
- # periods 8
- period_size 1024
+ channels 2
buffer_size 4096
+ period_size 1024
}
# DMIX can only map two channels
@@ -30,10 +30,10 @@ pcm.SoftMixer_DriverHR {
# Define target effective sound card (cannot be a plugin)
slave {
- pcm "hw:1" # Alternate sound card / dummy
- # periods 8
- period_size 1024
+ pcm "hw:3" # Alternate sound card / dummy
+ channels 2
buffer_size 4096
+ period_size 1024
}
# DMIX can only map two channels
@@ -51,10 +51,7 @@ pcm.SoftMixer_RSE {
# Define target effective sound card (cannot be a plugin)
slave {
- pcm "hw:2" # Alternate sound card / dummy
- # periods 8
- period_size 1024
- buffer_size 4096
+ pcm "hw:4" # Alternate sound card / dummy
}
# DMIX can only map two channels
@@ -68,7 +65,7 @@ pcm.Entertainment_Main {
type softvol
slave.pcm "SoftMixer"
control{
- name "Entertainment_Vol"
+ name "Entertainment_Volume"
card 0
}
}
@@ -77,7 +74,7 @@ pcm.Guidance_Main {
type softvol
slave.pcm "SoftMixer"
control{
- name "Guidance_Vol"
+ name "Guidance_Volume"
card 0
}
}
@@ -86,7 +83,7 @@ pcm.Communications_Main {
type softvol
slave.pcm "SoftMixer"
control{
- name "Communications_Vol"
+ name "Communications_Volume"
card 0
}
}
@@ -95,7 +92,7 @@ pcm.Notification_Main {
type softvol
slave.pcm "SoftMixer"
control{
- name "Notification_Vol"
+ name "Notification_Volume"
card 0
}
}
@@ -104,7 +101,34 @@ pcm.Warning_Main {
type softvol
slave.pcm "SoftMixer"
control{
- name "Warning_Vol"
+ name "Warning_Volume"
+ card 0
+ }
+}
+
+pcm.System_Main {
+ type softvol
+ slave.pcm "SoftMixer"
+ control{
+ name "System_Volume"
+ card 0
+ }
+}
+
+pcm.Startup_Main {
+ type softvol
+ slave.pcm "SoftMixer"
+ control{
+ name "Startup_Volume"
+ card 0
+ }
+}
+
+pcm.Shutdown_Main {
+ type softvol
+ slave.pcm "SoftMixer"
+ control{
+ name "Shutdown_Volume"
card 0
}
}
@@ -113,8 +137,8 @@ pcm.Entertainment_DriverHR {
type softvol
slave.pcm "SoftMixer_DriverHR"
control{
- name "Entertainment_Vol"
- card 1
+ name "Entertainment_Volume"
+ card 3
}
}
@@ -122,8 +146,8 @@ pcm.Guidance_DriverHR {
type softvol
slave.pcm "SoftMixer_DriverHR"
control{
- name "Guidance_Vol"
- card 1
+ name "Guidance_Volume"
+ card 3
}
}
@@ -131,8 +155,8 @@ pcm.Communications_DriverHR {
type softvol
slave.pcm "SoftMixer_DriverHR"
control{
- name "Communications_Vol"
- card 1
+ name "Communications_Volume"
+ card 3
}
}
@@ -140,8 +164,8 @@ pcm.Notification_DriverHR {
type softvol
slave.pcm "SoftMixer_DriverHR"
control{
- name "Notification_Vol"
- card 1
+ name "Notification_Volume"
+ card 3
}
}
@@ -149,16 +173,35 @@ pcm.Warning_DriverHR {
type softvol
slave.pcm "SoftMixer_DriverHR"
control{
- name "Warning_Vol"
- card 1
+ name "Warning_Volume"
+ card 3
}
}
-pcm.Entertainment_RSE {
+
+pcm.System_DriverHR {
type softvol
- slave.pcm "SoftMixer_RSE"
+ slave.pcm "SoftMixer_DriverHR"
+ control{
+ name "System_Volume"
+ card 3
+ }
+}
+
+pcm.Startup_DriverHR {
+ type softvol
+ slave.pcm "SoftMixer_DriverHR"
+ control{
+ name "Startup_Volume"
+ card 3
+ }
+}
+
+pcm.Shutdown_DriverHR {
+ type softvol
+ slave.pcm "SoftMixer_DriverHR"
control{
- name "Entertainment_Vol"
- card 2
+ name "Shutdown_Volume"
+ card 3
}
}
diff --git a/conf.d/project/ahl-audiok4a-config.json b/conf.d/project/ahl-aaaa-config.json
index 74ab251..5f24b00 100644
--- a/conf.d/project/ahl-audiok4a-config.json
+++ b/conf.d/project/ahl-aaaa-config.json
@@ -58,10 +58,10 @@
"priority": 50,
"output": [
"alsa.plug:Communications_Main",
- "alsa.plug:Communications_DriverHR",
+ "alsa.plug:Communications_DriverHR"
],
"input": [
- "alsa.hw:0",
+ "alsa.hw:0"
],
"actions": [
"bt_device_connected",
@@ -76,7 +76,7 @@
"priority": 0,
"output": [
"alsa.plug:Entertainment_Main",
- "alsa.plug:Entertainment_DriverHR",
+ "alsa.plug:Entertainment_DriverHR"
],
"interupt_behavior": "pause"
},
diff --git a/conf.d/project/ahl-fulup4a-config.json b/conf.d/project/ahl-fulup4a-config.json
index 1a851a5..4f418e2 100644
--- a/conf.d/project/ahl-fulup4a-config.json
+++ b/conf.d/project/ahl-fulup4a-config.json
@@ -7,7 +7,6 @@
"audio_roles": [
{
"name": "Guidance",
- "id": 1,
"description": "Important user information where user action is expected (e.g. navigation instruction)",
"priority": 25,
"output": [
@@ -16,8 +15,7 @@
"interupt_behavior": "continue"
},
{
- "name": "Emergency",
- "id": 2,
+ "name": "Notification",
"description": "HMI or else notifications (e.g. touchscreen events, speech recognition on/off,...)",
"priority": 100,
"output": [
@@ -27,7 +25,6 @@
},
{
"name": "Entertainment",
- "id": 3,
"description": "Multimedia content (e.g. tuner, media player, etc.)",
"priority": 0,
"output": [