Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Apr 2011 09:38:02 +0200
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        Oliver Fromme <olli@lurza.secnetix.de>
Cc:        freebsd-multimedia@freebsd.org
Subject:   Re: USB microphone problems
Message-ID:  <201104150938.02429.hselasky@c2i.net>
In-Reply-To: <201104141101.p3EB1JJ2023433@lurza.secnetix.de>
References:  <201104141101.p3EB1JJ2023433@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 14 April 2011 13:01:19 Oliver Fromme wrote:
> Hans Petter Selasky <hselasky@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104150938.02429.hselasky>