Re: usb audio popping on low cpu speed device

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

 



On Wed, 2 Jan 2013, Shawn Lewis wrote:

> 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).

Yes, that's more or less right.  Of course, this isn't a property of
EHCI itself but rather a result of the fact that the audio driver
submits transfer requests containing 8 packets of data.  (Actually a
few of the requests have fewer than 8.  For example, in the
usbmon-100Hz-wifi.txt file, the transfer at timestamp 4033751111 has
only 5 packets.)

> > 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.

I didn't look at the audio data because the errors show up already in 
the analyzer log.  Every now and then there is a corrupted packet.  
Either there's too much contention for the memory bus or else there's 
some sort of electromagnetic interference.

> > 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

Okay, that's about what I figured.

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