From: Hugo Villeneuve Date: Fri, 20 Jan 2023 00:33:55 +0000 (-0500) Subject: rpi: add custom asound.state X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=6efce73cdd99f0407c4541ec60e991959378bec8;p=yocto%2Fmeta-hvmpd.git rpi: add custom asound.state To have a usable working volume near 100%. --- diff --git a/raspberrypi/recipes-bsp/alsa-state/alsa-state.bbappend b/raspberrypi/recipes-bsp/alsa-state/alsa-state.bbappend index 50dd875..84de203 100644 --- a/raspberrypi/recipes-bsp/alsa-state/alsa-state.bbappend +++ b/raspberrypi/recipes-bsp/alsa-state/alsa-state.bbappend @@ -1,3 +1,9 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append:raspberrypi = " \ + file://asound.state \ +" + do_install:append:raspberrypi() { echo "defaults.pcm.card 1" >> ${D}${sysconfdir}/asound.conf echo "defaults.ctl.card 1" >> ${D}${sysconfdir}/asound.conf diff --git a/raspberrypi/recipes-bsp/alsa-state/alsa-state/asound.state b/raspberrypi/recipes-bsp/alsa-state/alsa-state/asound.state new file mode 100644 index 0000000..399860b --- /dev/null +++ b/raspberrypi/recipes-bsp/alsa-state/alsa-state/asound.state @@ -0,0 +1,159 @@ +state.vc4hdmi { + control.1 { + iface PCM + 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 + type INTEGER + count 8 + range '0 - 36' + } + } + control.2 { + iface PCM + name 'IEC958 Playback Mask' + value ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + comment { + access read + type IEC958 + count 1 + } + } + control.3 { + iface PCM + name 'IEC958 Playback Default' + value '0400000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access 'read write' + type IEC958 + count 1 + } + } + control.4 { + iface PCM + name ELD + value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access 'read volatile' + type BYTES + count 128 + } + } +} +state.ALSA { + control.1 { + iface MIXER + name 'PCM Playback Volume' + value -10 + comment { + access 'read write' + type INTEGER + count 1 + range '-10239 - 400' + dbmin -9999999 + dbmax 400 + dbvalue.0 -10 + } + } + control.2 { + iface MIXER + name 'PCM Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.3 { + iface MIXER + name 'PCM Playback Route' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + } + } + control.4 { + iface PCM + name 'IEC958 Playback Default' + value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access 'read write' + type IEC958 + count 1 + } + } + control.5 { + iface PCM + name 'IEC958 Playback Con Mask' + value '0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access read + type IEC958 + count 1 + } + } +} +state.b1 { + control.1 { + iface MIXER + name 'HDMI Playback Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '-10239 - 400' + dbmin -9999999 + dbmax 400 + dbvalue.0 0 + } + } + control.2 { + iface MIXER + name 'HDMI Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } +} +state.Headphones { + control.1 { + iface MIXER + name 'Headphone Playback Volume' + value -2000 + comment { + access 'read write' + type INTEGER + count 1 + range '-10239 - 400' + dbmin -9999999 + dbmax 400 + dbvalue.0 -2000 + } + } + control.2 { + iface MIXER + name 'Headphone Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } +}