USB microphone problems

Hans Petter Selasky hselasky at c2i.net
Fri Apr 15 07:39:09 UTC 2011


On Thursday 14 April 2011 13:01:19 Oliver Fromme wrote:
> Hans Petter Selasky <hselasky at c2i.net> wrote:
>  > On Tuesday 12 April 2011 16:40:14 Oliver Fromme wrote:
>  > >    pcm5: chn_read(): pcm5:virtual:dsp5.vr0: record interrupt timeout,
>  > > 
>  > > channel dead
>  > 
>  > Try the following command on your device after it is plugged:
>  > 
>  > usbconfig -d X.Y do_request 0x22 0x01 0x100 0x86 0x03 0x80 0xBB 0x00
>  > 
>  > Does it help?
> 
> I'm sorry for the late reply.  I spent one or two hours
> plugging and unplugging that webcam a hundred times.  :-)
> 
> The good news:  Yes, the command helps.  But only when
> issued at a certain time.
> 
> The following sequence works:
> 
> 1.  Plug camera in.
> 2.  usbconfig -d 3.2 do_request 0x22 0x01 0x100 0x86 0x03 0x80 0xBB 0x00
> 3.  usbconfig -d 3.2 reset
> 4.  usbconfig -d 3.2 do_request 0x22 0x01 0x100 0x86 0x03 0x80 0xBB 0x00
> 5.  Now the microphone works.
> 
> I cannot omit any of the steps, and I cannot change the
> order of the steps.  Otherwise the microphone does not work.
> Let me repeat:  The do_request has to be done *twice*, and
> a reset has to be done in-between.
> 
> Interestingly, the following works, too:
> 
> 1.  Plug camera in.
> 2.  Run pwcview.
> 3.  usbconfig -d 3.2 do_request 0x22 0x01 0x100 0x86 0x03 0x80 0xBB 0x00
> 4.  Now the microphone works.
> 
> No need to do a reset, and no need to perform the do_request
> twice.  But again, it has to be done exactly in that order.
> It does not matter whether I stop pwcview or keep it running.
> The only important thing seems to be that pwcview opens the
> video device once.  Instead of pwcview I can also use skype
> to open the video device (by starting the device test in the
> options dialog).
> 
> The microphone keeps working, no matter what I do, until I
> unplug it.
> 
> Just out of curiosity, what exactly does the do_request with
> those eight hex numbers do?
> 
> Another thing I noticed is that mixer(8) still does not show
> a microphone device, only vol and pcm:
> 
> Mixer vol      is currently set to  75:75
> Mixer pcm      is currently set to  75:75
> 
> So I cannot change the mic level.  Changing the vol and pcm
> values doesn't have any effect.  But it's not fatal because
> the default mic level is acceptable.
> 
> Thanks for your work!
> 
> Best regards
>    Oliver

=== uaudio.c
==================================================================
--- uaudio.c    (revision 220305)
+++ uaudio.c    (local)
@@ -1360,11 +1360,10 @@
            sc->sc_mixer_iface_index);
 
        /*
-        * If just one sampling rate is supported,
-        * no need to call "uaudio_set_speed()".
-        * Roland SD-90 freezes by a SAMPLING_FREQ_CONTROL request.
+        * Only set the sample rate if the channel reports that it
+        * supports the frequency control.
         */
-       if (ch->p_asf1d->bSamFreqType != 1) {
+       if (ch->p_sed->bmAttributes & UA_SED_FREQ_CONTROL) {
                if (uaudio_set_speed(sc->sc_udev, endpoint, ch->sample_rate)) 
{
                        /*
                         * If the endpoint is adaptive setting the speed may

Could you try the patch above? /sys/dev/sound/usb/uaudio.c

--HPS


More information about the freebsd-multimedia mailing list