diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2019-04-30 18:25:44 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2019-04-30 18:25:44 +0200 |
commit | 43632464eb877e8c6297fd3ba665277352933149 (patch) | |
tree | 7210e169b8df4b6721d9fca3eed579067d13a302 | |
parent | d6e5cfa8ed834d4ff2e32ce164cd4b79d7df8aef (diff) |
alsa-state: add alsa config for apalis-imx8
This sets the analog audio out as the default alsa card and gives
that codec reasonable mixer defaults.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r-- | recipes-bsp/alsa-state/alsa-state/apalis-imx8/asound.conf | 250 | ||||
-rw-r--r-- | recipes-bsp/alsa-state/alsa-state/apalis-imx8/asound.state | 205 |
2 files changed, 455 insertions, 0 deletions
diff --git a/recipes-bsp/alsa-state/alsa-state/apalis-imx8/asound.conf b/recipes-bsp/alsa-state/alsa-state/apalis-imx8/asound.conf new file mode 100644 index 0000000..0bee593 --- /dev/null +++ b/recipes-bsp/alsa-state/alsa-state/apalis-imx8/asound.conf @@ -0,0 +1,250 @@ +defaults.pcm.rate_converter "linear" + +pcm.default_card{ +type hw +card "imx8qmsgtl5000" +} + +pcm.dmix_48000{ +type dmix +ipc_key 5678293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 48000 +} +} + +pcm.dmix_44100{ +type dmix +ipc_key 5678293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 44100 +} +} + +pcm.dmix_32000{ +type dmix +ipc_key 5678293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 32000 +} +} + +pcm.dmix_24000{ +type dmix +ipc_key 5678293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 24000 +} +} + +pcm.dmix_22050{ +type dmix +ipc_key 5678293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 22050 +} +} + +pcm.dmix_16000{ +type dmix +ipc_key 5678293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 16000 +} +} + +pcm.dmix_12000{ +type dmix +ipc_key 5678293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 12000 +} +} + +pcm.dmix_11025{ +type dmix +ipc_key 5678293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 11025 +} +} + +pcm.dmix_8000{ +type dmix +ipc_key 5678293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 8000 +} +} + +pcm.!dsnoop_48000{ +type dsnoop +ipc_key 5778293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 48000 +} +} + +pcm.!dsnoop_44100{ +type dsnoop +ipc_key 5778293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 44100 +} +} + +pcm.!dsnoop_32000{ +type dsnoop +ipc_key 5778293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 32000 +} +} + +pcm.!dsnoop_24000{ +type dsnoop +ipc_key 5778293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 24000 +} +} + +pcm.!dsnoop_22050{ +type dsnoop +ipc_key 5778293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 22050 +} +} + +pcm.!dsnoop_16000{ +type dsnoop +ipc_key 5778293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 16000 +} +} + +pcm.!dsnoop_12000{ +type dsnoop +ipc_key 5778293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 12000 +} +} + +pcm.!dsnoop_11025{ +type dsnoop +ipc_key 5778293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 11025 +} +} + +pcm.!dsnoop_8000{ +type dsnoop +ipc_key 5778293 +ipc_key_add_uid yes +slave{ +pcm "default_card" +period_time 40000 +format S16_LE +rate 8000 +} +} + +pcm.asymed{ +type asym +playback.pcm "dmix_44100" +capture.pcm "dsnoop_44100" +} + +pcm.dsp0{ +type plug +slave.pcm "asymed" +} + +pcm.!default{ +type plug +route_policy "average" +slave.pcm "asymed" +} + +ctl.!default{ +type hw +card "imx8qmsgtl5000" +} + +ctl.mixer0{ +type hw +card "imx8qmsgtl5000" +} + diff --git a/recipes-bsp/alsa-state/alsa-state/apalis-imx8/asound.state b/recipes-bsp/alsa-state/alsa-state/apalis-imx8/asound.state new file mode 100644 index 0000000..bdab8c1 --- /dev/null +++ b/recipes-bsp/alsa-state/alsa-state/apalis-imx8/asound.state @@ -0,0 +1,205 @@ +state.imx8qmsgtl5000 { + control.1 { + iface MIXER + name 'PCM Playback Volume' + value.0 144 + value.1 144 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 192' + } + } + control.2 { + iface MIXER + name 'Capture Volume' + value.0 12 + value.1 12 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 15' + } + } + control.3 { + iface MIXER + name 'Capture Attenuate Switch (-6dB)' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.4 { + iface MIXER + name 'Capture ZC Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.5 { + iface MIXER + name 'Headphone Playback Volume' + value.0 87 + value.1 87 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 127' + dbmin -5150 + dbmax 1200 + dbvalue.0 800 + dbvalue.1 800 + } + } + control.6 { + iface MIXER + name 'Headphone Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.7 { + iface MIXER + name 'Headphone Playback ZC Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.8 { + iface MIXER + name 'Mic Volume' + value 3 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + dbmin 0 + dbmax 4000 + dbvalue.0 0 + } + } + control.9 { + iface MIXER + name 'Lineout Playback Volume' + value.0 0 + value.1 0 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 31' + dbmin -1550 + dbmax 0 + dbvalue.0 -1550 + dbvalue.1 -1550 + } + } + control.10 { + iface MIXER + name 'Lineout Playback Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.11 { + iface MIXER + name 'AVC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.12 { + iface MIXER + name 'AVC Hard Limiter Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.13 { + iface MIXER + name 'AVC Max Gain Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 2' + dbmin 0 + dbmax 1200 + dbvalue.0 0 + } + } + control.14 { + iface MIXER + name 'AVC Integrator Response' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + } + } + control.15 { + iface MIXER + name 'AVC Threshold Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 96' + dbmin 0 + dbmax 9600 + dbvalue.0 1200 + } + } + control.16 { + iface MIXER + name 'Capture Mux' + value MIC_IN + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 MIC_IN + item.1 LINE_IN + } + } + control.17 { + iface MIXER + name 'Headphone Mux' + value DAC + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 DAC + item.1 LINE_IN + } + } +} |