## page was renamed from LinuxAudio === Issues === * Play mp3 in command line * Packages - alsa alsa-lib * Only root can read the audio device - Add regular user to "audio" group * Volume control - "alsamixer", left/right, up/down to adjust the volume * Play mp3 in command line - ffplay from ffmpeg, play from sox with libsox-fmt-mp3 {{{ $ ffplay file.mp3 $ play file.mp3 }}} * Play sound through digital output - SPDIF * List playback devices {{{ $ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1] Subdevices: 1/1 Subdevice #0: subdevice #0 $ cat /proc/asound/devices 1: : sequencer 2: [ 0- 7]: digital audio playback 3: [ 0- 3]: digital audio playback 4: [ 0- 2]: digital audio capture 5: [ 0- 1]: digital audio playback 6: [ 0- 0]: digital audio playback 7: [ 0- 0]: digital audio capture 8: [ 0- 3]: hardware dependent 9: [ 0- 2]: hardware dependent 10: [ 0] : control 33: : timer //device 0,1 is the digital output. }}} * Unmute the S/PDIF, run "alsamixer", switch to "S/PDIF", press "m". * "play" "ffplay" mp3 should work. * Play raw sound specifying the device. {{{ $ aplay -D plughw:0,1 ./woman.wav }}} === Reference === * http://alsa.opensrc.org/DigitalOut