From 3254e04c3dee282972070dd5ab0355f1aca61c0a Mon Sep 17 00:00:00 2001 From: Philippe Schenker Date: Fri, 29 Mar 2019 17:13:25 +0100 Subject: alsa: apalis-tk1-mainline: add initial asound.state and asound.conf Signed-off-by: Philippe Schenker (cherry picked from commit 0f59e154bfebd18f4f9eb11a31912ad5cb7e0c93) --- .../alsa-state/apalis-tk1-mainline/asound.state | 560 +++++++++++++++++++++ .../0001-alsa-conf-select-default-soundcard.patch | 30 ++ recipes-multimedia/alsa/alsa-lib_%.bbappend | 3 + 3 files changed, 593 insertions(+) create mode 100644 recipes-bsp/alsa-state/alsa-state/apalis-tk1-mainline/asound.state create mode 100644 recipes-multimedia/alsa/alsa-lib/0001-alsa-conf-select-default-soundcard.patch create mode 100644 recipes-multimedia/alsa/alsa-lib_%.bbappend diff --git a/recipes-bsp/alsa-state/alsa-state/apalis-tk1-mainline/asound.state b/recipes-bsp/alsa-state/alsa-state/apalis-tk1-mainline/asound.state new file mode 100644 index 0000000..146c8bc --- /dev/null +++ b/recipes-bsp/alsa-state/alsa-state/apalis-tk1-mainline/asound.state @@ -0,0 +1,560 @@ +state.SGTL5000 { + control.1 { + iface MIXER + name 'PCM Playback Volume' + value.0 126 + value.1 126 + 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 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 2' + dbmin -600 + dbmax 600 + dbvalue.0 -600 + } + } + 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 127 + value.1 127 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 127' + dbmin -5150 + dbmax 1200 + dbvalue.0 1200 + dbvalue.1 1200 + } + } + control.6 { + iface MIXER + name 'Headphone Playback ZC Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.7 { + iface MIXER + name 'Mic Volume' + value 2 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + dbmin 0 + dbmax 4000 + dbvalue.0 3000 + } + } + control.8 { + iface MIXER + name 'Headphone Mux' + value DAC + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 DAC + item.1 LINE_IN + } + } + control.9 { + 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.10 { + iface MIXER + name 'AVP alsa device select' + value -1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 6' + } + } + control.11 { + iface MIXER + name 'AVP DMA channel id' + value 0 + comment { + access read + type INTEGER + count 1 + range '0 - 32' + } + } + control.12 { + iface MIXER + name 'AVP DMA address' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - -1' + } + } + control.13 { + iface MIXER + name 'Headset Plug State' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.14 { + iface MIXER + name 'I2S LoopBack' + value Off + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Off + item.1 On + } + } +} +state.Tegra { + control.1 { + iface CARD + name 'HDMI/DP,pcm=3 Jack' + value false + comment { + access read + type BOOLEAN + count 1 + } + } + control.2 { + iface MIXER + name 'IEC958 Playback Con Mask' + value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access read + type IEC958 + count 1 + } + } + control.3 { + iface MIXER + name 'IEC958 Playback Pro Mask' + value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access read + type IEC958 + count 1 + } + } + control.4 { + iface MIXER + name 'IEC958 Playback Default' + value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access 'read write' + type IEC958 + count 1 + } + } + control.5 { + iface MIXER + name 'IEC958 Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.6 { + iface MIXER + name 'HDA Decode Capability' + value 0 + comment { + access read + type INTEGER + count 1 + range '0 - -1' + } + } + control.7 { + iface MIXER + name 'HDA Maximum PCM Channels' + value 0 + comment { + access read + type INTEGER + count 1 + range '0 - -1' + } + } + control.8 { + iface PCM + device 3 + name ELD + value '' + comment { + access 'read volatile' + type BYTES + count 0 + } + } + control.9 { + iface PCM + device 3 + name 'Playback Channel Map' + value.0 0 + value.1 0 + value.2 0 + value.3 0 + value.4 0 + value.5 0 + value.6 0 + value.7 0 + comment { + access 'read write' + type INTEGER + count 8 + range '0 - 36' + } + } +} +state.tegrahda { + control.1 { + iface CARD + name 'HDMI/DP,pcm=3 Jack' + value false + comment { + access read + type BOOLEAN + count 1 + } + } + control.2 { + iface MIXER + name 'IEC958 Playback Con Mask' + value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access read + type IEC958 + count 1 + } + } + control.3 { + iface MIXER + name 'IEC958 Playback Pro Mask' + value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access read + type IEC958 + count 1 + } + } + control.4 { + iface MIXER + name 'IEC958 Playback Default' + value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access 'read write' + type IEC958 + count 1 + } + } + control.5 { + iface MIXER + name 'IEC958 Playback Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.6 { + iface PCM + device 3 + name ELD + value '' + comment { + access 'read volatile' + type BYTES + count 0 + } + } + control.7 { + iface PCM + device 3 + name 'Playback Channel Map' + value.0 0 + value.1 0 + value.2 0 + value.3 0 + value.4 0 + value.5 0 + value.6 0 + value.7 0 + comment { + access 'read write' + type INTEGER + count 8 + range '0 - 36' + } + } +} +state.TK1 { + 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 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.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 0 + 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 true + 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 + } + } +} diff --git a/recipes-multimedia/alsa/alsa-lib/0001-alsa-conf-select-default-soundcard.patch b/recipes-multimedia/alsa/alsa-lib/0001-alsa-conf-select-default-soundcard.patch new file mode 100644 index 0000000..ce18242 --- /dev/null +++ b/recipes-multimedia/alsa/alsa-lib/0001-alsa-conf-select-default-soundcard.patch @@ -0,0 +1,30 @@ +From 6d812a2c9b586be635fa430ebaa1c0e60dfa1b2d Mon Sep 17 00:00:00 2001 +From: Philippe Schenker +Date: Fri, 29 Mar 2019 15:24:23 +0100 +Subject: [PATCH] alsa-conf: select default soundcard + +Select sound card 1 as the default one. + +Signed-off-by: Philippe Schenker +--- + src/conf/alsa.conf | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf +index 09980586..8e7c84d6 100644 +--- a/src/conf/alsa.conf ++++ b/src/conf/alsa.conf +@@ -59,8 +59,8 @@ defaults.namehint.basic on + # show extended name hints + defaults.namehint.extended off + # +-defaults.ctl.card 0 +-defaults.pcm.card 0 ++defaults.ctl.card 1 ++defaults.pcm.card 1 + defaults.pcm.device 0 + defaults.pcm.subdevice -1 + defaults.pcm.nonblock 1 +-- +2.21.0 + diff --git a/recipes-multimedia/alsa/alsa-lib_%.bbappend b/recipes-multimedia/alsa/alsa-lib_%.bbappend new file mode 100644 index 0000000..9d174f1 --- /dev/null +++ b/recipes-multimedia/alsa/alsa-lib_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append = "file://0001-alsa-conf-select-default-soundcard.patch" -- cgit v1.2.3