HDMI Audio Output/3.5mm Audio Jack Output Under Debian
By default our Debian system's HDMI output doesn't have audio output. To enable the HDMI audio output you need to install the alsa packages
Firstly, make sure your board runs our latest Debian image and is connected to the internet:
After your board is powered up run the following commands:
apt-get update
apt-get install libasound2
apt-get install alsa-base
apt-get install alsa-utils
After the installation is done copy a ".wav" audio file to your NanoPi M3, connect your NanoPi M2 to an HDMI monitor and play it by using the following command:
aplay music.wavOur Debian system's default audio output is the 3.5mm audio jack. You can turn on the HDMI audio by editting the /etc/asound.conf file:
pcm.!default {
type hw
card 1
device 0
}
ctl.!default {
type hw
card 1
}
card 0 points to the 3.5mm audio jack and card 1 points to the HDMI audio.
You need to save your changes and reboot your system to make your changes take effect.