Move alsa-state recipe to common folder
authorHugo Villeneuve <hugo@hugovil.com>
Sun, 22 Jan 2023 20:24:11 +0000 (15:24 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Wed, 1 Mar 2023 17:10:15 +0000 (12:10 -0500)
Can potentially be used by all machines.

raspberrypi/recipes-bsp/alsa-state/alsa-state.bbappend [deleted file]
raspberrypi/recipes-bsp/alsa-state/alsa-state/asound.state [deleted file]
recipes-bsp/alsa-state/alsa-state.bbappend [new file with mode: 0644]
recipes-bsp/alsa-state/alsa-state/raspberrypi/asound.state [new file with mode: 0644]

diff --git a/raspberrypi/recipes-bsp/alsa-state/alsa-state.bbappend b/raspberrypi/recipes-bsp/alsa-state/alsa-state.bbappend
deleted file mode 100644 (file)
index 84de203..0000000
+++ /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 (file)
index 399860b..0000000
+++ /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 (file)
index 0000000..fd004e2
--- /dev/null
@@ -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 (file)
index 0000000..399860b
--- /dev/null
@@ -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
+               }
+       }
+}