nerotiger
Posts: 4
Joined: Mon Jun 24, 2019 9:24 pm

sound play NO-GUI, mpg321 - default libao driver issue

Mon Jun 24, 2019 9:40 pm

OS: Linux raspberrypi 4.19.42-v7+ #1219 SMP .. armv7l GNU/Linux

I am trying to play mp3, using mpg321 (complied)
This version of mpg321 has been configured with the libao default as its default
libao output device.
[email protected]:~/src/mpg321-0.3.2-orig $
It says I do NOT have default driver.

./mpg321 /path/to/file/a.mp3
No default libao driver available.

However, aplay was OK to list all devices and when playing WAV sound, I can hear it nice and clear from the speaker.

Code: Select all

 aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
I tried something suggested below, but still not working.
modprobe snd_pcm_oss
modprobe: FATAL: Module snd_pcm_oss not found in directory /lib/modules/4.19.42-v7+
How am I supposed to set default /dev/snd to libao, and pass it to mpg321?

Code: Select all

[email protected]:/boot# ls -al /dev/snd/
total 0
drwxr-xr-x  3 root root      160 Jun 24 21:31 .
drwxr-xr-x 15 root root     3580 Jun 24 21:31 ..
drwxr-xr-x  2 root root       60 Jun 24 21:31 by-path
crw-rw----  1 root audio 116,  0 Jun 24 21:31 controlC0
crw-rw----  1 root audio 116, 16 Jun 24 21:31 pcmC0D0p
crw-rw----  1 root audio 116, 17 Jun 24 21:31 pcmC0D1p
crw-rw----  1 root audio 116,  1 Jun 24 21:31 seq
crw-rw----  1 root audio 116, 33 Jun 24 21:31 timer
Last edited by nerotiger on Mon Jun 24, 2019 11:23 pm, edited 1 time in total.
HELO | ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked | Go version go1.12.6 linux/arm

nerotiger
Posts: 4
Joined: Mon Jun 24, 2019 9:24 pm

Re: sound play NO-GUI, mpg321 - default libao driver issue

Mon Jun 24, 2019 11:21 pm

tried -o alsa -a 'hw:0,0' doesn't work.

using aoss command and solved this finally.

> aoss /usr/local/bin/mpg321 -o oss -R /path/to/file/a.mp3

Code: Select all

High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.3.2-1 (2012/03/25). Written and copyrights by Joe Drew,
now maintained by Nanakos Chrysostomos and others.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!

Directory: /path/to/file/
Playing MPEG stream from a.mp3 ...
MPEG 1.0 layer III, 192 kbit/s, 44100 Hz joint-stereo
                                                                            
[0:07] Decoding of a.mp3 finished.
HELO | ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked | Go version go1.12.6 linux/arm

Return to “Raspbian”