From owner-freebsd-multimedia@FreeBSD.ORG Sun Sep 11 19:54:29 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 30DB1106564A; Sun, 11 Sep 2011 19:54:29 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.c2i.net [212.247.154.66]) by mx1.freebsd.org (Postfix) with ESMTP id 896948FC14; Sun, 11 Sep 2011 19:54:28 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=yVKV3zusvCapyMfYJBNW2j35FMEuTKq6vh/tt/1L5+g= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=ME9era1m-NwA:10 a=WQU8e4WWZSUA:10 a=Q9fys5e9bTEA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=8FYvA-DM2FdbFoh0z48A:9 a=2M9_cR25Mq6DvFLCyJMA:7 a=PUjeQqilurYA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 10387330; Sun, 11 Sep 2011 21:54:26 +0200 From: Hans Petter Selasky To: "Mikhail T." Date: Sun, 11 Sep 2011 21:51:42 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <201109110308.p8B38btZ057145@narawntapu.narawntapu> <201109111008.12973.hselasky@c2i.net> <4E6CFEC4.5050100@aldan.algebra.com> In-Reply-To: <4E6CFEC4.5050100@aldan.algebra.com> 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-15" Content-Transfer-Encoding: 7bit Message-Id: <201109112151.42363.hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org, freebsd-usb@freebsd.org Subject: Re: [uaudio] Sound-recording too fast 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: Sun, 11 Sep 2011 19:54:29 -0000 On Sunday 11 September 2011 20:32:36 Mikhail T. wrote: > On 11.09.2011 04:08, Hans Petter Selasky wrote: > > Doesn't aiff files use a fixed sample rate? Try: > > > > env AUDIODEV=/dev/dsp1 rec -r 16k /tmp/test.aiff > > > > Or: > > > > env AUDIODEV=/dev/dsp1 rec -r 8k /tmp/test.aiff > > Well, I first noticed the problem using Skype, so I doubt, it is rec- or > aiff-specific. For me the quick and dirty hack below saved the day -- > the recording is nice and clear now and I have no other USB audio > devices for this computer anyway: > > --- sys/dev/sound/usb/uaudio.c 2011-07-24 19:12:34.000000000 -0400 > +++ sys/dev/sound/usb/uaudio.c 2011-09-10 23:41:09.000000000 -0400 > @@ -1026,4 +1026,7 @@ > bit_resolution, > p_fmt->description); > > + if (ep_dir == UE_DIR_IN) > + chan->sample_rate = > rate/3; > + else > chan->sample_rate = rate; > chan->p_asid = asid; Hi, > > I wonder, if a quirk can be added for this device... That's not impossible, though I need some more background on your device. > > I'm really surprised if your Logitech announces that it supports 48K and > > simply outputs 16K. It would be the latest great example of USB > > specification violation! > > Maybe, the rate can altered on the fly by the driver, with 48K being the > highest available, but 16K being the default? There are some sysctls which makes this possible. Can you dump the configuration descriptor of your device using usbdump? > > > A dump of the descriptors using usbconfig and "sysctl > > hw.usb.uaudio.debug=15" would also be appreciated. > > % sysctl sysctl hw.usb.uaudio.debug > sysctl: unknown oid 'hw.usb.uaudio.debug' > > ugen2.2: at usbus2, cfg=0 md=HOST > spd=HIGH (480Mbps) pwr=ON > ugen0.2: at > usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON Is your device marked spd=HIGH ? --HPS