Re: [LAU] UA-101

From: Clemens Ladisch <clemens@email-addr-hidden>
Date: Wed Feb 24 2010 - 14:36:23 EET

Colin Fletcher wrote:
> Colin Fletcher wrote:
> > Capture is very noisy: there's a white noise-like signal superimposed on
> > the captured sound, and sounding like its amplitude is modulated by the
> > captured signal.
>
> Looking at the waveforms, it appears that sections 4 or 5 samples long
> are "shuffled" out of order in the captured signal.

USB high speed uses 8000 frames per second, so one packet contains
about 5.5 (44100/8000) samples. It's obvious that the USB packets are
exchanged somehow.

Please try the patch below, or download the new ua101.c from
<http://www.alsa-project.org/~clemens/ua101.c>. This will log the
sequence in which the first 50 USB packets are received, but it won't
fix anything.

Since the kernel crash happens when resetting the capture interface,
there is a possibilty that these bugs are related, probably due to some
corruption of the EHCI data structures. Trying a 2.6.33 kernel might
help, although I don't know of any change that could affect this.

Regards,
Clemens

--- alsa-kernel/sound/usb/ua101.c.orig Tue Feb 16 21:47:56 2010
+++ alsa-kernel/sound/usb/ua101.c Wed Feb 24 13:28:57 2010
@@ -367,6 +367,14 @@
         unsigned int frames, write_ptr;
         bool do_period_elapsed;
         int err;
+ static int ccc = 0;
+
+ if (ccc < 50) {
+ ccc++;
+ for (err = 0; err < stream->queue_length; ++err)
+ if (urb == &stream->urbs[err]->urb)
+ printk(KERN_DEBUG "completed URB %d\n", err);
+ }
 
         if (unlikely(urb->status == -ENOENT || /* unlinked */
                      urb->status == -ENODEV || /* device removed */
@@ -465,6 +473,8 @@
                                 err, usb_error_string(err));
                         return err;
                 }
+ if (stream == &ua->capture)
+ printk(KERN_DEBUG "submitted URB %u\n", i);
         }
         return 0;
 }
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Wed Feb 24 20:15:03 2010

This archive was generated by hypermail 2.1.8 : Wed Feb 24 2010 - 20:15:03 EET