From ee06c1bf0e1d4f813e2bf10446fc8e76d28ca4d9 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Wed, 9 Feb 2022 16:52:56 +0100 Subject: [PATCH] alsa: add alsa support for CCMP15 Signed-off-by: Mike Engel --- .../alsa-state/alsa-state.bbappend | 1 + .../alsa-state/alsa-state/ccmp15/asound.conf | 18 ++ .../alsa-state/alsa-state/ccmp15/asound.state | 198 ++++++++++++++++++ 3 files changed, 217 insertions(+) create mode 100644 meta-digi-arm/recipes-bsp/alsa-state/alsa-state/ccmp15/asound.conf create mode 100644 meta-digi-arm/recipes-bsp/alsa-state/alsa-state/ccmp15/asound.state diff --git a/meta-digi-arm/recipes-bsp/alsa-state/alsa-state.bbappend b/meta-digi-arm/recipes-bsp/alsa-state/alsa-state.bbappend index 695f9fd07..f4654b75f 100644 --- a/meta-digi-arm/recipes-bsp/alsa-state/alsa-state.bbappend +++ b/meta-digi-arm/recipes-bsp/alsa-state/alsa-state.bbappend @@ -13,6 +13,7 @@ SRC_URI_append_ccimx6 = " \ SRC_URI_append_ccimx6ul = " file://asound.state" SRC_URI_append_ccimx8x = " file://asound.state" SRC_URI_append_ccimx8m = " file://asound.state" +SRC_URI_append_ccmp15 = " file://asound.state" do_install_append_ccimx6() { ln -sf asound.micro_play.state ${D}${localstatedir}/lib/alsa/asound.state diff --git a/meta-digi-arm/recipes-bsp/alsa-state/alsa-state/ccmp15/asound.conf b/meta-digi-arm/recipes-bsp/alsa-state/alsa-state/ccmp15/asound.conf new file mode 100644 index 000000000..16a72be22 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/alsa-state/alsa-state/ccmp15/asound.conf @@ -0,0 +1,18 @@ +pcm.!playback_codec { + type hw + card CCMP15DVK + device 0 +} + +pcm.!record_codec { + type hw + card CCMP15DVK + device 1 +} + +pcm.!playback_hdmi { + type hw + card CCMP15DVK + device 2 +} + diff --git a/meta-digi-arm/recipes-bsp/alsa-state/alsa-state/ccmp15/asound.state b/meta-digi-arm/recipes-bsp/alsa-state/alsa-state/ccmp15/asound.state new file mode 100644 index 000000000..7d5c041c8 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/alsa-state/alsa-state/ccmp15/asound.state @@ -0,0 +1,198 @@ +state.STM32MP15DK { + control.1 { + iface MIXER + name 'PCM Playback Volume' + value.0 63 + value.1 63 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 127' + dbmin -5150 + dbmax 1200 + dbvalue.0 -2000 + dbvalue.1 -2000 + } + } + control.2 { + iface MIXER + name 'PCM Playback Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.3 { + iface MIXER + name 'Analog Playback Volume' + value.0 204 + value.1 204 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 228' + dbmin -10200 + dbmax 1200 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.4 { + iface MIXER + name 'ADC Mixer Volume' + value.0 103 + value.1 103 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 127' + dbmin -5150 + dbmax 1200 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.5 { + iface MIXER + name 'ADC Mixer Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.6 { + iface MIXER + name 'Playback Deemphasis Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.7 { + iface MIXER + name 'Auto-Mute Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.8 { + iface MIXER + name 'Soft Ramp Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.9 { + iface MIXER + name 'Zero Cross Switch' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 0' + } + } + control.10 { + iface MIXER + name 'Mic Boost Volume' + value.0 1 + value.1 1 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 1' + dbmin 1600 + dbmax 3200 + dbvalue.0 3200 + dbvalue.1 3200 + } + } + control.11 { + iface MIXER + name 'Bass Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + dbmin -1050 + dbmax 1200 + dbvalue.0 0 + } + } + control.12 { + iface MIXER + name 'Treble Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + dbmin -1050 + dbmax 1200 + dbvalue.0 0 + } + } + control.13 { + iface MIXER + name 'PCM channel mixer' + value 'L R' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'L R' + item.1 L+R + item.2 'R L' + } + } + control.14 { + iface MIXER + name 'PGA-ADC Mux Left' + value 'MIC+preamp Left' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'AIN1 Left' + item.1 'AIN2 Left' + item.2 'MIC Left' + item.3 'MIC+preamp Left' + } + } + control.15 { + iface MIXER + name 'PGA-ADC Mux Right' + value 'AIN1 Right' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'AIN1 Right' + item.1 'AIN2 Right' + item.2 'MIC Right' + item.3 'MIC+preamp Right' + } + } +}