# HiFi audio

<abstract>
This article explains how to use the CM-Panel-POE audio interface
</abstract>

Check if the audio interface exists by typing this command:

	$ aplay -l

If not check the file <code>/boot/config.txt</code> if these lines are present:

	#dtparam=audio=on
	dtparam=audio=off
	dtoverlay=i2s-gpio28-31
	dtoverlay=hifiberry-dacplus

Reboot and type again <code>aplay -l</code>. This is the reply that should come back:

	**** List of PLAYBACK Hardware Devices ****
	card 0: sndrpihifiberry [snd_rpi_hifiberry_dacplus], device 0: HiFiBerry DAC+ Pro HiFi pcm512x-hifi-0 [HiFiBerry DAC+ Pro HiFi pcm512x-hifi-0]
	  Subdevices: 1/1
	  Subdevice #0: subdevice #0

Download these two audio sample:

* [stereotest.mp3](./stereotest.mp3)
* [stereotest.wav](./stereotest.wav)
* [stereotest.ogg](./stereotest.ogg)

by typing from the CM-Panel command line:

	$ wget https://www.acmesystems.it/www/cmpanel-poe_audio/stereotest.mp3
	$ wget https://www.acmesystems.it/www/cmpanel-poe_audio/stereotest.wav
	$ wget https://www.acmesystems.it/www/cmpanel-poe_audio/stereotest.ogg


Connect a earphone or a PC speaker to the audio output connector and type:

	$ aplay stereotest.mp3

To play a mp3 or ogg file install <code>mplayer</code> by typing:

	$ sudo apt update
	$ sudo apt install mplayer

then:

	$ mplayer stereotest.mp3
	$ mplayer stereotest.ogg


@include='adv_cmpanel' 
