From owner-freebsd-multimedia@FreeBSD.ORG Sun Sep 11 19:01:03 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 EEBD61065674; Sun, 11 Sep 2011 19:01:03 +0000 (UTC) (envelope-from mi+thun@aldan.algebra.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id 7ECDB8FC13; Sun, 11 Sep 2011 19:01:03 +0000 (UTC) Received: from mr17.lnh.mail.rcn.net ([207.172.157.37]) by smtp02.lnh.mail.rcn.net with ESMTP; 11 Sep 2011 14:32:25 -0400 Received: from smtp04.lnh.mail.rcn.net (smtp04.lnh.mail.rcn.net [207.172.157.104]) by mr17.lnh.mail.rcn.net (MOS 4.2.3-GA) with ESMTP id BBN45385; Sun, 11 Sep 2011 14:32:24 -0400 X-Auth-ID: anat Received: from 209-6-61-133.c3-0.sbo-ubr1.sbo.ma.cable.rcn.com (HELO [192.168.1.8]) ([209.6.61.133]) by smtp04.lnh.mail.rcn.net with ESMTP; 11 Sep 2011 14:32:24 -0400 Message-ID: <4E6CFEC4.5050100@aldan.algebra.com> Date: Sun, 11 Sep 2011 14:32:36 -0400 From: "Mikhail T." User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20110706 Thunderbird/5.0 MIME-Version: 1.0 To: Hans Petter Selasky References: <201109110308.p8B38btZ057145@narawntapu.narawntapu> <201109111008.12973.hselasky@c2i.net> In-Reply-To: <201109111008.12973.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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:01:04 -0000 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: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen1.1: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen2.1: at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE ugen3.1: at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen4.1: at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen5.1: at usbus5, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE 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 Yours, -mi