[PATCH] Fix mic sound on Jieli webcam

Takashi Iwai tiwai at suse.de
Fri Dec 18 16:31:03 CET 2020


On Fri, 18 Dec 2020 10:26:11 +0100,
Marco Giunta wrote:
> 
> On Thu, Dec 17, 2020 at 3:12 PM Takashi Iwai <tiwai at suse.de> wrote:
> >
> > Thanks.
> >
> > >     Interface Association:
> > >       bLength                 8
> > >       bDescriptorType        11
> > >       bFirstInterface         2
> > >       bInterfaceCount         2
> > >       bFunctionClass          1 Audio
> > >       bFunctionSubClass       2 Streaming
> > >       bFunctionProtocol       0
> > >       iFunction               5 USB Microphone
> > >     Interface Descriptor:
> > (snip)
> > >       AudioStreaming Interface Descriptor:
> > >         bLength                11
> > >         bDescriptorType        36
> > >         bDescriptorSubtype      2 (FORMAT_TYPE)
> > >         bFormatType             1 (FORMAT_TYPE_I)
> > >         bNrChannels             1
> > >         bSubframeSize           2
> > >         bBitResolution         16
> > >         bSamFreqType            1 Discrete
> > >         tSamFreq[ 0]         8000
> > >       Endpoint Descriptor:
> > >         bLength                 9
> > >         bDescriptorType         5
> > >         bEndpointAddress     0x82  EP 2 IN
> > >         bmAttributes            1
> > >           Transfer Type            Isochronous
> > >           Synch Type               None
> > >           Usage Type               Data
> > >         wMaxPacketSize     0x0100  1x 256 bytes
> > >         bInterval               4
> >
> > It's 4, and the same is set for all sample rates (8000, 16000, 44100,
> > 48000).
> >
> > If you don't tweak the datainterval, which error do you get?
> > The actual error message should appear before "... xx callbacks
> > suppressed" line.
> 
> Without the tweak, only error messages are:
> 
> kernel: usb 1-8: current rate 0 is different from the runtime rate 8000
> kernel: usb 1-8: current rate 0 is different from the runtime rate 16000
> kernel: usb 1-8: current rate 0 is different from the runtime rate 44100
> kernel: usb 1-8: current rate 0 is different from the runtime rate 48000
> kernel: usb 1-8: Warning! Unlikely big volume range (=4096), cval->res
> is probably wrong.
> kernel: usb 1-8: [3] FU [Mic Capture Volume] ch = 1, val = 0/4096/1
> 
> but recording from mic at any rate (8000, 16000, 44100, 48000) results
> in an incomprehensible sound, like Minion voice.
> 
> With your patch 'ALSA: usb-audio: Disable sample read check if
> firmware  doesn't give back' error messages have gone away, but result
> is the same: Minion voice.

OK, the patch for suppressing the rate errors was submitted and will
be merged to upstream later.  Now let's hunt Minions.

Just as a blind shot, could you try the following?


Takashi

--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -788,7 +788,7 @@ static int usb_audio_probe(struct usb_interface *intf,
 	if (!chip->ctrl_intf)
 		chip->ctrl_intf = alts;
 
-	chip->txfr_quirk = 0;
+	chip->txfr_quirk = 1;
 	err = 1; /* continue */
 	if (quirk && quirk->ifnum != QUIRK_NO_INTERFACE) {
 		/* need some special handlings */



More information about the Alsa-devel mailing list