Date: Sun, 11 Sep 2011 14:32:36 -0400 From: "Mikhail T." <mi+thun@aldan.algebra.com> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org, freebsd-usb@freebsd.org Subject: Re: [uaudio] Sound-recording too fast Message-ID: <4E6CFEC4.5050100@aldan.algebra.com> In-Reply-To: <201109111008.12973.hselasky@c2i.net> References: <201109110308.p8B38btZ057145@narawntapu.narawntapu> <201109111008.12973.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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; I wonder, if a quirk can be added for this 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? > 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' I guess, I need to have USB_DEBUG on... % usbconfig ugen0.1: <UHCI root HUB VIA> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen1.1: <UHCI root HUB VIA> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen2.1: <EHCI root HUB VIA> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE ugen3.1: <UHCI root HUB VIA> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen4.1: <UHCI root HUB VIA> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen5.1: <EHCI root HUB VIA> at usbus5, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE ugen2.2: <product 0x081b vendor 0x046d> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON ugen0.2: <Microsoft Wireless Optical Mouse 1.00 Microsoft> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON Yours, -mi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E6CFEC4.5050100>