ChangeSet 1.1290.15.14, 2004/03/01 13:33:25-08:00, [EMAIL PROTECTED] [PATCH] USB: OSS audio driver workaround for buggy descriptors
the attached patch for the USB OSS audio driver works around an apparently common (because windows apparently works around it too) USB audio descriptor bug. I've tested it with a micronas UAC3556B eval board that features such buggy descriptors. drivers/usb/audio.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff -Nru a/drivers/usb/audio.c b/drivers/usb/audio.c --- a/drivers/usb/audio.c Wed Mar 17 15:48:37 2004 +++ b/drivers/usb/audio.c Wed Mar 17 15:48:37 2004 @@ -1684,12 +1684,12 @@ alts->endpoint[1].bmAttributes != 0x01 || alts->endpoint[1].bSynchAddress != 0 || alts->endpoint[1].bEndpointAddress != (alts->endpoint[0].bSynchAddress & 0x7f)) { - printk(KERN_ERR "usbaudio: device %d interface %d altsetting %d invalid synch pipe\n", + printk(KERN_WARNING "usbaudio: device %d interface %d altsetting %d claims adaptive in but has invalid synch pipe; treating as asynchronous in\n", dev->devnum, u->interface, fmt->altsetting); - return -1; + } else { + u->syncpipe = usb_sndisocpipe(dev, alts->endpoint[1].bEndpointAddress & 0xf); + u->syncinterval = alts->endpoint[1].bRefresh; } - u->syncpipe = usb_sndisocpipe(dev, alts->endpoint[1].bEndpointAddress & 0xf); - u->syncinterval = alts->endpoint[1].bRefresh; } if (d->srate < fmt->sratelo) d->srate = fmt->sratelo; @@ -1779,12 +1779,12 @@ alts->endpoint[1].bmAttributes != 0x01 || alts->endpoint[1].bSynchAddress != 0 || alts->endpoint[1].bEndpointAddress != (alts->endpoint[0].bSynchAddress | 0x80)) { - printk(KERN_ERR "usbaudio: device %d interface %d altsetting %d invalid synch pipe\n", + printk(KERN_WARNING "usbaudio: device %d interface %d altsetting %d claims asynch out but has invalid synch pipe; treating as adaptive out\n", dev->devnum, u->interface, fmt->altsetting); - return -1; + } else { + u->syncpipe = usb_rcvisocpipe(dev, alts->endpoint[1].bEndpointAddress & 0xf); + u->syncinterval = alts->endpoint[1].bRefresh; } - u->syncpipe = usb_rcvisocpipe(dev, alts->endpoint[1].bEndpointAddress & 0xf); - u->syncinterval = alts->endpoint[1].bRefresh; } if (d->srate < fmt->sratelo) d->srate = fmt->sratelo; ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel