UDOO: ALSA error when output to USB DAC: Broken Pipe

Hi!

I just installed my UDOO quad with Volumio.

Everything works ok when output is set to internal analog (connected a pair of headphone and I got sound)

But when I switch to my external USB dac (Audiolab MDAC) there’s no way to get sound out to USB.

Here’s the error I get in mpd.log when playing any music file to USB DAC (I’ve tried with flac, mp3 with different bit rates, playin from USB, NAS and RAMPLAY)

Jan 01 00:27 : added RAMPLAY/02-abba-mamma_mia.mp3
Jan 01 00:27 : output: Failed to open "Output" [alsa]: Error opening ALSA device "hw:2,0" (snd_pcm_hw_params): Broken pipe
Jan 01 00:27 : player_thread: problems opening audio device while playing "RAMPLAY/02-abba-mamma_mia.mp3"

I also tried Cmedia fix and all volume settings (Disabled/Software/Hardware), with no success.

I’m not at all experienced Linux user…but readin around I could get the below additional information to post:

root@volumio:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=vt1613audio
    vt1613-audio,
    Default Audio Device
sysdefault:CARD=vt1613audio
    vt1613-audio,
    Default Audio Device
default:CARD=imxhdmisoc
    imx-hdmi-soc,
    Default Audio Device
sysdefault:CARD=imxhdmisoc
    imx-hdmi-soc,
    Default Audio Device
default:CARD=MDAC
    Audiolab M-DAC, USB Audio
    Default Audio Device
sysdefault:CARD=MDAC
    Audiolab M-DAC, USB Audio
    Default Audio Device
front:CARD=MDAC,DEV=0
    Audiolab M-DAC, USB Audio
    Front speakers
surround40:CARD=MDAC,DEV=0
    Audiolab M-DAC, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=MDAC,DEV=0
    Audiolab M-DAC, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=MDAC,DEV=0
    Audiolab M-DAC, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=MDAC,DEV=0
    Audiolab M-DAC, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=MDAC,DEV=0
    Audiolab M-DAC, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=MDAC,DEV=0
    Audiolab M-DAC, USB Audio
    IEC958 (S/PDIF) Digital Audio Output


root@volumio:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 002 Device 003: ID 0451:adac Texas Instruments, Inc.
Bus 002 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter



root@volumio:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vt1613audio [vt1613-audio], device 0: HiFi vt1613-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: imxhdmisoc [imx-hdmi-soc], device 0: IMX HDMI TX mxc-hdmi-soc-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: MDAC [Audiolab M-DAC], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@volumio:~#

Anybody available to help me?
Thanks
Stefano

Idon’t know if this help you, you can try.
udoo-with-usb-dac-problems-sound-volumio-t736.html

Inviato dal mio SM-N9005 utilizzando Tapatalk

@Keres,

I went through this post already…and tried everything (change device only the first time booting, then unplug power and replug power and the right device work…)

but nothing worked for me…still same Broken Pipe error.

Any other idea?
Thanks
Stefano

Anyone available to help me?

Thanks!!!
Stefano

Meanwhile…I tried my Audiolab Mdac on a RPI and it works pretty OK with Volumio 1.2. No pops and clicks!

Still, I’d like to get it working on UDOO as well…but really don’t know where to start to troubleshoot te Broken Pipe error. No way to get any sound!

Is there anybody around?
Michelangelo, when will the new Volumio version for UDOO be released? Will it fix my problem? Please…

Thanks
Stefano

Try to attach your DAC to the auxiliary USB port on UDOO…
This issue seems quite strange…

Thank you Michelangelo, for your attention.

Unfortunately I did already try attaching to 3rd USB port (via its specific loose cable), with no success.

Same I did by putting an USB hub between Udoo and the DAC…still no go.

Try to edit mpd.conf manually, removing hw: from output alsa section. This could do the trick

Ciao,

I edited mpd.conf and removed hw: line (hope I did it correctly, using #).
Now when I play a song Volumio UI seems like it’s playing correctly, I get no errors in mpd.log (nothing is logged there), but no sound at all!.

Here’s how alsa section looks now in my mpd.conf.

audio_output {

                 type           "alsa"
                 name           "Output"
#                device         "hw:2,0"
#                mixer_control  "PCM"
#                mixer_device   "hw:2"
#                mixer_index    "0"
                 dsd_usb        "yes"

}

any ideas?
Thanks
Stefano

— replay error—…

More info from today’s attempts…

I set log_level to “verbose” in /etc/mpd.conf and here’s what I get when trying to play a song to USB DAC

Jan 01 00:08 : alsa: opened hw:2,0 type=HW
Jan 01 00:08 : alsa: format=S24_3LE (Signed 24 bit Little Endian in 3bytes)
Jan 01 00:08 : alsa: buffer: size=90..174762 time=2040..3962858
Jan 01 00:08 : alsa: period: size=45..87381 time=1020..1981429
Jan 01 00:08 : alsa: default period_time = buffer_time/4 = 500000/4 = 125000
Jan 01 00:08 : alsa: format=S24_3LE (Signed 24 bit Little Endian in 3bytes)
Jan 01 00:08 : alsa: buffer: size=90..174762 time=2040..3962858
Jan 01 00:08 : alsa: period: size=45..87381 time=1020..1981429
Jan 01 00:08 : alsa: format=S24_3LE (Signed 24 bit Little Endian in 3bytes)
Jan 01 00:08 : alsa: buffer: size=90..174762 time=2040..3962858
Jan 01 00:08 : alsa: period: size=45..87381 time=1020..1981429
Jan 01 00:08 : alsa: format=S24_3LE (Signed 24 bit Little Endian in 3bytes)
Jan 01 00:08 : alsa: buffer: size=90..174762 time=2040..3962858
Jan 01 00:08 : alsa: period: size=45..87381 time=1020..1981429
Jan 01 00:08 : alsa: format=S24_3LE (Signed 24 bit Little Endian in 3bytes)
Jan 01 00:08 : alsa: buffer: size=90..174762 time=2040..3962858
Jan 01 00:08 : alsa: period: size=45..87381 time=1020..1981429
Jan 01 00:08 : output: Failed to open "Output" [alsa]: Error opening ALSA device "hw:2,0" (snd_pcm_hw_params): Broken pipe
Jan 01 00:08 : player_thread: problems opening audio device while playing "RAMPLAY/09.Roxanne.flac"

I also tried Alsa speaker test below …and I still get same error.

speaker-test -c2

Finally, tried to upgrade mpd to 0.18.9 according to below instructions…but nothing has changed.
volumio.readthedocs.org/en/lates … ngmpd.html

My suspect is that something is missing in ALSA “snd_pcm_hw_params” that makes the DAC not responding…
I do not have a clue where to look for any initialization settings for alsa, neither if there’s a later version than currently used in Volumio that I can try to upgrade to.

Result of the day: I am Learning a lot about Linux…but still no music from my Udoo and MDAC!

Help please!
Thanks to all, Stefano

Up!

Finally…after another day of trial and errors… my UDOO quad is working with Audiolab MDAC and Volumio!

What made me breaking through was the following post, I found googling around:

lists.debian.org/debian-arm/200 … 00084.html

Then the challenge started…with my very limited competence in Linux I recompiled the Udoo kernel with the following additional setting added in menuconfig:

CONFIG_USB_EHCI_TT_NEWSCHED=y

recompiled…and voila’, my Mdac is singing like a charm through Volumio! Very first impressions…Udoo sounds so much better than Rpi!!!
I’m soooooo happy!!!

Now, back to reality…to recompile the kernel I had to use Volumio 1.0 beta version, as I did have a lot of errors with the latest beta 1.3 (packages dependancy issues?)

Michelangelo, will it be possible to incorporate the above string as a core change in the kernel for Volumio image ? I cannot really think of myself recompiling the kernel every time a new version/update will be available…I think I’m not the only one who struggled like hell to get a 1.1 async DAC to work with Udoo?

Thanks again for your support…now I can really enjoy Volumio fully, and that’s a great stuff for my ears!

Hello,

First things first: Thank you MICHELANGELO for all your great work!
I seem to encounter the same problem as stefano74. I was using Volumio on a Raspberry Pi B+ till recently, but i wanted to get rid of the clicks and pops and i purchased recently a Udoo quad unit.
Everything went smooth with the Volumio 1.5 image on the Udoo, but no sound on the usb connected DAC (Arcam rDAC), i have searched hi and low for a solution and tried all the solutions i could find related to this problem without success. The log file shows the same error “ALSA error when output to USB DAC: Broken Pipe”.
I have found stefano74 solution but i have no experience with recompiling kernels. Can it be done for Volumio 1.5? How do i proceed in this endeavor?
Some help in this direction will be greatly appreciated.

Thank you!

P.S.: I have also tested the Volumio 1.5 on Udoo with a pair of JBL Pebbles USB Speakers and it works with no issues. Apart from the “Best Sinc Interpolator” setting, this setting generates interruptions in the sound and makes just one of the processor cores to max out at 100%.