From owner-freebsd-multimedia@FreeBSD.ORG Fri Apr 15 07:39:09 2011 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C0C5106566B for ; Fri, 15 Apr 2011 07:39:09 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.c2i.net [212.247.154.130]) by mx1.freebsd.org (Postfix) with ESMTP id 700EA8FC0C for ; Fri, 15 Apr 2011 07:39:08 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=upTJuTb3ngPPUUVVSPoyO7jwIWz3rzPtkQxI490l6Ks= c=1 sm=1 a=IU0TiZmyZPMA:10 a=WQU8e4WWZSUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=8kQB0OdkAAAA:8 a=UsgrzFmrLnB1_zfZA5EA:9 a=EA6GWj_8rDzO53o7ijkA:7 a=wPNLvfGTeEIA:10 a=sBQFgOjg5BcA:10 a=9aOQ2cSd83gA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 113428509; Fri, 15 Apr 2011 09:39:06 +0200 From: Hans Petter Selasky To: Oliver Fromme Date: Fri, 15 Apr 2011 09:38:02 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <201104141101.p3EB1JJ2023433@lurza.secnetix.de> In-Reply-To: <201104141101.p3EB1JJ2023433@lurza.secnetix.de> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104150938.02429.hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org Subject: Re: USB microphone problems X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2011 07:39:09 -0000 On Thursday 14 April 2011 13:01:19 Oliver Fromme wrote: > Hans Petter Selasky 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