Re: UA-101

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

 



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@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux