Update of /cvsroot/alsa/alsa-kernel/usb
In directory usw-pr-cvs1:/tmp/cvs-serv2429
Modified Files:
usbaudio.c
Log Message:
- don't skip the active capture urbs.
- added the debug print for active capture urbs.
- don't change runtime->rate even if the current rate is not same.
- check the bandwidth for urbs (for tests only, now commented out).
Index: usbaudio.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbaudio.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- usbaudio.c 30 Sep 2002 13:39:03 -0000 1.11
+++ usbaudio.c 2 Oct 2002 17:34:30 -0000 1.12
@@ -284,6 +284,16 @@
urb->transfer_buffer = ctx->buf;
urb->transfer_buffer_length = offs;
urb->interval = 1;
+#if 0 // for check
+ if (! urb->bandwidth) {
+ int bustime;
+ bustime = usb_check_bandwidth(urb->dev, urb);
+ if (bustime < 0)
+ return bustime;
+ printk("urb %d: bandwidth = %d (packets = %d)\n", ctx->index, bustime,
+urb->number_of_packets);
+ usb_claim_bandwidth(urb->dev, urb, bustime, 1);
+ }
+#endif // for check
return 0;
}
@@ -305,8 +315,10 @@
for (i = 0; i < urb->number_of_packets; i++) {
cp = (unsigned char *)urb->transfer_buffer +
urb->iso_frame_desc[i].offset;
- if (urb->iso_frame_desc[i].status) /* active? hmm, skip this */
- continue;
+ if (urb->iso_frame_desc[i].status) {
+ snd_printd(KERN_ERR "frame %d active: %d\n", i,
+urb->iso_frame_desc[i].status);
+ // continue;
+ }
len = urb->iso_frame_desc[i].actual_length / stride;
if (! len)
continue;
@@ -1009,6 +1021,7 @@
}
/* if endpoint has sampling rate control, set it */
if (fmt->attributes & EP_CS_ATTR_SAMPLE_RATE) {
+ int crate;
data[0] = runtime->rate;
data[1] = runtime->rate >> 8;
data[2] = runtime->rate >> 16;
@@ -1026,8 +1039,11 @@
dev->devnum, subs->interface, fmt->altsetting, ep);
return err;
}
- runtime->rate = data[0] | (data[1] << 8) | (data[2] << 16);
- // printk("ok, getting back rate to %d\n", runtime->rate);
+ crate = data[0] | (data[1] << 8) | (data[2] << 16);
+ if (crate != runtime->rate) {
+ snd_printd(KERN_WARNING "current rate %d is different from the
+runtime rate %d\n", crate, runtime->rate);
+ // runtime->rate = crate;
+ }
}
/* always fill max packet size */
if (fmt->attributes & EP_CS_ATTR_FILL_MAX)
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog