From 68f1187061c28ecf6439b4dd465f4d256529dc55 Mon Sep 17 00:00:00 2001 From: Tai Vuong Date: Fri, 3 Nov 2017 18:55:54 -0400 Subject: various bug fix, add alsa configuration file to match with Hal control --- conf.d/cmake/config.cmake | 4 +- conf.d/project/.asoundrc | 207 ++++++++++++++++++++++++++++++++ conf.d/project/.asoundrc-audiok | 164 ------------------------- conf.d/project/ahl-aaaa-config.json | 120 ++++++++++++++++++ conf.d/project/ahl-audiok4a-config.json | 120 ------------------ conf.d/project/ahl-fulup4a-config.json | 5 +- 6 files changed, 329 insertions(+), 291 deletions(-) create mode 100644 conf.d/project/.asoundrc delete mode 100644 conf.d/project/.asoundrc-audiok create mode 100644 conf.d/project/ahl-aaaa-config.json delete mode 100644 conf.d/project/ahl-audiok4a-config.json (limited to 'conf.d') 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 b/conf.d/project/.asoundrc new file mode 100644 index 0000000..8dde445 --- /dev/null +++ b/conf.d/project/.asoundrc @@ -0,0 +1,207 @@ +#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 + ipc_key_add_uid false + ipc_perm 0666 # mixing for all users + + # Define target effective sound card (cannot be a plugin) + slave { + pcm "hw:0" # Main sound card + channels 2 + buffer_size 4096 + period_size 1024 + } + + # DMIX can only map two channels + bindings { + 0 0 + 1 1 + } +} + +pcm.SoftMixer_DriverHR { + type dmix + ipc_key 1024 + ipc_key_add_uid false + ipc_perm 0666 # mixing for all users + + # Define target effective sound card (cannot be a plugin) + slave { + pcm "hw:3" # Alternate sound card / dummy + channels 2 + buffer_size 4096 + period_size 1024 + } + + # DMIX can only map two channels + bindings { + 0 0 + 1 1 + } +} + +pcm.SoftMixer_RSE { + type dmix + ipc_key 1024 + ipc_key_add_uid false + ipc_perm 0666 # mixing for all users + + # Define target effective sound card (cannot be a plugin) + slave { + pcm "hw:4" # Alternate sound card / dummy + } + + # DMIX can only map two channels + bindings { + 0 0 + 1 1 + } +} + +pcm.Entertainment_Main { + type softvol + slave.pcm "SoftMixer" + control{ + name "Entertainment_Volume" + card 0 + } +} + +pcm.Guidance_Main { + type softvol + slave.pcm "SoftMixer" + control{ + name "Guidance_Volume" + card 0 + } +} + +pcm.Communications_Main { + type softvol + slave.pcm "SoftMixer" + control{ + name "Communications_Volume" + card 0 + } +} + +pcm.Notification_Main { + type softvol + slave.pcm "SoftMixer" + control{ + name "Notification_Volume" + card 0 + } +} + +pcm.Warning_Main { + type softvol + slave.pcm "SoftMixer" + control{ + 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 + } +} + +pcm.Entertainment_DriverHR { + type softvol + slave.pcm "SoftMixer_DriverHR" + control{ + name "Entertainment_Volume" + card 3 + } +} + +pcm.Guidance_DriverHR { + type softvol + slave.pcm "SoftMixer_DriverHR" + control{ + name "Guidance_Volume" + card 3 + } +} + +pcm.Communications_DriverHR { + type softvol + slave.pcm "SoftMixer_DriverHR" + control{ + name "Communications_Volume" + card 3 + } +} + +pcm.Notification_DriverHR { + type softvol + slave.pcm "SoftMixer_DriverHR" + control{ + name "Notification_Volume" + card 3 + } +} + +pcm.Warning_DriverHR { + type softvol + slave.pcm "SoftMixer_DriverHR" + control{ + name "Warning_Volume" + card 3 + } +} + + +pcm.System_DriverHR { + type softvol + 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 "Shutdown_Volume" + card 3 + } +} diff --git a/conf.d/project/.asoundrc-audiok b/conf.d/project/.asoundrc-audiok deleted file mode 100644 index cba88e5..0000000 --- a/conf.d/project/.asoundrc-audiok +++ /dev/null @@ -1,164 +0,0 @@ - - -##### AGL Conf ##### -pcm.SoftMixer { - type dmix - ipc_key 1024 - ipc_key_add_uid false - ipc_perm 0666 # mixing for all users - - # Define target effective sound card (cannot be a plugin) - slave { - pcm "hw:0" # Main sound card - # periods 8 - period_size 1024 - buffer_size 4096 - } - - # DMIX can only map two channels - bindings { - 0 0 - 1 1 - } -} - -pcm.SoftMixer_DriverHR { - type dmix - ipc_key 1024 - ipc_key_add_uid false - ipc_perm 0666 # mixing for all users - - # Define target effective sound card (cannot be a plugin) - slave { - pcm "hw:1" # Alternate sound card / dummy - # periods 8 - period_size 1024 - buffer_size 4096 - } - - # DMIX can only map two channels - bindings { - 0 0 - 1 1 - } -} - -pcm.SoftMixer_RSE { - type dmix - ipc_key 1024 - ipc_key_add_uid false - ipc_perm 0666 # mixing for all users - - # 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 - } - - # DMIX can only map two channels - bindings { - 0 0 - 1 1 - } -} - -pcm.Entertainment_Main { - type softvol - slave.pcm "SoftMixer" - control{ - name "Entertainment_Vol" - card 0 - } -} - -pcm.Guidance_Main { - type softvol - slave.pcm "SoftMixer" - control{ - name "Guidance_Vol" - card 0 - } -} - -pcm.Communications_Main { - type softvol - slave.pcm "SoftMixer" - control{ - name "Communications_Vol" - card 0 - } -} - -pcm.Notification_Main { - type softvol - slave.pcm "SoftMixer" - control{ - name "Notification_Vol" - card 0 - } -} - -pcm.Warning_Main { - type softvol - slave.pcm "SoftMixer" - control{ - name "Warning_Vol" - card 0 - } -} - -pcm.Entertainment_DriverHR { - type softvol - slave.pcm "SoftMixer_DriverHR" - control{ - name "Entertainment_Vol" - card 1 - } -} - -pcm.Guidance_DriverHR { - type softvol - slave.pcm "SoftMixer_DriverHR" - control{ - name "Guidance_Vol" - card 1 - } -} - -pcm.Communications_DriverHR { - type softvol - slave.pcm "SoftMixer_DriverHR" - control{ - name "Communications_Vol" - card 1 - } -} - -pcm.Notification_DriverHR { - type softvol - slave.pcm "SoftMixer_DriverHR" - control{ - name "Notification_Vol" - card 1 - } -} - -pcm.Warning_DriverHR { - type softvol - slave.pcm "SoftMixer_DriverHR" - control{ - name "Warning_Vol" - card 1 - } -} - -pcm.Entertainment_RSE { - type softvol - slave.pcm "SoftMixer_RSE" - control{ - name "Entertainment_Vol" - card 2 - } -} diff --git a/conf.d/project/ahl-aaaa-config.json b/conf.d/project/ahl-aaaa-config.json new file mode 100644 index 0000000..5f24b00 --- /dev/null +++ b/conf.d/project/ahl-aaaa-config.json @@ -0,0 +1,120 @@ +{ + "version": "0.2.0", + "policy_module": "AudioPolicy_v1", + "description": "High-level binding configuration file", + "note": "Devices and routings are always listed in order of priority (for device selection rules)", + "hal_list": ["ensoniq","usbaudio"], + "audio_roles": [ + { + "name": "Warning", + "description": "Safety-relevant or critical alerts/alarms", + "priority": 100, + "output": [ + "alsa.plug:Warning_Main", + "alsa.plug:Warning_DriverHR" + ], + "actions": [ + "emergency_brake", + "collision_warning", + "blind_spot_warning" + ], + "interupt_behavior": "pause" + }, + { + "name": "Guidance", + "description": "Important user information where user action is expected (e.g. navigation instruction)", + "priority": 25, + "output": [ + "alsa.plug:Guidance_Main", + "alsa.plug:Guidance_DriverHR" + ], + "actions": [ + "lane_guidance_left", + "lane_guidance_right", + "destination_reached" + ], + "interupt_behavior": "continue" + }, + { + "name": "Notification", + "description": "HMI or else notifications (e.g. touchscreen events, speech recognition on/off,...)", + "priority": 0, + "output": [ + "alsa.plug:Notification_Main", + "alsa.plug:Notification_DriverHR" + ], + "actions": [ + "home", + "context_switch", + "accept", + "cancel", + "selection_change" + ], + "interupt_behavior": "cancel" + }, + { + "name": "Communication", + "description": "Voice communications (e.g. handsfree, speech recognition)", + "priority": 50, + "output": [ + "alsa.plug:Communications_Main", + "alsa.plug:Communications_DriverHR" + ], + "input": [ + "alsa.hw:0" + ], + "actions": [ + "bt_device_connected", + "bt_device_disconnected", + "sms_received" + ], + "interupt_behavior": "continue" + }, + { + "name": "Entertainment", + "description": "Multimedia content (e.g. tuner, media player, etc.)", + "priority": 0, + "output": [ + "alsa.plug:Entertainment_Main", + "alsa.plug:Entertainment_DriverHR" + ], + "interupt_behavior": "pause" + }, + { + "name": "System", + "description": "System level content or development", + "priority": 100, + "output": [ + "alsa.hw:0" + ], + "input": [ + "alsa.hw:0" + ], + "interupt_behavior": "continue" + }, + { + "name": "Startup", + "description": "Early (startup) sound", + "priority": 100, + "output": [ + "alsa.hw:0" + ], + "actions": [ + "welcome_sound" + ], + "interupt_behavior": "pause" + }, + { + "name": "Shutdown", + "description": "Late (shutdown) sound", + "priority": 100, + "output": [ + "alsa.hw:0" + ], + "actions": [ + "goodbye_sound" + ], + "interupt_behavior": "cancel" + } + ] +} diff --git a/conf.d/project/ahl-audiok4a-config.json b/conf.d/project/ahl-audiok4a-config.json deleted file mode 100644 index 74ab251..0000000 --- a/conf.d/project/ahl-audiok4a-config.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "version": "0.2.0", - "policy_module": "AudioPolicy_v1", - "description": "High-level binding configuration file", - "note": "Devices and routings are always listed in order of priority (for device selection rules)", - "hal_list": ["ensoniq","usbaudio"], - "audio_roles": [ - { - "name": "Warning", - "description": "Safety-relevant or critical alerts/alarms", - "priority": 100, - "output": [ - "alsa.plug:Warning_Main", - "alsa.plug:Warning_DriverHR" - ], - "actions": [ - "emergency_brake", - "collision_warning", - "blind_spot_warning" - ], - "interupt_behavior": "pause" - }, - { - "name": "Guidance", - "description": "Important user information where user action is expected (e.g. navigation instruction)", - "priority": 25, - "output": [ - "alsa.plug:Guidance_Main", - "alsa.plug:Guidance_DriverHR" - ], - "actions": [ - "lane_guidance_left", - "lane_guidance_right", - "destination_reached" - ], - "interupt_behavior": "continue" - }, - { - "name": "Notification", - "description": "HMI or else notifications (e.g. touchscreen events, speech recognition on/off,...)", - "priority": 0, - "output": [ - "alsa.plug:Notification_Main", - "alsa.plug:Notification_DriverHR" - ], - "actions": [ - "home", - "context_switch", - "accept", - "cancel", - "selection_change" - ], - "interupt_behavior": "cancel" - }, - { - "name": "Communication", - "description": "Voice communications (e.g. handsfree, speech recognition)", - "priority": 50, - "output": [ - "alsa.plug:Communications_Main", - "alsa.plug:Communications_DriverHR", - ], - "input": [ - "alsa.hw:0", - ], - "actions": [ - "bt_device_connected", - "bt_device_disconnected", - "sms_received" - ], - "interupt_behavior": "continue" - }, - { - "name": "Entertainment", - "description": "Multimedia content (e.g. tuner, media player, etc.)", - "priority": 0, - "output": [ - "alsa.plug:Entertainment_Main", - "alsa.plug:Entertainment_DriverHR", - ], - "interupt_behavior": "pause" - }, - { - "name": "System", - "description": "System level content or development", - "priority": 100, - "output": [ - "alsa.hw:0" - ], - "input": [ - "alsa.hw:0" - ], - "interupt_behavior": "continue" - }, - { - "name": "Startup", - "description": "Early (startup) sound", - "priority": 100, - "output": [ - "alsa.hw:0" - ], - "actions": [ - "welcome_sound" - ], - "interupt_behavior": "pause" - }, - { - "name": "Shutdown", - "description": "Late (shutdown) sound", - "priority": 100, - "output": [ - "alsa.hw:0" - ], - "actions": [ - "goodbye_sound" - ], - "interupt_behavior": "cancel" - } - ] -} 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": [ -- cgit 1.2.3-korg