diff --git a/recipes-bsp/alsa/alsa-state-stm32mp1.bb b/recipes-bsp/alsa/alsa-state-stm32mp1.bb new file mode 100644 index 0000000..4674aeb --- /dev/null +++ b/recipes-bsp/alsa/alsa-state-stm32mp1.bb @@ -0,0 +1,79 @@ +# Copyright (C) 2018, STMicroelectronics - All Rights Reserved +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Alsa scenario files to enable alsa state restoration" +HOMEPAGE = "http://www.alsa-project.org/" +DESCRIPTION = "Alsa Scenario Files - an init script and state files to restore \ +sound state at system boot and save it at system shut down." +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +PV = "1.0" + +SRC_URI = "" + +# Machine generic +SRC_URI_append_stm32mp1 = " \ + file://asound-stm32mp157c-ev.conf \ + file://asound-stm32mp157c-dk.conf \ + \ + file://asound-stm32mp157c-ev.state \ + file://asound-stm32mp157c-dk.state \ + \ + file://system-generator-alsa-states \ + file://system-generator-alsa-conf \ + " + +# Machine board specific +SRC_URI_append_stm32mp1-eval = " \ + file://asound-stm32mp157c-ev.conf \ + file://asound-stm32mp157c-ev.state \ + " +SRC_URI_append_stm32mp1-disco = " \ + file://asound-stm32mp157c-dk.conf \ + file://asound-stm32mp157c-dk.state \ + " + +S = "${WORKDIR}" + +COMPATIBLE_MACHINE = "(stm32mpcommon)" +RDEPENDS_${PN} = "alsa-state" + +do_install() { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/*.conf ${D}${sysconfdir}/ + install -d ${D}/${localstatedir}/lib/alsa + install -m 0644 ${WORKDIR}/*.state ${D}${localstatedir}/lib/alsa + + # Enable systemd automatic selection + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system-generators/ + if [ -f ${WORKDIR}/system-generator-alsa-states ]; then + install -m 0755 ${WORKDIR}/system-generator-alsa-states ${D}${systemd_unitdir}/system-generators/ + fi + if [ -f ${WORKDIR}/system-generator-alsa-conf ]; then + install -m 0755 ${WORKDIR}/system-generator-alsa-conf ${D}${systemd_unitdir}/system-generators/ + fi + fi +} + +pkg_postinst_${PN}_stm32mp1-eval() { + if test -z "$D" + then + if test -x ${sbindir}/alsactl + then + ${sbindir}/alsactl -f ${localstatedir}/lib/alsa/asound-stm32mp157c-ev.state restore + fi + fi +} +pkg_postinst_${PN}_stm32mp1-disco() { + if test -z "$D" + then + if test -x ${sbindir}/alsactl + then + ${sbindir}/alsactl -f ${localstatedir}/lib/alsa/asound-stm32mp157c-dk.state restore + fi + fi +} + +FILES_${PN} = "${localstatedir}/lib/alsa/*.state ${systemd_unitdir}/system-generators ${sysconfdir}/*.conf " diff --git a/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-dk.conf b/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-dk.conf new file mode 100644 index 0000000..71ad00d --- /dev/null +++ b/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-dk.conf @@ -0,0 +1,17 @@ +pcm.!playback_codec { + type hw + card STM32MP1DK + device 0 +} + +pcm.!record_codec { + type hw + card STM32MP1DK + device 1 +} + +pcm.!playback_hdmi { + type hw + card STM32MP1DK + device 2 +} diff --git a/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-dk.state b/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-dk.state new file mode 100644 index 0000000..009fc2a --- /dev/null +++ b/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-dk.state @@ -0,0 +1,198 @@ +state.STM32MP1DK { + 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' + } + } +} diff --git a/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-ev.conf b/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-ev.conf new file mode 100644 index 0000000..a33782d --- /dev/null +++ b/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-ev.conf @@ -0,0 +1,47 @@ +pcm.!playback_codec { + type hw + card STM32MP1EV + device 0 +} + +pcm.!record_codec { + type hw + card STM32MP1EV + device 1 +} + +pcm.!playback_spdif { + type hw + card STM32MP1EV + device 2 +} + +pcm.!record_spdif { + type hw + card STM32MP1EV + device 3 +} + +pcm.!record_dfsdm0 { + type hw + card STM32MP1EV + device 4 +} + +pcm.!record_dfsdm1 { + type hw + card STM32MP1EV + device 5 +} + +pcm.!record_dfsdm2 { + type hw + card STM32MP1EV + device 6 +} + +pcm.!record_dfsdm3 { + type hw + card STM32MP1EV + device 7 +} diff --git a/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-ev.state b/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-ev.state new file mode 100644 index 0000000..3742145 --- /dev/null +++ b/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-ev.state @@ -0,0 +1,2794 @@ +state.STM32MP1EV { + control.1 { + iface MIXER + name 'AIF1.1 DRC' + value '00980845000000000000' + comment { + access 'read write' + type BYTES + count 10 + } + } + control.2 { + iface MIXER + name 'AIF1.2 DRC' + value '00980845000000000000' + comment { + access 'read write' + type BYTES + count 10 + } + } + control.3 { + iface MIXER + name 'AIF2 DRC' + value '00980845000000000000' + comment { + access 'read write' + type BYTES + count 10 + } + } + control.4 { + iface MIXER + name 'AIF1DAC1 EQ1 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.5 { + iface MIXER + name 'AIF1DAC1 EQ2 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.6 { + iface MIXER + name 'AIF1DAC1 EQ3 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.7 { + iface MIXER + name 'AIF1DAC1 EQ4 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.8 { + iface MIXER + name 'AIF1DAC1 EQ5 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.9 { + iface MIXER + name 'AIF1DAC2 EQ1 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.10 { + iface MIXER + name 'AIF1DAC2 EQ2 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.11 { + iface MIXER + name 'AIF1DAC2 EQ3 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.12 { + iface MIXER + name 'AIF1DAC2 EQ4 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.13 { + iface MIXER + name 'AIF1DAC2 EQ5 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.14 { + iface MIXER + name 'AIF2 EQ1 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.15 { + iface MIXER + name 'AIF2 EQ2 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.16 { + iface MIXER + name 'AIF2 EQ3 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.17 { + iface MIXER + name 'AIF2 EQ4 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.18 { + iface MIXER + name 'AIF2 EQ5 Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1200 + dbmax 1900 + dbvalue.0 0 + } + } + control.19 { + iface MIXER + name 'IN1L Volume' + value 25 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1650 + dbmax 3000 + dbvalue.0 2100 + } + } + control.20 { + iface MIXER + name 'IN1L Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.21 { + iface MIXER + name 'IN1L ZC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.22 { + iface MIXER + name 'IN1R Volume' + value 11 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1650 + dbmax 3000 + dbvalue.0 0 + } + } + control.23 { + iface MIXER + name 'IN1R Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.24 { + iface MIXER + name 'IN1R ZC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.25 { + iface MIXER + name 'IN2L Volume' + value 11 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1650 + dbmax 3000 + dbvalue.0 0 + } + } + control.26 { + iface MIXER + name 'IN2L Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.27 { + iface MIXER + name 'IN2L ZC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.28 { + iface MIXER + name 'IN2R Volume' + value 11 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -1650 + dbmax 3000 + dbvalue.0 0 + } + } + control.29 { + iface MIXER + name 'IN2R Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.30 { + iface MIXER + name 'IN2R ZC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.31 { + iface MIXER + name 'MIXINL IN2L Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin 0 + dbmax 3000 + dbvalue.0 0 + } + } + control.32 { + iface MIXER + name 'MIXINL IN1L Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin 0 + dbmax 3000 + dbvalue.0 3000 + } + } + control.33 { + iface MIXER + name 'MIXINL Output Record Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -9999999 + dbmax 600 + dbvalue.0 -9999999 + } + } + control.34 { + iface MIXER + name 'MIXINL IN1LP Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -9999999 + dbmax 600 + dbvalue.0 -9999999 + } + } + control.35 { + iface MIXER + name 'MIXINL Direct Voice Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 6' + dbmin -9999999 + dbmax 300 + dbvalue.0 -9999999 + } + } + control.36 { + iface MIXER + name 'MIXINR IN2R Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin 0 + dbmax 3000 + dbvalue.0 0 + } + } + control.37 { + iface MIXER + name 'MIXINR IN1R Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin 0 + dbmax 3000 + dbvalue.0 0 + } + } + control.38 { + iface MIXER + name 'MIXINR Output Record Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -9999999 + dbmax 600 + dbvalue.0 -9999999 + } + } + control.39 { + iface MIXER + name 'MIXINR IN1RP Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -9999999 + dbmax 600 + dbvalue.0 -9999999 + } + } + control.40 { + iface MIXER + name 'MIXINR Direct Voice Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 6' + dbmin -9999999 + dbmax 300 + dbvalue.0 -9999999 + } + } + control.41 { + iface MIXER + name 'Left Output Mixer IN2RN Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.42 { + iface MIXER + name 'Left Output Mixer IN2LN Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.43 { + iface MIXER + name 'Left Output Mixer IN2LP Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.44 { + iface MIXER + name 'Left Output Mixer IN1L Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.45 { + iface MIXER + name 'Left Output Mixer IN1R Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.46 { + iface MIXER + name 'Left Output Mixer Right Input Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.47 { + iface MIXER + name 'Left Output Mixer Left Input Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.48 { + iface MIXER + name 'Left Output Mixer DAC Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.49 { + iface MIXER + name 'Right Output Mixer IN2LN Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.50 { + iface MIXER + name 'Right Output Mixer IN2RN Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.51 { + iface MIXER + name 'Right Output Mixer IN1L Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.52 { + iface MIXER + name 'Right Output Mixer IN1R Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.53 { + iface MIXER + name 'Right Output Mixer IN2RP Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.54 { + iface MIXER + name 'Right Output Mixer Left Input Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.55 { + iface MIXER + name 'Right Output Mixer Right Input Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.56 { + iface MIXER + name 'Right Output Mixer DAC Volume' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 0 + } + } + control.57 { + iface MIXER + name 'Output Volume' + value.0 57 + value.1 57 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 63' + dbmin -5700 + dbmax 600 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.58 { + iface MIXER + name 'Output Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.59 { + iface MIXER + name 'Output ZC Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.60 { + iface MIXER + name 'Earpiece Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.61 { + iface MIXER + name 'Earpiece Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin -600 + dbmax 0 + dbvalue.0 0 + } + } + control.62 { + iface MIXER + name 'SPKL Input Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin -300 + dbmax 0 + dbvalue.0 0 + } + } + control.63 { + iface MIXER + name 'SPKL IN1LP Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin -300 + dbmax 0 + dbvalue.0 0 + } + } + control.64 { + iface MIXER + name 'SPKL Output Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin -300 + dbmax 0 + dbvalue.0 0 + } + } + control.65 { + iface MIXER + name 'SPKR Input Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin -300 + dbmax 0 + dbvalue.0 0 + } + } + control.66 { + iface MIXER + name 'SPKR IN1RP Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin -300 + dbmax 0 + dbvalue.0 0 + } + } + control.67 { + iface MIXER + name 'SPKR Output Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin -300 + dbmax 0 + dbvalue.0 0 + } + } + control.68 { + iface MIXER + name 'Speaker Mixer Volume' + value.0 0 + value.1 0 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 3' + dbmin -9999999 + dbmax 0 + dbvalue.0 -9999999 + dbvalue.1 -9999999 + } + } + control.69 { + iface MIXER + name 'Speaker Volume' + value.0 57 + value.1 57 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 63' + dbmin -5700 + dbmax 600 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.70 { + iface MIXER + name 'Speaker Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.71 { + iface MIXER + name 'Speaker ZC Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.72 { + iface MIXER + name 'Speaker Boost Volume' + value.0 0 + value.1 0 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 7' + dbmin 0 + dbmax 1200 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.73 { + iface MIXER + name 'Speaker Reference' + value SPKVDD/2 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 SPKVDD/2 + item.1 VMID + } + } + control.74 { + iface MIXER + name 'Speaker Mode' + value 'Class D' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'Class D' + item.1 'Class AB' + } + } + control.75 { + iface MIXER + name 'Headphone Volume' + value.0 63 + value.1 63 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 63' + dbmin -5700 + dbmax 600 + dbvalue.0 600 + dbvalue.1 600 + } + } + control.76 { + iface MIXER + name 'Headphone Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.77 { + iface MIXER + name 'Headphone ZC Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.78 { + iface MIXER + name 'LINEOUT1N Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.79 { + iface MIXER + name 'LINEOUT1P Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.80 { + iface MIXER + name 'LINEOUT1 Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin -600 + dbmax 0 + dbvalue.0 0 + } + } + control.81 { + iface MIXER + name 'LINEOUT2N Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.82 { + iface MIXER + name 'LINEOUT2P Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.83 { + iface MIXER + name 'LINEOUT2 Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin -600 + dbmax 0 + dbvalue.0 0 + } + } + control.84 { + iface MIXER + name 'AIF1ADC1 Volume' + value.0 96 + value.1 96 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 119' + dbmin -9999999 + dbmax 1725 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.85 { + iface MIXER + name 'AIF1ADC2 Volume' + value.0 96 + value.1 96 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 119' + dbmin -9999999 + dbmax 1725 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.86 { + iface MIXER + name 'AIF2ADC Volume' + value.0 96 + value.1 96 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 119' + dbmin -9999999 + dbmax 1725 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.87 { + iface MIXER + name 'AIF1ADCL Source' + value Left + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Left + item.1 Right + } + } + control.88 { + iface MIXER + name 'AIF1ADCR Source' + value Right + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Left + item.1 Right + } + } + control.89 { + iface MIXER + name 'AIF2ADCL Source' + value Left + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Left + item.1 Right + } + } + control.90 { + iface MIXER + name 'AIF2ADCR Source' + value Right + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Left + item.1 Right + } + } + control.91 { + iface MIXER + name 'AIF1DACL Source' + value Left + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Left + item.1 Right + } + } + control.92 { + iface MIXER + name 'AIF1DACR Source' + value Right + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Left + item.1 Right + } + } + control.93 { + iface MIXER + name 'AIF2DACL Source' + value Left + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Left + item.1 Right + } + } + control.94 { + iface MIXER + name 'AIF2DACR Source' + value Right + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Left + item.1 Right + } + } + control.95 { + iface MIXER + name 'AIF1DAC1 Volume' + value.0 96 + value.1 96 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 96' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.96 { + iface MIXER + name 'AIF1DAC2 Volume' + value.0 96 + value.1 96 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 96' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.97 { + iface MIXER + name 'AIF2DAC Volume' + value.0 96 + value.1 96 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 96' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.98 { + iface MIXER + name 'AIF1 Boost Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + dbmin 0 + dbmax 1800 + dbvalue.0 0 + } + } + control.99 { + iface MIXER + name 'AIF2 Boost Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + dbmin 0 + dbmax 1800 + dbvalue.0 600 + } + } + control.100 { + iface MIXER + name 'AIF1DAC1 EQ Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.101 { + iface MIXER + name 'AIF1DAC2 EQ Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.102 { + iface MIXER + name 'AIF2 EQ Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.103 { + iface MIXER + name 'AIF1DAC1 DRC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.104 { + iface MIXER + name 'AIF1ADC1L DRC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.105 { + iface MIXER + name 'AIF1ADC1R DRC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.106 { + iface MIXER + name 'AIF1DAC2 DRC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.107 { + iface MIXER + name 'AIF1ADC2L DRC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.108 { + iface MIXER + name 'AIF1ADC2R DRC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.109 { + iface MIXER + name 'AIF2DAC DRC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.110 { + iface MIXER + name 'AIF2ADCL DRC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.111 { + iface MIXER + name 'AIF2ADCR DRC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.112 { + iface MIXER + name 'DAC1 Right Sidetone Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 12' + dbmin -3600 + dbmax 0 + dbvalue.0 -3600 + } + } + control.113 { + iface MIXER + name 'DAC1 Left Sidetone Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 12' + dbmin -3600 + dbmax 0 + dbvalue.0 -3600 + } + } + control.114 { + iface MIXER + name 'DAC2 Right Sidetone Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 12' + dbmin -3600 + dbmax 0 + dbvalue.0 0 + } + } + control.115 { + iface MIXER + name 'DAC2 Left Sidetone Volume' + value 12 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 12' + dbmin -3600 + dbmax 0 + dbvalue.0 0 + } + } + control.116 { + iface MIXER + name 'Sidetone HPF Mux' + value '2.7kHz' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 '2.7kHz' + item.1 '1.35kHz' + item.2 '675Hz' + item.3 '370Hz' + item.4 '180Hz' + item.5 '90Hz' + item.6 '45Hz' + } + } + control.117 { + iface MIXER + name 'Sidetone HPF Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.118 { + iface MIXER + name 'AIF1ADC1 HPF Mode' + value HiFi + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 HiFi + item.1 'Voice 1' + item.2 'Voice 2' + item.3 'Voice 3' + } + } + control.119 { + iface MIXER + name 'AIF1ADC1 HPF Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.120 { + iface MIXER + name 'AIF1ADC2 HPF Mode' + value HiFi + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 HiFi + item.1 'Voice 1' + item.2 'Voice 2' + item.3 'Voice 3' + } + } + control.121 { + iface MIXER + name 'AIF1ADC2 HPF Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.122 { + iface MIXER + name 'AIF2ADC HPF Mode' + value HiFi + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 HiFi + item.1 'Voice 1' + item.2 'Voice 2' + item.3 'Voice 3' + } + } + control.123 { + iface MIXER + name 'AIF2ADC HPF Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.124 { + iface MIXER + name 'ADC OSR' + value 'Low Power' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'Low Power' + item.1 'High Performance' + } + } + control.125 { + iface MIXER + name 'DAC OSR' + value 'Low Power' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'Low Power' + item.1 'High Performance' + } + } + control.126 { + iface MIXER + name 'DAC1 Volume' + value.0 50 + value.1 50 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 96' + dbmin -9999999 + dbmax 0 + dbvalue.0 -3450 + dbvalue.1 -3450 + } + } + control.127 { + iface MIXER + name 'DAC1 Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.128 { + iface MIXER + name 'DAC2 Volume' + value.0 96 + value.1 96 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 96' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.129 { + iface MIXER + name 'DAC2 Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.130 { + iface MIXER + name 'SPKL DAC2 Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin -300 + dbmax 0 + dbvalue.0 0 + } + } + control.131 { + iface MIXER + name 'SPKL DAC1 Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin -300 + dbmax 0 + dbvalue.0 0 + } + } + control.132 { + iface MIXER + name 'SPKR DAC2 Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin -300 + dbmax 0 + dbvalue.0 0 + } + } + control.133 { + iface MIXER + name 'SPKR DAC1 Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 1' + dbmin -300 + dbmax 0 + dbvalue.0 0 + } + } + control.134 { + iface MIXER + name 'AIF1DAC1 3D Stereo Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + dbmin -1600 + dbmax 1145 + dbvalue.0 -1600 + } + } + control.135 { + iface MIXER + name 'AIF1DAC1 3D Stereo Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.136 { + iface MIXER + name 'AIF1DAC2 3D Stereo Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + dbmin -1600 + dbmax 1145 + dbvalue.0 -1600 + } + } + control.137 { + iface MIXER + name 'AIF1DAC2 3D Stereo Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.138 { + iface MIXER + name 'AIF2DAC 3D Stereo Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + dbmin -1600 + dbmax 1145 + dbvalue.0 -1600 + } + } + control.139 { + iface MIXER + name 'AIF2DAC 3D Stereo Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.140 { + iface PCM + name 'IEC958 Capture Default' + value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access 'read volatile' + type IEC958 + count 1 + } + } + control.141 { + iface PCM + name 'IEC958 User Bit Capture Default' + value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access 'read volatile' + type IEC958 + count 1 + } + } + control.142 { + iface MIXER + name 'SPDIFRX input' + value in1 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 in0 + item.1 in1 + item.2 in2 + item.3 in3 + } + } + control.143 { + iface MIXER + name 'SPDIFRX CS channel' + value A + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 A + item.1 B + } + } + control.144 { + iface MIXER + name 'IN1L PGA IN1LP Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.145 { + iface MIXER + name 'IN1L PGA IN1LN Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.146 { + iface MIXER + name 'IN1R PGA IN1RP Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.147 { + iface MIXER + name 'IN1R PGA IN1RN Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.148 { + iface MIXER + name 'IN2L PGA IN2LP Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.149 { + iface MIXER + name 'IN2L PGA IN2LN Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.150 { + iface MIXER + name 'IN2R PGA IN2RP Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.151 { + iface MIXER + name 'IN2R PGA IN2RN Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.152 { + iface MIXER + name 'MIXINL IN2L Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.153 { + iface MIXER + name 'MIXINL IN1L Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.154 { + iface MIXER + name 'MIXINR IN2R Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.155 { + iface MIXER + name 'MIXINR IN1R Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.156 { + iface MIXER + name 'Left Output Mixer Right Input Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.157 { + iface MIXER + name 'Left Output Mixer Left Input Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.158 { + iface MIXER + name 'Left Output Mixer IN2RN Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.159 { + iface MIXER + name 'Left Output Mixer IN2LN Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.160 { + iface MIXER + name 'Left Output Mixer IN2LP Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.161 { + iface MIXER + name 'Left Output Mixer IN1R Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.162 { + iface MIXER + name 'Left Output Mixer IN1L Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.163 { + iface MIXER + name 'Left Output Mixer DAC Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.164 { + iface MIXER + name 'Right Output Mixer Left Input Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.165 { + iface MIXER + name 'Right Output Mixer Right Input Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.166 { + iface MIXER + name 'Right Output Mixer IN2LN Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.167 { + iface MIXER + name 'Right Output Mixer IN2RN Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.168 { + iface MIXER + name 'Right Output Mixer IN1L Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.169 { + iface MIXER + name 'Right Output Mixer IN1R Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.170 { + iface MIXER + name 'Right Output Mixer IN2RP Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.171 { + iface MIXER + name 'Right Output Mixer DAC Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.172 { + iface MIXER + name 'Earpiece Mixer Direct Voice Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.173 { + iface MIXER + name 'Earpiece Mixer Left Output Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.174 { + iface MIXER + name 'Earpiece Mixer Right Output Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.175 { + iface MIXER + name 'SPKL Boost Direct Voice Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.176 { + iface MIXER + name 'SPKL Boost SPKL Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.177 { + iface MIXER + name 'SPKL Boost SPKR Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.178 { + iface MIXER + name 'SPKR Boost Direct Voice Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.179 { + iface MIXER + name 'SPKR Boost SPKL Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.180 { + iface MIXER + name 'SPKR Boost SPKR Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.181 { + iface MIXER + name 'LINEOUT1N Mixer Left Output Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.182 { + iface MIXER + name 'LINEOUT1N Mixer Right Output Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.183 { + iface MIXER + name 'LINEOUT1P Mixer Left Output Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.184 { + iface MIXER + name 'LINEOUT2N Mixer Left Output Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.185 { + iface MIXER + name 'LINEOUT2N Mixer Right Output Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.186 { + iface MIXER + name 'LINEOUT2P Mixer Right Output Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.187 { + iface MIXER + name 'AIF1ADC1L Mixer ADC/DMIC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.188 { + iface MIXER + name 'AIF1ADC1L Mixer AIF2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.189 { + iface MIXER + name 'AIF1ADC1R Mixer ADC/DMIC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.190 { + iface MIXER + name 'AIF1ADC1R Mixer AIF2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.191 { + iface MIXER + name 'AIF1ADC2L Mixer DMIC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.192 { + iface MIXER + name 'AIF1ADC2L Mixer AIF2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.193 { + iface MIXER + name 'AIF1ADC2R Mixer DMIC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.194 { + iface MIXER + name 'AIF1ADC2R Mixer AIF2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.195 { + iface MIXER + name 'AIF2DAC2L Mixer Right Sidetone Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.196 { + iface MIXER + name 'AIF2DAC2L Mixer Left Sidetone Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.197 { + iface MIXER + name 'AIF2DAC2L Mixer AIF2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.198 { + iface MIXER + name 'AIF2DAC2L Mixer AIF1.2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.199 { + iface MIXER + name 'AIF2DAC2L Mixer AIF1.1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.200 { + iface MIXER + name 'AIF2DAC2R Mixer Right Sidetone Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.201 { + iface MIXER + name 'AIF2DAC2R Mixer Left Sidetone Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.202 { + iface MIXER + name 'AIF2DAC2R Mixer AIF2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.203 { + iface MIXER + name 'AIF2DAC2R Mixer AIF1.2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.204 { + iface MIXER + name 'AIF2DAC2R Mixer AIF1.1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.205 { + iface MIXER + name 'Left Sidetone' + value ADC/DMIC1 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 ADC/DMIC1 + item.1 DMIC2 + } + } + control.206 { + iface MIXER + name 'Right Sidetone' + value ADC/DMIC1 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 ADC/DMIC1 + item.1 DMIC2 + } + } + control.207 { + iface MIXER + name 'DAC1L Mixer Right Sidetone Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.208 { + iface MIXER + name 'DAC1L Mixer Left Sidetone Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.209 { + iface MIXER + name 'DAC1L Mixer AIF2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.210 { + iface MIXER + name 'DAC1L Mixer AIF1.2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.211 { + iface MIXER + name 'DAC1L Mixer AIF1.1 Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.212 { + iface MIXER + name 'DAC1R Mixer Right Sidetone Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.213 { + iface MIXER + name 'DAC1R Mixer Left Sidetone Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.214 { + iface MIXER + name 'DAC1R Mixer AIF2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.215 { + iface MIXER + name 'DAC1R Mixer AIF1.2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.216 { + iface MIXER + name 'DAC1R Mixer AIF1.1 Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.217 { + iface MIXER + name 'AIF1DAC Mux' + value AIF1DACDAT + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 AIF1DACDAT + item.1 AIF3DACDAT + } + } + control.218 { + iface MIXER + name 'AIF2DAC Mux' + value AIF2DACDAT + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 AIF2DACDAT + item.1 AIF3DACDAT + } + } + control.219 { + iface MIXER + name 'AIF2ADC Mux' + value AIF2ADCDAT + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 AIF2ADCDAT + item.1 AIF3DACDAT + } + } + control.220 { + iface MIXER + name 'AIF1 Loopback' + value None + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 None + item.1 ADCDAT + } + } + control.221 { + iface MIXER + name 'AIF2 Loopback' + value None + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 None + item.1 ADCDAT + } + } + control.222 { + iface MIXER + name 'AIF3ADC Mux' + value AIF1ADCDAT + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 AIF1ADCDAT + item.1 AIF2ADCDAT + item.2 AIF2DACDAT + item.3 'Mono PCM' + } + } + control.223 { + iface MIXER + name 'SPKL DAC2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.224 { + iface MIXER + name 'SPKL Input Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.225 { + iface MIXER + name 'SPKL IN1LP Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.226 { + iface MIXER + name 'SPKL Output Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.227 { + iface MIXER + name 'SPKL DAC1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.228 { + iface MIXER + name 'SPKR DAC2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.229 { + iface MIXER + name 'SPKR Input Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.230 { + iface MIXER + name 'SPKR IN1RP Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.231 { + iface MIXER + name 'SPKR Output Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.232 { + iface MIXER + name 'SPKR DAC1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.233 { + iface MIXER + name 'Left Headphone Mux' + value Mixer + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Mixer + item.1 DAC + } + } + control.234 { + iface MIXER + name 'Right Headphone Mux' + value Mixer + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Mixer + item.1 DAC + } + } + control.235 { + iface MIXER + name 'ADCL Mux' + value ADC + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 ADC + item.1 DMIC + } + } + control.236 { + iface MIXER + name 'ADCR Mux' + value ADC + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 ADC + item.1 DMIC + } + } +} diff --git a/recipes-bsp/alsa/alsa-state-stm32mp1/system-generator-alsa-conf b/recipes-bsp/alsa/alsa-state-stm32mp1/system-generator-alsa-conf new file mode 100644 index 0000000..9b6a0a4 --- /dev/null +++ b/recipes-bsp/alsa/alsa-state-stm32mp1/system-generator-alsa-conf @@ -0,0 +1,62 @@ +#!/bin/sh + +# Script which detect automaticaly the alsa-conf file to put +# in place in function of board on which the script are executed. +# +# This script are use with systemd-generators +# see man for more information or +# https://www.freedesktop.org/software/systemd/man/systemd.generator.html +# +# How to debug: +# mkdir /tmp/normal-dir /tmp/early-dir /tmp/late-dir +# SYSTEMD_LOG_LEVEL=debug /lib/systemd/system-generators/system-generator-alsa-conf \ +# /tmp/normal-dir /tmp/early-dir /tmp/late-dir +# find /tmp/normal-dir /tmp/early-dir /tmp/late-dir +# +# +function debug_print() { + if `echo $SYSTEMD_LOG_LEVEL |grep -q debug` ; + then + echo "[DEBUG] $@" + fi +} + +# +# Main +# +if [ ! -d /proc/device-tree/ ]; +then + debug_print "Proc Device tree are not available, Could not detect on which board we are" + exit 1 +fi +if [ -e /etc/asound.conf ]; +then + LINE=`cat /etc/asound.conf | wc -l` + if [ $LINE -lt 3 ]; + then + # dummy asound.conf file contains only one comment + debug_print "remove previous dummy asound.conf file" + rm /etc/asound.conf + else + debug_print "asound.conf file already configured" + exit 0 + fi +fi +# get the name file available for alsa-conf +ALSA_CONF_FILES=`ls -1 /etc/asound-*` + +for f in $ALSA_CONF_FILES; +do + #extract name of board + board=`echo $f | sed -e "s|/etc/asound-\(.*\).conf|\1|"` + debug_print "board=$board" + #search on device tree compatible entry if the board are present + if `grep -q $board /proc/device-tree/compatible` ; + then + # device tree compatible entry match with board name + debug_print "use $f for asound.conf" + cp $f /etc/asound.conf + break; + fi +done +exit 0 diff --git a/recipes-bsp/alsa/alsa-state-stm32mp1/system-generator-alsa-states b/recipes-bsp/alsa/alsa-state-stm32mp1/system-generator-alsa-states new file mode 100644 index 0000000..0fbe272 --- /dev/null +++ b/recipes-bsp/alsa/alsa-state-stm32mp1/system-generator-alsa-states @@ -0,0 +1,66 @@ +#!/bin/sh + +# Script which detect automaticaly the alsa-states file to put +# in place in fuonction of board on which the script are executed. +# +# This script are use with systemd-generators +# see man for more information or +# https://www.freedesktop.org/software/systemd/man/systemd.generator.html +# +# How to debug: +# mkdir /tmp/normal-dir /tmp/early-dir /tmp/late-dir +# SYSTEMD_LOG_LEVEL=debug /lib/systemd/system-generators/system-generator-alsa-states \ +# /tmp/normal-dir /tmp/early-dir /tmp/late-dir +# find /tmp/normal-dir /tmp/early-dir /tmp/late-dir +# +# +function debug_print() { + if `echo $SYSTEMD_LOG_LEVEL |grep -q debug` ; + then + echo "[DEBUG] $@" + fi +} + +# +# Main +# +if [ ! -d /proc/device-tree/ ]; +then + debug_print "Proc Device tree are not available, Could not detect on which board we are" + exit 1 +fi +if [ -e /var/lib/alsa/asound.state ]; +then + LINE=`cat /var/lib/alsa/asound.state | wc -l` + if [ $LINE -lt 3 ]; + then + # dummy alsa-state file contains only one comment + debug_print "remove previous dummy alsa-state file" + rm /var/lib/alsa/asound.state + else + debug_print "alsa-state file already configured" + exit 0 + fi +fi +# get the name file available for alsa-states +ALSA_STATE_FILES=`ls -1 /var/lib/alsa/asound-*` + +for f in $ALSA_STATE_FILES; +do + #extract name of board + board=`echo $f | sed -e "s|/var/lib/alsa/asound-\(.*\).state|\1|"` + #search on device tree compatible entry if the board are present + if `grep -q $board /proc/device-tree/compatible` ; + then + # device tree compatible entry match with board name + # configure alsa-state + if test -x /usr/sbin/alsactl + then + debug_print "active alsactl with $f" + #/usr/sbin/alsactl -f $f restore + cp $f /var/lib/alsa/asound.state + break; + fi + fi +done +exit 0