From: Hugo Villeneuve Date: Sun, 22 Jan 2023 20:24:11 +0000 (-0500) Subject: Move alsa-state recipe to common folder X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=0081ddecc2a5daeed30121f8d90d1bd69928a882;p=yocto%2Fmeta-hvmpd.git Move alsa-state recipe to common folder Can potentially be used by all machines. --- diff --git a/raspberrypi/recipes-bsp/alsa-state/alsa-state.bbappend b/raspberrypi/recipes-bsp/alsa-state/alsa-state.bbappend deleted file mode 100644 index 84de203..0000000 --- a/raspberrypi/recipes-bsp/alsa-state/alsa-state.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 399860b..0000000 --- a/raspberrypi/recipes-bsp/alsa-state/alsa-state/asound.state +++ /dev/null @@ -1,159 +0,0 @@ -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 - } - } -} diff --git a/recipes-bsp/alsa-state/alsa-state.bbappend b/recipes-bsp/alsa-state/alsa-state.bbappend new file mode 100644 index 0000000..fd004e2 --- /dev/null +++ b/recipes-bsp/alsa-state/alsa-state.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append = " \ + 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/recipes-bsp/alsa-state/alsa-state/raspberrypi/asound.state b/recipes-bsp/alsa-state/alsa-state/raspberrypi/asound.state new file mode 100644 index 0000000..399860b --- /dev/null +++ b/recipes-bsp/alsa-state/alsa-state/raspberrypi/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 + } + } +}