Hi!
I think I found a bug in drivers/usb/audio.c
In usb_audio_featureunit the number of channels
was not initialized properly so for some devices
which mix mono and stereo channels (like Labtec
Axis 712 stereo headset) some channels were missing.
I include the patch. As I am not an expert, could
you forward it to the proper
person (Linus Torvalds/Marcelo Tolsatti)
to include it in the kernel.
Best Regards,
Jacek Pliszka
--- /usr/src/linux-2.4/drivers/usb/audio.c Tue Oct 30 16:01:40 2001
+++ audio.c Sat Nov 17 21:40:50 2001
@@ -3378,6 +3378,12 @@
#endif
usb_audio_recurseunit(state, ftr[4]);
+ if(ftr[5]==0){
+ printk(KERN_ERR "usbaudio: wrong size of controls\n");
+ return;
+ }
+ state->nrchannels=(ftr[0]-7)/ftr[5]-1;
+
if (state->nrchannels == 0) {
printk(KERN_ERR "usbaudio: feature unit %u source has no channels\n",
ftr[3]);
return;