summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/machine/include/rpi-base.inc1
-rw-r--r--docs/extra-build-config.md21
-rw-r--r--recipes-bsp/bootfiles/rpi-config_git.bb8
-rw-r--r--recipes-kernel/linux/files/wm8960.cfg2
-rw-r--r--recipes-kernel/linux/linux-raspberrypi.inc1
5 files changed, 33 insertions, 0 deletions
diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
index a800078..75c3727 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -50,6 +50,7 @@ RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \
50 overlays/vc4-kms-dsi-7inch.dtbo \ 50 overlays/vc4-kms-dsi-7inch.dtbo \
51 overlays/w1-gpio.dtbo \ 51 overlays/w1-gpio.dtbo \
52 overlays/w1-gpio-pullup.dtbo \ 52 overlays/w1-gpio-pullup.dtbo \
53 overlays/wm8960-soundcard.dtbo \
53 " 54 "
54 55
55RPI_KERNEL_DEVICETREE ?= " \ 56RPI_KERNEL_DEVICETREE ?= " \
diff --git a/docs/extra-build-config.md b/docs/extra-build-config.md
index 1caf904..ec3bd6a 100644
--- a/docs/extra-build-config.md
+++ b/docs/extra-build-config.md
@@ -349,3 +349,24 @@ Also, this will enable adding Contiguous Memory Allocation value in the cmdline.
349Ref.: 349Ref.:
350* <https://github.com/raspberrypi/documentation/blob/master/linux/software/libcamera/README.md> 350* <https://github.com/raspberrypi/documentation/blob/master/linux/software/libcamera/README.md>
351* <https://www.raspberrypi.org/blog/an-open-source-camera-stack-for-raspberry-pi-using-libcamera/> 351* <https://www.raspberrypi.org/blog/an-open-source-camera-stack-for-raspberry-pi-using-libcamera/>
352
353## WM8960 soundcard support
354
355Support for WM8960 based sound cards such as the WM8960 Hi-Fi Sound Card HAT for Raspberry Pi from Waveshare, and ReSpeaker 2 / 4 / 6 Mics Pi HAT from Seeed Studio, can be enabled in `local.conf`
356
357 ```conf
358 MACHINE_FEATURES += "wm8960"
359 ```
360
361You may need to adjust volume and toggle switches that are off by default
362
363 ```bash
364 amixer -c1 sset 'Headphone',0 80%,80%
365 amixer -c1 sset 'Speaker',0 80%,80%
366 amixer -c1 sset 'Left Input Mixer Boost' toggle
367 amixer -c1 sset 'Left Output Mixer PCM' toggle
368 amixer -c1 sset 'Right Input Mixer Boost' toggle
369 amixer -c1 sset 'Right Output Mixer PCM' toggle
370 ```
371
372Audio capture on ReSpeaker 2 / 4 / 6 Mics Pi HAT from Seeed Studio is very noisy.
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
index 052206a..e84456c 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -30,6 +30,8 @@ GPIO_IR_TX ?= "17"
30 30
31CAN_OSCILLATOR ?= "16000000" 31CAN_OSCILLATOR ?= "16000000"
32 32
33WM8960="${@bb.utils.contains("MACHINE_FEATURES", "wm8960", "1", "0", d)}"
34
33inherit deploy nopackages 35inherit deploy nopackages
34 36
35do_deploy() { 37do_deploy() {
@@ -251,6 +253,12 @@ do_deploy() {
251 ;; 253 ;;
252 esac 254 esac
253 fi 255 fi
256
257 # WM8960 support
258 if [ "${WM8960}" = "1" ]; then
259 echo "# Enable WM8960" >> $CONFIG
260 echo "dtoverlay=wm8960-soundcard" >> $CONFIG
261 fi
254} 262}
255 263
256do_deploy_append_raspberrypi3-64() { 264do_deploy_append_raspberrypi3-64() {
diff --git a/recipes-kernel/linux/files/wm8960.cfg b/recipes-kernel/linux/files/wm8960.cfg
new file mode 100644
index 0000000..9360800
--- /dev/null
+++ b/recipes-kernel/linux/files/wm8960.cfg
@@ -0,0 +1,2 @@
1CONFIG_I2C_BCM2835=y
2CONFIG_SND_SOC_WM8960=y
diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc
index 5ad9b78..683253c 100644
--- a/recipes-kernel/linux/linux-raspberrypi.inc
+++ b/recipes-kernel/linux/linux-raspberrypi.inc
@@ -14,6 +14,7 @@ require recipes-kernel/linux/linux-yocto.inc
14SRC_URI += " \ 14SRC_URI += " \
15 ${@bb.utils.contains("INITRAMFS_IMAGE_BUNDLE", "1", "file://initramfs-image-bundle.cfg", "", d)} \ 15 ${@bb.utils.contains("INITRAMFS_IMAGE_BUNDLE", "1", "file://initramfs-image-bundle.cfg", "", d)} \
16 ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "file://vc4graphics.cfg", "", d)} \ 16 ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "file://vc4graphics.cfg", "", d)} \
17 ${@bb.utils.contains("MACHINE_FEATURES", "wm8960", "file://wm8960.cfg", "", d)} \
17 " 18 "
18 19
19KCONFIG_MODE = "--alldefconfig" 20KCONFIG_MODE = "--alldefconfig"