Re: usb audio popping on low cpu speed device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am I understanding ehci correctly here? It looks like we only get an
interrupt every 8ms even though the isochronous period is 1ms. That's
because we can schedule 8 isochronous transactions at a time, meaning
the host controller hardware takes over for 8 milliseconds and
notifies the kernel via an interrupt only after the 8th transaction
completes. (basically I'm making sure I understand the division of
labor between hardware and software).

On Wed, Jan 2, 2013 at 8:39 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, 1 Jan 2013, Shawn Lewis wrote:
>
>> Sure. These are from playing a 100Hz sine wave tone over the USB sound card.
>>
>> This is with the wifi device disabled (meaning its not present in
>> ifconfig's output, no wifi interrupts occur). No audible pops occurred
>> in this sample.
>> http://dl.dropbox.com/u/324766/usb-popping/usbmon-100Hz-nowifi.txt
>>
>> This is with the wifi device enabled (present in ifconfig's output,
>> hundreds of wifi interrupts per second) and wifi traffic being
>> generated by ping flooding. Audible pops occurred frequently (up to a
>> few times per second) in this sample.
>> http://dl.dropbox.com/u/324766/usb-popping/usbmon-100Hz-wifi.txt
>
> The "wifi" usbmon trace doesn't show anything wrong.  All the data was
> sent to the driver in plenty of time and all the transfers completely
> normally, when they were supposed to.
Thanks for checking it out.

>
> Maybe the analyzer trace will be more fruitful.  Just because the
> driver got its data in time doesn't mean the data appeared on the wire.
> You said something about partial packets; what happened there?
Here is an audio recording and usb analyzer output. This is a 100hz
tone played while wifi traffic is being generated. I've confirmed that
errors captured in the analyzer trace correspond to errors in the
actual audio recording. I'd seen partial packets before but I don't
see them in this trace.

http://dl.dropbox.com/u/324766/usb-popping/usb-popping.tgz

File descriptions:

USB analyzer output in the analyzer's native format. Can be opened
with the "Data Center software" program from this page:
(http://www.totalphase.com/support/product/beagle_usb480/)
100hz-wifi.tdc

USB analyzer output in csv form. (look at the error column to find errors)
100hz-wifi.csv

Audio recording in signed 16-bit stereo wav.
100hz-wifi-audio.wav

Audio recording in audacity's format:
100hz-wifi-audio.aup

Audacity data:
100hz-wifi-audio_data/

>
> Also, can you post the portion of /sys/kernel/debug/usb/devices that
> describes the sound card?
Here's the host controller and sound card.

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 3.03
S:  Manufacturer=Linux 3.3.8 ehci_hcd
S:  Product=Generic Platform EHCI Controller
S:  SerialNumber=ehci-platform
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0d8c ProdID=0139 Rev= 1.00
S:  Manufacturer=C-Media Electronics Inc.
S:  Product=USB PnP Sound Device
C:* #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:* If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I:  If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E:  Ad=01(O) Atr=09(Isoc) MxPS= 200 Ivl=1ms
I:* If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I:  If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E:  Ad=82(I) Atr=09(Isoc) MxPS= 100 Ivl=1ms
I:* If#= 3 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=(none)
E:  Ad=87(I) Atr=03(Int.) MxPS=   4 Ivl=2ms
>
> Alan Stern
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux