summaryrefslogtreecommitdiffstats
path: root/meta-audio-4a-framework/recipes-multimedia/4a-hal-config
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-07-24 20:56:58 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2018-07-24 20:56:58 +0000
commit4c25232324e4b61c866c27037438a35ab025cfbc (patch)
treec185e28332a17b970c59f69994f37a0954bf4cd3 /meta-audio-4a-framework/recipes-multimedia/4a-hal-config
parentdf566308e44012a7d3499e466270f09e0aa4cc53 (diff)
parenta67dca365dcd18d38de2f3e8a610a251fdb72e44 (diff)
Merge "Cleanup deprecated 4A configuration files"
Diffstat (limited to 'meta-audio-4a-framework/recipes-multimedia/4a-hal-config')
-rw-r--r--meta-audio-4a-framework/recipes-multimedia/4a-hal-config/4a-hal-config.bb11
-rw-r--r--meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/ahl-config.json.template117
-rw-r--r--meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template530
3 files changed, 1 insertions, 657 deletions
diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/4a-hal-config.bb b/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/4a-hal-config.bb
index d012cb9a..fc648a1d 100644
--- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/4a-hal-config.bb
+++ b/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/4a-hal-config.bb
@@ -7,28 +7,17 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
SRC_URI = "file://asound.conf.template \
- file://ahl-config.json.template \
"
PV = "0.1"
RPROVIDES_${PN} += "VIRTUAL-RUNTIME_alsa-state"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-AUDIO_DEV_NAME ?= "Speakers"
-AUDIO_DEV_NAME_ID ?= "0"
-
-AUDIO_DEV_NAME_m3ulcb = "M3-Speakers"
-AUDIO_DEV_NAME_ID_m3ulcb = "rsnddai0ak4613h"
-
inherit afb-system
do_install () {
install -d ${D}/${sysconfdir}
install -m 0755 ${WORKDIR}/asound.conf.template ${D}/${sysconfdir}/asound.conf
- sed -i "s|@AUDIO_DEV_NAME@|${AUDIO_DEV_NAME}|g" ${D}/${sysconfdir}/asound.conf
- sed -i "s|@AUDIO_DEV_NAME_ID@|${AUDIO_DEV_NAME_ID}|g" ${D}/${sysconfdir}/asound.conf
sed -i "s|@INSTALL_PREFIX@|${INSTALL_PREFIX}|g" ${D}/${sysconfdir}/asound.conf
}
diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/ahl-config.json.template b/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/ahl-config.json.template
deleted file mode 100644
index f2244b83..00000000
--- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/ahl-config.json.template
+++ /dev/null
@@ -1,117 +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": ["@AUDIO_DEV_NAME_ID@"],
- "audio_roles": [
- {
- "name": "Emergency",
- "description": "to complete",
- "priority": 99,
- "output": [
- "alsa.plug:Emergency_Main"
- ],
- "interupt_behavior": "pause"
- },
- {
- "name": "Warning",
- "description": "to complete",
- "priority": 95,
- "output": [
- "alsa.plug:Warning_Main"
- ],
- "interupt_behavior": "pause"
- },
- {
- "name": "CustomHigh",
- "description": "to complete",
- "priority": 79,
- "output": [
- "alsa.plug:CustomHigh_Main"
- ],
- "interupt_behavior": "continue"
- },
- {
- "name": "Phone",
- "description": "to complete",
- "priority": 72,
- "output": [
- "alsa.plug:Phone_Main"
- ],
- "interupt_behavior": "continue"
- },
- {
- "name": "Navigation",
- "description": "Important user information where user action is expected (e.g. navigation instruction)",
- "priority": 71,
- "output": [
- "alsa.plug:Navigation_Main"
- ],
- "interupt_behavior": "pause"
- },
- {
- "name": "CustomMedium",
- "description": "to complete",
- "priority": 59,
- "output": [
- "alsa.plug:CustomMedium_Main"
- ],
- "interupt_behavior": "continue"
- },
- {
- "name": "Video",
- "description": "Video content",
- "priority": 57,
- "output": [
- "alsa.plug:Video_Main"
- ],
- "interupt_behavior": "pause"
- },
- {
- "name": "Streaming",
- "description": "Streaming content",
- "priority": 55,
- "output": [
- "alsa.plug:Streaming_Main"
- ],
- "interupt_behavior": "pause"
- },
- {
- "name": "Multimedia",
- "description": "Multimedia content",
- "priority": 53,
- "output": [
- "alsa.plug:Multimedia_Main"
- ],
- "interupt_behavior": "pause"
- },
- {
- "name": "Radio",
- "description": "Radio content",
- "priority": 51,
- "output": [
- "alsa.plug:Radio_Main"
- ],
- "interupt_behavior": "continue"
- },
- {
- "name": "CustomLow",
- "description": "to complete",
- "priority": 19,
- "output": [
- "alsa.plug:CustomLow_Main"
- ],
- "interupt_behavior": "continue"
- },
- {
- "name": "Fallback",
- "description": "to complete",
- "priority": 0,
- "output": [
- "alsa.plug:Fallback_Main"
- ],
- "interupt_behavior": "continue"
- }
- ]
-}
diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template b/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template
index f428ba74..5a265db0 100644
--- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template
+++ b/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template
@@ -1,531 +1,3 @@
-#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.@AUDIO_DEV_NAME@ {
- type dmix
- slave {pcm "hw:@AUDIO_DEV_NAME_ID@"}
- ipc_key 1001 # ipc_key should be unique to each dmix
-}
-
-# -----------------------------------------------------
-# Register ControllerHookPlugin (ToiBeFix fullpath)
-# -----------------------------------------------------
-pcm_hook_type.CtlHookPlugin {
- install "AlsaInstallHook"
- lib "@INSTALL_PREFIX@/lib/policy_alsa_hook.so"
-}
-
-# ----------------------------------------------------
+#4A pcm configuration is now dynamic, please check hal configuration files in @INSTALL_PREFIX@/4a-hal/etc
#
-# ----------------------------------------------------
-pcm.Emergency_Main {
- type softvol
- slave.pcm "@AUDIO_DEV_NAME@"
- control{
- name "Emergency_Volume"
- }
-}
-
-pcm.Warning_Main {
- type softvol
- slave.pcm "@AUDIO_DEV_NAME@"
- control{
- name "Warning_Volume"
- }
-}
-
-pcm.CustomHigh_Main {
- type softvol
- slave.pcm "@AUDIO_DEV_NAME@"
- control{
- name "CustomHigh_Volume"
- }
-}
-
-pcm.Phone_Main {
- type softvol
- slave.pcm "@AUDIO_DEV_NAME@"
- control{
- name "Phone_Volume"
- }
-}
-
-pcm.Navigation_Main {
- type softvol
- slave.pcm "@AUDIO_DEV_NAME@"
- control{
- name "Navigation_Volume"
- }
-}
-
-pcm.CustomMedium_Main {
- type softvol
- slave.pcm "@AUDIO_DEV_NAME@"
- control{
- name "CustomMedium_Volume"
- }
-}
-
-pcm.Video_Main {
- type softvol
- slave.pcm "@AUDIO_DEV_NAME@"
- control{
- name "Video_Volume"
- }
-}
-
-pcm.Streaming_Main {
- type softvol
- slave.pcm "@AUDIO_DEV_NAME@"
- control{
- name "Streaming_Volume"
- }
-}
-
-pcm.Multimedia_Main {
- type softvol
- slave.pcm "@AUDIO_DEV_NAME@"
- control{
- name "Multimedia_Volume"
- }
-}
-
-pcm.Radio_Main {
- type softvol
- slave.pcm "@AUDIO_DEV_NAME@"
- control{
- name "Radio_Volume"
- }
-}
-
-pcm.CustomLow_Main {
- type softvol
- slave.pcm "@AUDIO_DEV_NAME@"
- control{
- name "CustomLow_Volume"
- }
-}
-
-pcm.Fallback_Main {
- type softvol
- slave.pcm "@AUDIO_DEV_NAME@"
- control{
- name "Fallback_Volume"
- }
-}
-
-# ----------------------------------------------------
-# Define one hooked PCM channel per Audio Roles
-# ----------------------------------------------------
-pcm.Emergency {
- type hooks
- slave {pcm "Emergency_Main"}
- 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:/run/user/0/apis/ws/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 {
- stream_close "{}"
- }
- }
- }
-}
-
-pcm.Warning {
- type hooks
- slave {pcm "Warning_Main"}
- 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:/run/user/0/apis/ws/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': 'Warning', 'endpoint_type':'sink'}"
- set_stream_state "{'state':'running'}"
- }
-
- # api subcall to request a role
- release {
- stream_close "{}"
- }
- }
- }
-}
-
-pcm.CustomHigh {
- type hooks
- slave {pcm "CustomHigh_Main"}
- 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:/run/user/0/apis/ws/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': 'CustomHigh', 'endpoint_type':'sink'}"
- set_stream_state "{'state':'running'}"
- }
-
- # api subcall to request a role
- release {
- stream_close "{}"
- }
- }
- }
-}
-
-pcm.Phone {
- type hooks
- slave {pcm "Phone_Main"}
- 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:/run/user/0/apis/ws/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': 'Phone', 'endpoint_type':'sink'}"
- set_stream_state "{'state':'running'}"
- }
-
- # api subcall to request a role
- release {
- stream_close "{}"
- }
- }
- }
-}
-
-pcm.Navigation {
- type hooks
- slave {pcm "Navigation_Main"}
- 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:/run/user/0/apis/ws/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': 'Navigation', 'endpoint_type':'sink'}"
- set_stream_state "{'state':'running'}"
- }
-
- # api subcall to request a role
- release {
- stream_close "{}"
- }
- }
- }
-}
-
-pcm.CustomMedium {
- type hooks
- slave {pcm "CustomMedium_Main"}
- 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:/run/user/0/apis/ws/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': 'CustomMedium', 'endpoint_type':'sink'}"
- set_stream_state "{'state':'running'}"
- }
-
- # api subcall to request a role
- release {
- stream_close "{}"
- }
- }
- }
-}
-
-pcm.Video {
- type hooks
- slave {pcm "Video_Main"}
- 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:/run/user/0/apis/ws/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': 'Video', 'endpoint_type':'sink'}"
- set_stream_state "{'state':'running'}"
- }
-
- # api subcall to request a role
- release {
- stream_close "{}"
- }
- }
- }
-}
-
-pcm.Streaming {
- type hooks
- slave {pcm "Streaming_Main"}
- 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:/run/user/0/apis/ws/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': 'Streaming', 'endpoint_type':'sink'}"
- set_stream_state "{'state':'running'}"
- }
-
- # api subcall to request a role
- release {
- stream_close "{}"
- }
- }
- }
-}
-
-pcm.Multimedia {
- type hooks
- slave {pcm "Multimedia_Main"}
- 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:/run/user/0/apis/ws/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': 'Multimedia', 'endpoint_type':'sink'}"
- set_stream_state "{'state':'running'}"
- }
-
- # api subcall to request a role
- release {
- stream_close "{}"
- }
- }
- }
-}
-
-pcm.Radio {
- type hooks
- slave {pcm "Radio_Main"}
- 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:/run/user/0/apis/ws/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': 'Radio', 'endpoint_type':'sink'}"
- set_stream_state "{'state':'running'}"
- }
-
- # api subcall to request a role
- release {
- stream_close "{}"
- }
- }
- }
-}
-
-pcm.CustomLow {
- type hooks
- slave {pcm "CustomLow_Main"}
- 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:/run/user/0/apis/ws/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': 'CustomLow', 'endpoint_type':'sink'}"
- set_stream_state "{'state':'running'}"
- }
-
- # api subcall to request a role
- release {
- stream_close "{}"
- }
- }
- }
-}
-
-pcm.Fallback {
- type hooks
- slave {pcm "Fallback_Main"}
- 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:/run/user/0/apis/ws/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': 'Fallback', 'endpoint_type':'sink'}"
- set_stream_state "{'state':'running'}"
- }
-
- # api subcall to request a role
- release {
- stream_close "{}"
- }
- }
- }
-}