-
Notifications
You must be signed in to change notification settings - Fork 14
Configuring Raspbian for DAC
This section of the documentation describes how to configure the DAC module in the Raspbian operating system. The steps mentioned below are tested on Raspberry Pi 3 Model B+ with Raspbian Buster (2019-07-10) release.
Before continuing these steps make sure that the J1 port is connected to Raspberry Pi and the DAC module is powered on. The connection layout for Raspberry Pi is illustrated and described in the Connectivity page of this documentation.
- Clone or download all three files at max2-audio-dac/RPi3-driver/ directory.
- Copy both "max3-dac-overlay.dtbo" and "max3-dac-overlay.dts" into home directory of Raspberry Pi (/home/pi).
- To update the "max3-dac-overlay.dtbo" file, issue the following command:
dtc -@ -H epapr -O dtb -o max3-dac-overlay.dtbo -Wno-unit_address_vs_reg max3-dac-overlay.dts
- Copy updated "max3-dac-overlay.dtbo" file into "/boot/overlays/" directory with following command:
sudo cp ./max3-dac-overlay.dtbo /boot/overlays/
- Open "/boot/config.txt" file using preferred text file editor and add the following line to the bottom of the file:
dtoverlay=max3-dac-overlay
- To disable the Raspberry Pi's built-in audio devices create "alsa-blacklist.conf" file in "/etc/modprobe.d" directory with the following entry:
blacklist snd_bcm2835
- To control the output volume, create ALSA softvol device configuration in the home directory (/home/pi) with the filename ".asoundrc" and copy all the contents of "asound.conf" into that file.
- After the above changes restart the Raspberry Pi. In next boot, the DAC is listed at the audio section as below:
- You can also check the device availability with the following command:
aplay -l
Now DAC board is identified by the system and ready to use. To test the output use speaker-test with following parameters:
speaker-test -c2
To test the specific frequency use following parameters with speaker-test:
speaker-test -c2 -t sine -X -f 500
In the above command specify the required frequency into -f option.
To play an audio stream or MP3 clip uses mpg123 or any ALSA driver compatible application.