mirror of
git://git.yoctoproject.org/meta-raspberrypi.git
synced 2025-07-19 21:09:03 +02:00
Add WM8960 soundcard support
Signed-off-by: Devendra Tewari <devendra.tewari@gmail.com>
This commit is contained in:
parent
7057d5dcbf
commit
246555aea7
|
@ -50,6 +50,7 @@ RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \
|
||||||
overlays/vc4-kms-dsi-7inch.dtbo \
|
overlays/vc4-kms-dsi-7inch.dtbo \
|
||||||
overlays/w1-gpio.dtbo \
|
overlays/w1-gpio.dtbo \
|
||||||
overlays/w1-gpio-pullup.dtbo \
|
overlays/w1-gpio-pullup.dtbo \
|
||||||
|
overlays/wm8960-soundcard.dtbo \
|
||||||
"
|
"
|
||||||
|
|
||||||
RPI_KERNEL_DEVICETREE ?= " \
|
RPI_KERNEL_DEVICETREE ?= " \
|
||||||
|
|
|
@ -349,3 +349,24 @@ Also, this will enable adding Contiguous Memory Allocation value in the cmdline.
|
||||||
Ref.:
|
Ref.:
|
||||||
* <https://github.com/raspberrypi/documentation/blob/master/linux/software/libcamera/README.md>
|
* <https://github.com/raspberrypi/documentation/blob/master/linux/software/libcamera/README.md>
|
||||||
* <https://www.raspberrypi.org/blog/an-open-source-camera-stack-for-raspberry-pi-using-libcamera/>
|
* <https://www.raspberrypi.org/blog/an-open-source-camera-stack-for-raspberry-pi-using-libcamera/>
|
||||||
|
|
||||||
|
## WM8960 soundcard support
|
||||||
|
|
||||||
|
Support 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`
|
||||||
|
|
||||||
|
```conf
|
||||||
|
MACHINE_FEATURES += "wm8960"
|
||||||
|
```
|
||||||
|
|
||||||
|
You may need to adjust volume and toggle switches that are off by default
|
||||||
|
|
||||||
|
```bash
|
||||||
|
amixer -c1 sset 'Headphone',0 80%,80%
|
||||||
|
amixer -c1 sset 'Speaker',0 80%,80%
|
||||||
|
amixer -c1 sset 'Left Input Mixer Boost' toggle
|
||||||
|
amixer -c1 sset 'Left Output Mixer PCM' toggle
|
||||||
|
amixer -c1 sset 'Right Input Mixer Boost' toggle
|
||||||
|
amixer -c1 sset 'Right Output Mixer PCM' toggle
|
||||||
|
```
|
||||||
|
|
||||||
|
Audio capture on ReSpeaker 2 / 4 / 6 Mics Pi HAT from Seeed Studio is very noisy.
|
||||||
|
|
|
@ -30,6 +30,8 @@ GPIO_IR_TX ?= "17"
|
||||||
|
|
||||||
CAN_OSCILLATOR ?= "16000000"
|
CAN_OSCILLATOR ?= "16000000"
|
||||||
|
|
||||||
|
WM8960="${@bb.utils.contains("MACHINE_FEATURES", "wm8960", "1", "0", d)}"
|
||||||
|
|
||||||
inherit deploy nopackages
|
inherit deploy nopackages
|
||||||
|
|
||||||
do_deploy() {
|
do_deploy() {
|
||||||
|
@ -251,6 +253,12 @@ do_deploy() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# WM8960 support
|
||||||
|
if [ "${WM8960}" = "1" ]; then
|
||||||
|
echo "# Enable WM8960" >> $CONFIG
|
||||||
|
echo "dtoverlay=wm8960-soundcard" >> $CONFIG
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
do_deploy_append_raspberrypi3-64() {
|
do_deploy_append_raspberrypi3-64() {
|
||||||
|
|
2
recipes-kernel/linux/files/wm8960.cfg
Normal file
2
recipes-kernel/linux/files/wm8960.cfg
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
CONFIG_I2C_BCM2835=y
|
||||||
|
CONFIG_SND_SOC_WM8960=y
|
|
@ -14,6 +14,7 @@ require recipes-kernel/linux/linux-yocto.inc
|
||||||
SRC_URI += " \
|
SRC_URI += " \
|
||||||
${@bb.utils.contains("INITRAMFS_IMAGE_BUNDLE", "1", "file://initramfs-image-bundle.cfg", "", d)} \
|
${@bb.utils.contains("INITRAMFS_IMAGE_BUNDLE", "1", "file://initramfs-image-bundle.cfg", "", d)} \
|
||||||
${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "file://vc4graphics.cfg", "", d)} \
|
${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "file://vc4graphics.cfg", "", d)} \
|
||||||
|
${@bb.utils.contains("MACHINE_FEATURES", "wm8960", "file://wm8960.cfg", "", d)} \
|
||||||
"
|
"
|
||||||
|
|
||||||
KCONFIG_MODE = "--alldefconfig"
|
KCONFIG_MODE = "--alldefconfig"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user