* [PATCH] Jabra SPEAK 410 USB - no audio playback [not found] <20111210142419.GC16692@amd.home.annexia.org> @ 2011-12-10 19:45 ` Richard W.M. Jones 2011-12-13 22:14 ` [alsa-devel] " Richard W.M. Jones 2011-12-16 13:49 ` Clemens Ladisch 0 siblings, 2 replies; 4+ messages in thread From: Richard W.M. Jones @ 2011-12-10 19:45 UTC (permalink / raw) To: alsa-devel; +Cc: Tom Walder, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1176 bytes --] The attached patch fixes USB audio support for the Jabra SPEAK 410 USB. The problem, as I understand it, is that the device contains a Class-Specific Endpoint (CS_ENDPOINT) descriptor before the Endpoint (ENDPOINT) descriptor. The USB code all assumes that CS_ENDPOINT can only appear after ENDPOINT. Therefore the USB code divides up the interface descriptor into "stuff before ENDPOINT" (in interface->extra) and "stuff after ENDPOINT" (in interface->endpoint[0]->extra). For this device, this division does not work. You can see lsusb for my device here: http://mailman.alsa-project.org/pipermail/alsa-devel/2011-December/047036.html Notice the "** UNRECOGNIZED: 07 25 01 81 02 00 00" line which is the CS_ENDPOINT descriptor. The solution (which is a hack ...) is to also search interface->extra looking for the missing descriptor. For me, this fully enables the functions of this device. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora [-- Attachment #2: linux-3.1.fc16-jabra.patch --] [-- Type: text/plain, Size: 926 bytes --] diff -uNrp kernel-3.1.fc16.orig/sound/usb/stream.c kernel-3.1.fc16.new/sound/usb/stream.c --- kernel-3.1.fc16.orig/sound/usb/stream.c 2011-12-10 18:03:29.658729051 +0000 +++ kernel-3.1.fc16.new/sound/usb/stream.c 2011-12-10 18:08:41.468694907 +0000 @@ -164,6 +164,12 @@ static int parse_uac_endpoint_attributes csep = snd_usb_find_desc(alts->endpoint[0].extra, alts->endpoint[0].extralen, NULL, USB_DT_CS_ENDPOINT); + /* Jabra SPEAK 410 USB has CS_ENDPOINT before ordinary ENDPOINT, + * which confuses the USB descriptor parsing code. Try looking + * for CS_ENDPOINT in the interface->extra - RWMJ. */ + if (!csep) + csep = snd_usb_find_desc(alts->extra, alts->extralen, NULL, USB_DT_CS_ENDPOINT); + /* Creamware Noah has this descriptor after the 2nd endpoint */ if (!csep && altsd->bNumEndpoints >= 2) csep = snd_usb_find_desc(alts->endpoint[1].extra, alts->endpoint[1].extralen, NULL, USB_DT_CS_ENDPOINT); ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [alsa-devel] [PATCH] Jabra SPEAK 410 USB - no audio playback 2011-12-10 19:45 ` [PATCH] Jabra SPEAK 410 USB - no audio playback Richard W.M. Jones @ 2011-12-13 22:14 ` Richard W.M. Jones 2011-12-16 13:49 ` Clemens Ladisch 1 sibling, 0 replies; 4+ messages in thread From: Richard W.M. Jones @ 2011-12-13 22:14 UTC (permalink / raw) To: alsa-devel; +Cc: linux-kernel On Sat, Dec 10, 2011 at 07:45:39PM +0000, Richard W.M. Jones wrote: > diff -uNrp kernel-3.1.fc16.orig/sound/usb/stream.c kernel-3.1.fc16.new/sound/usb/stream.c > --- kernel-3.1.fc16.orig/sound/usb/stream.c 2011-12-10 18:03:29.658729051 +0000 > +++ kernel-3.1.fc16.new/sound/usb/stream.c 2011-12-10 18:08:41.468694907 +0000 > @@ -164,6 +164,12 @@ static int parse_uac_endpoint_attributes > > csep = snd_usb_find_desc(alts->endpoint[0].extra, alts->endpoint[0].extralen, NULL, USB_DT_CS_ENDPOINT); > > + /* Jabra SPEAK 410 USB has CS_ENDPOINT before ordinary ENDPOINT, > + * which confuses the USB descriptor parsing code. Try looking > + * for CS_ENDPOINT in the interface->extra - RWMJ. */ > + if (!csep) > + csep = snd_usb_find_desc(alts->extra, alts->extralen, NULL, USB_DT_CS_ENDPOINT); > + > /* Creamware Noah has this descriptor after the 2nd endpoint */ > if (!csep && altsd->bNumEndpoints >= 2) > csep = snd_usb_find_desc(alts->endpoint[1].extra, alts->endpoint[1].extralen, NULL, USB_DT_CS_ENDPOINT); Anyone? Tested on two different machines and it fixes the audio output problem on both ... If I've sent this to the wrong list please let me know. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [alsa-devel] [PATCH] Jabra SPEAK 410 USB - no audio playback 2011-12-10 19:45 ` [PATCH] Jabra SPEAK 410 USB - no audio playback Richard W.M. Jones 2011-12-13 22:14 ` [alsa-devel] " Richard W.M. Jones @ 2011-12-16 13:49 ` Clemens Ladisch 2011-12-16 19:12 ` Richard W.M. Jones 1 sibling, 1 reply; 4+ messages in thread From: Clemens Ladisch @ 2011-12-16 13:49 UTC (permalink / raw) To: Richard W.M. Jones; +Cc: alsa-devel, Tom Walder, linux-kernel Richard W.M. Jones wrote: > The attached patch fixes USB audio support for the Jabra SPEAK 410 USB. > > The problem, as I understand it, is that the device contains a > Class-Specific Endpoint (CS_ENDPOINT) descriptor before the Endpoint > (ENDPOINT) descriptor. The USB code all assumes that CS_ENDPOINT can > only appear after ENDPOINT. Therefore the USB code divides up the > interface descriptor into "stuff before ENDPOINT" (in > interface->extra) and "stuff after ENDPOINT" (in > interface->endpoint[0]->extra). For this device, this division does > not work. > > The solution (which is a hack ...) is to also search interface->extra > looking for the missing descriptor. The patch looks good. Please run it through checkpatch.pl and provice a Signed-off-by tag (see Documentation/SubmittingPatches). Regards, Clemens ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [alsa-devel] [PATCH] Jabra SPEAK 410 USB - no audio playback 2011-12-16 13:49 ` Clemens Ladisch @ 2011-12-16 19:12 ` Richard W.M. Jones 0 siblings, 0 replies; 4+ messages in thread From: Richard W.M. Jones @ 2011-12-16 19:12 UTC (permalink / raw) To: Clemens Ladisch; +Cc: alsa-devel, Tom Walder, linux-kernel On Fri, Dec 16, 2011 at 02:49:05PM +0100, Clemens Ladisch wrote: > Richard W.M. Jones wrote: > > The attached patch fixes USB audio support for the Jabra SPEAK 410 USB. > > > > The problem, as I understand it, is that the device contains a > > Class-Specific Endpoint (CS_ENDPOINT) descriptor before the Endpoint > > (ENDPOINT) descriptor. The USB code all assumes that CS_ENDPOINT can > > only appear after ENDPOINT. Therefore the USB code divides up the > > interface descriptor into "stuff before ENDPOINT" (in > > interface->extra) and "stuff after ENDPOINT" (in > > interface->endpoint[0]->extra). For this device, this division does > > not work. > > > > The solution (which is a hack ...) is to also search interface->extra > > looking for the missing descriptor. > > The patch looks good. Please run it through checkpatch.pl and provice > a Signed-off-by tag (see Documentation/SubmittingPatches). Sorry, I should have followed up on this list ... Tom (in the CC line) opened a bug with Jabra, and they have issued a firmware update. Unfortunately this update requires some Windows software to run. I applied this, and it does appear to fix the audio playback problem, though curiously it doesn't completely fix the ENDPOINT/CS_ENDPOINT problem, so who knows what's really going on there. Anyway, should you want the update it is here: https://bugzilla.redhat.com/show_bug.cgi?id=766714#c1 Thanks Tom! Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-16 19:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20111210142419.GC16692@amd.home.annexia.org>
2011-12-10 19:45 ` [PATCH] Jabra SPEAK 410 USB - no audio playback Richard W.M. Jones
2011-12-13 22:14 ` [alsa-devel] " Richard W.M. Jones
2011-12-16 13:49 ` Clemens Ladisch
2011-12-16 19:12 ` Richard W.M. Jones
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox