Welcome! Log In Create A New Profile

Advanced

choppy usb audio using mpd

Posted by truthe 
choppy usb audio using mpd
November 22, 2010 12:06AM
Hello,

I now have music playing. It plays perfectly with mocp, but not with mpd. On mpd it is choppy and uses 100% cpu. Also, I have already tried the method recommended here
http://plugapps.com/forum/viewtopic.php?f=6&t=206&start=10

Since my card is 1, I also treid changing 0 to 1, with no success.

here is some output:
lsusb:
Bus 001 Device 008: ID 1130:1620 Tenx Technology, Inc. 
Bus 001 Device 005: ID 13fe:1f00 Kingston Technology Company Inc. DataTraveler 2.0 4GB Flash Drive / Patriot Xporter 32GB (PEF32GUSB) Flash Drive
Bus 001 Device 004: ID 152d:2338 JMicron Technology Corp. / JMicron USA Technology Corp. JM20337 Hi-Speed USB to SATA & PATA Combo Bridge
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

/etc/mpd.conf
audio_output {
        type            "alsa"
        name            "My ALSA Device"
        device          "hw:1,0"        # optional
        format          "44100:16:2"    # optional
        mixer_device    "default"       # optional
        mixer_control   "PCM"           # optional
        mixer_index     "0"             # optional
}

cat /proc/asound/card1/pcm0p/sub0/hw_params
closed

/etc/asound.conf
pcm.!default {
        type hw
        card 1
}

ctl.!default {
        type hw
        card 1
}

Thanks, I really hope to get this working!



Edited 1 time(s). Last edit at 11/22/2010 12:15AM by truthe.
Mike
Re: choppy usb audio using mpd
November 22, 2010 11:22AM
I had the same issue, I never found a solution (and I admittedly didn't try since I had another sound adapter that worked)
Reading on the different forums it seems that the "cheap" USB adapters from eBay don't work, but the ones with the CM119 chip work. I ended up ordering the SYBA USB Audio adapter (http://www.amazon.com/Syba-SD-CM-UAUD-Adapter-C-Media-Chipset/dp/B001MSS6CS), that was also recommended here:
http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-1-introduction/ and here: http://garydion.com/projects/wifiradio/

There is a whole discussion about USB Audio adapters on the MightyOhm Forum

You might find the SYBA on NewEgg as well, it came out to about $8 shipped for me.
Now the CPU usage is 4% max when playing audio from mpd using mpc, with the cheap adapter it was about 99% and choppy every second or so.
I also had another USB-Audio stick that came with a PlanTronics headset ("Plantronics DSP adapter-01") which works as well.


Hope that helps,
Mike
truehl
Re: choppy usb audio using mpd
November 22, 2010 12:18PM
Which kernel do you use? Jeff's original or an updated one?

Greetings,
Thomas
Re: choppy usb audio using mpd
November 22, 2010 12:24PM
Have you tried with the zoh resampler as I suggested in the other forum post? It solved the problem for me.
Re: choppy usb audio using mpd
November 22, 2010 12:50PM
truehl Wrote:
-------------------------------------------------------
> Which kernel do you use? Jeff's original or an
> updated one?
>
> Greetings,
> Thomas

I am using the following kernel. I believe it's jeff's original.

Linux debian 2.6.32-5-kirkwood #1 Sun Oct 31 11:19:32 UTC 2010 armv5tel GNU/Linux

edit:

Falker, that did the trick. Thanks.



Edited 1 time(s). Last edit at 11/22/2010 12:56PM by truthe.
Mike
Re: choppy usb audio using mpd
November 22, 2010 02:42PM
I guess you have it working now, but for completeness' sake, I am using Gorgone's latest kernel (2.6.35.7.4) from here.
Re: choppy usb audio using mpd
November 24, 2010 09:12PM
Change the audio_output section of the /etc/mpd.conf file to :

audio_output {
        type               "alsa"
        name               "My ALSA Device"
        format             "44100:16:2"    
        period_time        "50000"
}

it should fix the problem.

Roman
tcjew
Re: choppy usb audio using mpd
November 25, 2010 06:24AM
had that issues too...
compiled the latest svn on the dockstar and it works great.
I think their was a general problem with the mpd version squeeze provides.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: