do_deploy:append() {
- # Enable Pi’s on-board sound card (load snd_bcm2835):
- sed -i 's/^#\(dtparam=audio=\).*/\1on/' $CONFIG
+ if [ "${SOUND_CARD}" = "iqaudiodac" ]; then
+ # Disable Pi’s on-board sound card (snd_bcm2835):
+ sed -i 's/^#\(dtparam=audio=\).*/\1off/' $CONFIG
+
+ # Enable IQaudio sound card:
+ echo "dtoverlay=iqaudio-dacplus" >> $CONFIG
+
+ # Enable I2S mode:
+ sed -i 's/^#\(dtparam=i2s=\).*/\1on/' $CONFIG
+ else
+ # Enable Pi’s on-board sound card (load snd_bcm2835):
+ sed -i 's/^#\(dtparam=audio=\).*/\1on/' $CONFIG
+ fi
# Pretends all audio formats are unsupported by display. This
# forces ALSA to use analogue output:
file://classique.m3u \
"
+SOUND_CARD ?= "default"
+
do_install:append() {
ALSA_MIXER="PCM"
}
}
do_install:append:rpi() {
- # Internal sound card
- ALSA_DEVICE_NAME="headphones"
+ if [ "${SOUND_CARD}" = "iqaudiodac" ]; then
+ ALSA_DEVICE_NAME="IQaudIODAC"
+ ALSA_MIXER="Digital"
+ else
+ # Internal sound card
+ ALSA_DEVICE_NAME="headphones"
+ fi
}
do_install:append() {