diff options
Diffstat (limited to 'conf.d')
-rw-r--r-- | conf.d/cmake/config.cmake | 2 | ||||
-rw-r--r-- | conf.d/project/.asounrc-fulup | 198 | ||||
-rw-r--r-- | conf.d/project/ahl-audio4a-config.json (renamed from conf.d/project/ahl-aaaa-config.json) | 2 | ||||
-rw-r--r-- | conf.d/project/ahl-fulup4a-config.json | 8 | ||||
-rw-r--r-- | conf.d/project/asoundrc-audio4a (renamed from conf.d/project/.asoundrc) | 0 | ||||
-rw-r--r-- | conf.d/project/asoundrc-fulup4a | 81 |
6 files changed, 87 insertions, 204 deletions
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake index 5f84437..e168060 100644 --- a/conf.d/cmake/config.cmake +++ b/conf.d/cmake/config.cmake @@ -100,7 +100,7 @@ if(IS_DIRECTORY $ENV{HOME}/opt/afb-monitoring) set(MONITORING_ALIAS "--alias=/monitoring:$ENV{HOME}/opt/afb-monitoring") endif() -set(CLOSING_MESSAGE "Debug: afb-daemon --name=afb-audiok4a --port=1234 --ws-server=unix:/var/tmp/ahl-4a --cntxtimeout=1 ${MONITORING_ALIAS} --binding=package/lib/afb-audiohighlevel.so --ldpaths=../../alsa-4a/build/package/lib:../../hal-sample-4a/build/package/lib --workdir=. --roothttp=../htdocs --token= --verbose ") +set(CLOSING_MESSAGE "Debug: afb-daemon --name=afb-audio4a --port=1234 --ws-server=unix:/var/tmp/ahl-4a --cntxtimeout=1 ${MONITORING_ALIAS} --binding=package/lib/afb-audiohighlevel.so --ldpaths=../../alsa-4a/build/package/lib:../../hal-sample-4a/build/package/lib --workdir=. --roothttp=../htdocs --token= --verbose ") # Optional location for config.xml.in diff --git a/conf.d/project/.asounrc-fulup b/conf.d/project/.asounrc-fulup deleted file mode 100644 index c98d5a8..0000000 --- a/conf.d/project/.asounrc-fulup +++ /dev/null @@ -1,198 +0,0 @@ -# -# Author: Fulup Ar Foll -# Object: PCM hook type -# -# Test : Note: Jabra_USB=hw:v1340 -# Check SoundCard ==> speaker-test -Dhw:v1340 -c2 -twav -# Check MixerPCM ==> speaker-test -DSpeakers -c2 -twav -# Check SoftVol ==> speaker-test -DMusicPCM -c2 -twav -# Check Plugin ==> speaker-test -DMultimedia -c2 -twav -# Check Plugin ==> speaker-test -DNavigation -c2 -twav -# -# MultiMedia aplay -DDMyNavPCM /usr/share/sounds/alsa/test.wav -# -# Bug/Feature: when softvol control is initialised from plugin and not -# from AGL binding. At 1st run ctl has invalid TLV and cannot be -# use. Bypass Solution: -# * start audio-binder before playing sound (binding create control before softvol plugin) -# * run a dummy aplay -DMyNavPCM "" to get a clean control -# -# References: https://www.spinics.net/lists/alsa-devel/msg54235.html -# -------------------------------------------------------------------- - -# ------------------------------------------------------ -# Mixer PCM allow to play multiple stream simultaneously -# ------------------------------------------------------ -pcm.Speakers { - type dmix - slave {pcm "hw:v1340"} #Jabra Solmate 1 - ipc_key 1001 # ipc_key should be unique to each dmix -} - -# ----------------------------------------------------- -# Register ControllerHookPlugin (ToiBeFix fullpath) -# ----------------------------------------------------- -pcm_hook_type.CtlHookPlugin { - install "AlsaInstallHook" - lib "/home/fulup/Workspace/Audio-4a/alsa-4a/build/alsa-hook/policy_alsa_hook.so" -} - - -# ------------------------------------------------------- -# Define one Audio Virtual Channel per Audio Roles -# ------------------------------------------------------- -pcm.MusicPCM { - type softvol - - # Point Slave on HOOK for policies control - slave.pcm "Speakers" - - # name should match with HAL definition - control.name "Playback Multimedia" -} - -pcm.NaviPCM { - type softvol - - # Point Slave on HOOK for policies control - slave.pcm "Speakers" - - # name should match with HAL definition - control.name "Playback Navigation" -} - -pcm.UrgentPCM { - type softvol - - # Point Slave on HOOK for policies control - slave.pcm "Speakers" - - # name should match with HAL definition - control.name "Playback Emergency" -} - -# ---------------------------------------------------- -# Define one hooked PCM channel per Audio Roles -# ---------------------------------------------------- -pcm.Multimedia { - type hooks - slave {pcm "MusicPCM"} - hooks.0 { - comment "Defined used hook sharelib and provide arguments/config to install func" - type "CtlHookPlugin" - hook_args { - - # print few log messages (default false) - verbose true - - # uri to audio-4a policy engine - uri="unix:/var/tmp/ahl-4a" - - # timeout in ms (default 500) - timeout 5000 - - # force API synchronous mode - synchronous true - - # api subcall to request a role - request { - stream_open "{'audio_role':'Entertainment', 'endpoint_type': 'sink'}" - set_stream_state "{'state': 'running'}" - } - - # api subcall to request a role - release { - stream_close "{}" - } - - # map AGL event on Unix signal. Search in event for json key=value - events { - sig-02 {search music, value quit} - sig-31 {search event, value start} - sig-32 {search event, value start} - } - } - } -} - -pcm.Navigation { - type hooks - slave {pcm "NaviPCM"} - hooks.0 { - comment "Defined used hook sharelib and provide arguments/config to install func" - type "CtlHookPlugin" - hook_args { - - # print few log messages (default false) - verbose true - - # uri to audio-4a policy engine - uri="unix:/var/tmp/ahl-4a" - - # timeout in ms (default 500) - timeout 5000 - - # force API synchronous mode - synchronous true - - # api subcall to request a role - request { - stream_open "{'audio_role':'Guidance', 'endpoint_type': 'sink'}" - set_stream_state "{'state': 'running'}" - } - - # api subcall to request a role - release { - release-role "{'uid':'alsa-hook-client'}" - } - - # map AGL event on Unix signal. Search in event for json key=value - events { - sig-02 {search navi, value quit} - sig-31 {search event, value start} - sig-32 {search event, value start} - } - } - } -} - -pcm.Emergency { - type hooks - slave {pcm "UrgentPCM"} - hooks.0 { - comment "Defined used hook sharelib and provide arguments/config to install func" - type "CtlHookPlugin" - hook_args { - - # print few log messages (default false) - verbose true - - # uri to audio-4a policy engine - uri="unix:/var/tmp/ahl-4a" - - # timeout in ms (default 500) - timeout 5000 - - # force API synchronous mode - synchronous true - - # api subcall to request a role - request { - stream_open "{'audio_role':'Emergency', 'endpoint_type': 'sink'}" - set_stream_state "{'state': 'running'}" - } - - # api subcall to request a role - release { - release-role "{'uid':'alsa-hook-client'}" - } - - # map AGL event on Unix signal. Search in event for json key=value - events { - sig-02 {search navi, value quit} - sig-31 {search event, value start} - sig-32 {search event, value start} - } - } - } -} diff --git a/conf.d/project/ahl-aaaa-config.json b/conf.d/project/ahl-audio4a-config.json index 5f24b00..64c8141 100644 --- a/conf.d/project/ahl-aaaa-config.json +++ b/conf.d/project/ahl-audio4a-config.json @@ -3,7 +3,7 @@ "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"], + "hal_list": ["ensoniq","usb-audio"], "audio_roles": [ { "name": "Warning", diff --git a/conf.d/project/ahl-fulup4a-config.json b/conf.d/project/ahl-fulup4a-config.json index 4f418e2..da7d93c 100644 --- a/conf.d/project/ahl-fulup4a-config.json +++ b/conf.d/project/ahl-fulup4a-config.json @@ -3,14 +3,14 @@ "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": ["jabra-usb"], + "hal_list": ["usb-jabra"], "audio_roles": [ { "name": "Guidance", "description": "Important user information where user action is expected (e.g. navigation instruction)", "priority": 25, "output": [ - "alsa.plug:NaviPCM" + "alsa.plug:Guidance_Main" ], "interupt_behavior": "continue" }, @@ -19,7 +19,7 @@ "description": "HMI or else notifications (e.g. touchscreen events, speech recognition on/off,...)", "priority": 100, "output": [ - "alsa.plug:UrgentPCM" + "alsa.plug:Notification_Main" ], "interupt_behavior": "pause" }, @@ -28,7 +28,7 @@ "description": "Multimedia content (e.g. tuner, media player, etc.)", "priority": 0, "output": [ - "alsa.plug:MusicPCM" + "alsa.plug:Entertainment_Main" ], "interupt_behavior": "pause" } diff --git a/conf.d/project/.asoundrc b/conf.d/project/asoundrc-audio4a index 8dde445..8dde445 100644 --- a/conf.d/project/.asoundrc +++ b/conf.d/project/asoundrc-audio4a diff --git a/conf.d/project/asoundrc-fulup4a b/conf.d/project/asoundrc-fulup4a new file mode 100644 index 0000000..d500f5a --- /dev/null +++ b/conf.d/project/asoundrc-fulup4a @@ -0,0 +1,81 @@ +#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 + slave {pcm "hw:v1340"} #Jabra Solmate 1 + ipc_key 1001 # ipc_key should be unique to each dmix +} + +# ----------------------------------------------------- +# Register ControllerHookPlugin (ToiBeFix fullpath) +# ----------------------------------------------------- +pcm_hook_type.CtlHookPlugin { + install "AlsaInstallHook" + lib "/home/fulup/Workspace/Audio-4a/alsa-4a/build/alsa-hook/policy_alsa_hook.so" +} + +pcm.Entertainment_Main { + type softvol + slave.pcm "SoftMixer" + control{ + name "Entertainment_Volume" + } +} + +pcm.Guidance_Main { + type softvol + slave.pcm "SoftMixer" + control{ + name "Guidance_Volume" + } +} + +pcm.Communications_Main { + type softvol + slave.pcm "SoftMixer" + control{ + name "Communications_Volume" + } +} + +pcm.Notification_Main { + type softvol + slave.pcm "SoftMixer" + control{ + name "Notification_Volume" + } +} + +pcm.Warning_Main { + type softvol + slave.pcm "SoftMixer" + control{ + name "Warning_Volume" + } +} + +pcm.System_Main { + type softvol + slave.pcm "SoftMixer" + control{ + name "System_Volume" + } +} + +pcm.Startup_Main { + type softvol + slave.pcm "SoftMixer" + control{ + name "Startup_Volume" + } +} + +pcm.Shutdown_Main { + type softvol + slave.pcm "SoftMixer" + control{ + name "Shutdown_Volume" + } +} |