[SOLVED] Pogoplug USB audio and Shairport

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

[SOLVED] Pogoplug USB audio and Shairport

Postby jm2 » Tue Sep 11, 2012 9:49 pm

Hi all,

I'm having an interesting problem. I recently purchased a Syba USB sound card (SD-CM-UAUD) for use with my E02 Pogoplug as a Shairport streamer. When directly playing a wav file with aplay, the sound is perfectly fine, but over shairport the sound is horribly distorted/crackly. I've tried all the various asound.conf changes related to usb audio to no effect. Interestingly, I can make the problem nearly go away by loading the plug with a dummy app that pegs the CPU at 90-100% but as soon as I kill that program, the distortion comes back. Does anyone have any idea why this would be the case?

Thanks,
JM
Last edited by jm2 on Wed Sep 12, 2012 9:28 pm, edited 2 times in total.
jm2
 
Posts: 10
Joined: Sat Jun 23, 2012 4:45 pm

Re: Pogoplug USB audio and Shairport

Postby pepedog » Wed Sep 12, 2012 11:55 am

Can you create /etc/asound.conf and try again
$this->bbcode_second_pass_code('', 'pcm.!default {
type hw
card 0
}

ctl.!default {
type hw
card 0
}')
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Pogoplug USB audio and Shairport

Postby jm2 » Wed Sep 12, 2012 12:55 pm

I created an asound.conf with that and rebooted, but no change. Sound is mostly ok with very minor/occaisonal crackling with pegged CPU and horribly distorted when cpu is idle except for hairtunes.
jm2
 
Posts: 10
Joined: Sat Jun 23, 2012 4:45 pm

Re: Pogoplug USB audio and Shairport

Postby WarheadsSE » Wed Sep 12, 2012 3:20 pm

http://forum.doozan.com/read.php?2,2840 ... 2#msg-9581

Have a look through that thread about the changes they have made. Seems there may be a patch needed to the module, but breaking other things in the process.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Pogoplug USB audio and Shairport

Postby Kurlon » Wed Sep 12, 2012 8:26 pm

I got my best results by just switching to pulseaudio.
Kurlon
 
Posts: 132
Joined: Fri Jan 06, 2012 10:05 pm

Re: Pogoplug USB audio and Shairport

Postby jm2 » Wed Sep 12, 2012 9:26 pm

I figured it out! WarheadsSE was right about mmap support being messed up, but a module recompile is not required. The key to figuring it out was this command while the audio was playing:

$this->bbcode_second_pass_code('', 'cat /proc/asound/card0/pcm0p/sub0/hw_params')

With this I found that no matter what I changed in asound.conf, MMAP_INTERLEAVED was being used rather than RW_INTERLEAVED. The issue here was that shairport uses libao, which apparently overrides the mmap setting that this asound.conf usually gets around:

$this->bbcode_second_pass_code('', 'pcm.!default {
type hw
card 0
}

ctl.!default {
type hw
card 0
}')

So I modified /etc/libao.conf as such:

$this->bbcode_second_pass_code('', 'default_driver=alsa
dev=default
use_mmap=no')

And with that, I now have perfect quality audio regardless of CPU usage. :D Thanks for your help guys!
Last edited by jm2 on Sat Oct 06, 2012 3:45 pm, edited 1 time in total.
jm2
 
Posts: 10
Joined: Sat Jun 23, 2012 4:45 pm

Re: [SOLVED] Pogoplug USB audio and Shairport

Postby WarheadsSE » Wed Sep 12, 2012 9:59 pm

/me makes massive note

keywords: usb audio cpu scratch alsa config mmap pulseaudio
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [SOLVED] Pogoplug USB audio and Shairport

Postby etunnel » Sat Oct 13, 2012 6:27 am

I've been trying to understand how USB audio stack works in Linux so I can do what you've been able to achieve. It is quite confusing to me. There is no package to install. I imagine the few essential elements are built into the kernel, not even pluggable kernel modules. I think I need to get snd-usb-audio alsa(or other sound driver) built into the kernel. I am a newbie in the kernel-level linux world. Can you please share how you did it?

I just updated to the latest build 2.6.31.6_SMP_820 for armv6l. Those drivers are not included still.

Thanks a lot!
etunnel
 
Posts: 2
Joined: Sat Oct 13, 2012 6:07 am

Re: [SOLVED] Pogoplug USB audio and Shairport

Postby moonman » Sat Oct 13, 2012 11:30 am

$this->bbcode_second_pass_quote('etunnel', '2').6.31.6_SMP_820 for armv6l
The drivers may not be included in older kernels. This was done on armv5 device with a much newer kernel than yours.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: [SOLVED] Pogoplug USB audio and Shairport

Postby jm2 » Sat Oct 13, 2012 12:45 pm

Yeah it just works on kernel 3.1.10 on a pogoplug v2. I have a pogoplug v3 as well with that kernel, and while it has the correct modules for USB audio I couldn't get my USB sound card to work on that version. Sorry :(
jm2
 
Posts: 10
Joined: Sat Jun 23, 2012 4:45 pm

Next

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 11 guests