* Re: snd-usb-audio help
[not found] ` <3E4D276B.3050502@gmx.net>
@ 2003-02-14 17:50 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2003-02-14 17:50 UTC (permalink / raw)
To: nitic; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 210 bytes --]
At Fri, 14 Feb 2003 18:29:15 +0100,
nitic wrote:
>
> hello takashi,
>
> thanks for the quick response.i've attached the wished files :)
could you try the attached patch?
(it's to the cvs version.)
Takashi
[-- Attachment #2: usb-platonic-fix.dif --]
[-- Type: application/octet-stream, Size: 1462 bytes --]
Index: alsa-kernel/usb/usbaudio.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/usb/usbaudio.c,v
retrieving revision 1.46
diff -u -r1.46 usbaudio.c
--- alsa-kernel/usb/usbaudio.c 14 Feb 2003 17:36:00 -0000 1.46
+++ alsa-kernel/usb/usbaudio.c 14 Feb 2003 17:48:17 -0000
@@ -1051,7 +1051,7 @@
}
/* create a data pipe */
- ep = get_endpoint(alts, 0)->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+ ep = fmt->endpoint & USB_ENDPOINT_NUMBER_MASK;
if (is_playback)
subs->datapipe = usb_sndisocpipe(dev, ep);
else
@@ -1062,9 +1062,16 @@
subs->fill_max = 0;
/* we need a sync pipe in async OUT or adaptive IN mode */
- attr = get_endpoint(alts, 0)->bmAttributes & EP_ATTR_MASK;
+ attr = fmt->ep_attr & EP_ATTR_MASK;
if ((is_playback && attr == EP_ATTR_ASYNC) ||
(! is_playback && attr == EP_ATTR_ADAPTIVE)) {
+ /*
+ * QUIRK: plantronics headphone has adaptive-in
+ * although it's really not...
+ */
+ if (dev->descriptor.idVendor == 0x047f &&
+ dev->descriptor.idProduct == 0x0ca1)
+ goto _ok;
/* check endpoint */
if (altsd->bNumEndpoints < 2 ||
get_endpoint(alts, 1)->bmAttributes != 0x01 ||
@@ -1088,6 +1095,7 @@
subs->syncinterval = get_endpoint(alts, 1)->bRefresh;
}
+ _ok:
if ((err = init_usb_pitch(dev, subs->interface, alts, fmt)) < 0 ||
(err = init_usb_sample_rate(dev, subs->interface, alts, fmt,
runtime->rate)) < 0)
^ permalink raw reply [flat|nested] 2+ messages in thread