Skip to content

Commit aa92c1e

Browse files
committed
bootfiles: enable RPi 3 x64 audio support only with 'ENABLE_AUDIO'
By enabling the audio module automatically only on RPi 3 x64 machines, the PWM* lines may get reused for audio purposes unwillingly, introducing a disparity with other RPi boards using the same sources Create 'ENABLE_AUDIO' build constant to enable the audio support --- Signed-off-by: Adrian DC <radian.dc@gmail.com>
1 parent b0f0a6c commit aa92c1e

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

docs/extra-build-config.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,13 @@ discovered via all 1-Wire busses check the interface with this command
398398

399399
`ls /sys/bus/w1/devices/`
400400

401+
## Enable audio sound support
402+
403+
Audio driver for BCM2835 depends on the 'snd_bcm2835' module.
404+
To enable the audio support explicitly set it in `local.conf`
405+
406+
ENABLE_AUDIO = "1"
407+
401408
## Manual additions to config.txt
402409

403410
The `RPI_EXTRA_CONFIG` variable can be used to manually add additional lines to

recipes-bsp/bootfiles/rpi-config_git.bb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ do_deploy() {
200200
esac
201201
fi
202202

203-
if [ "${ENABLE_UART}" = "1" ] && [ "${MACHINE}" = "raspberrypi-cm5-io-board" ]; then
203+
if [ "${ENABLE_UART}" = "1" ] && [ "${MACHINE}" = "raspberrypi-cm5-io-board" ]; then
204204
# Enable UART on the 40-pin header of the CM5 IO Board
205205
echo "dtoverlay=uart0" >>$CONFIG
206206
echo "dtparam=uart0_console" >>$CONFIG
@@ -339,8 +339,11 @@ do_deploy:append:raspberrypi3-64() {
339339
echo "# have a properly sized image" >> $CONFIG
340340
echo "disable_overscan=1" >> $CONFIG
341341

342-
echo "# Enable audio (loads snd_bcm2835)" >> $CONFIG
343-
echo "dtparam=audio=on" >> $CONFIG
342+
# Audio support
343+
if [ "${ENABLE_AUDIO}" = "1" ]; then
344+
echo "# Enable audio (loads snd_bcm2835)" >> $CONFIG
345+
echo "dtparam=audio=on" >> $CONFIG
346+
fi
344347
}
345348

346349
do_deploy:append() {

0 commit comments

Comments
 (0)