From owner-freebsd-multimedia@FreeBSD.ORG Sun Sep 11 08:16:57 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 B8D271065673; Sun, 11 Sep 2011 08:16:57 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.c2i.net [212.247.154.2]) by mx1.freebsd.org (Postfix) with ESMTP id 189E08FC13; Sun, 11 Sep 2011 08:16:56 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=wJvnH89EauZH5CtPccDXCoR3S15XcsUHhRLViNeYhtc= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=ME9era1m-NwA:10 a=WQU8e4WWZSUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=whtCu0RjGpl7jWsU7kwA:9 a=wPNLvfGTeEIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 178727461; Sun, 11 Sep 2011 10:16:55 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sun, 11 Sep 2011 10:14:11 +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> In-Reply-To: <201109111008.12973.hselasky@c2i.net> 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: <201109111014.11940.hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org, "Mikhail T." 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 08:16:57 -0000 On Sunday 11 September 2011 10:08:12 Hans Petter Selasky wrote: > On Sunday 11 September 2011 05:08:37 Mikhail T. wrote: > > Hello! > > > > I have a Logitech's webcam with built-in microphone. The audio device is > > > > recognized by FreeBSD-8-stable as: > > uaudio0: > > > 2> on usbus2 uaudio0: No playback! > > > > uaudio0: Record: 48000 Hz, 1 ch, 16-bit S-LE PCM format > > uaudio0: No midi sequencer > > pcm1: on uaudio0 > > > > mixer(8) reports it a little strangely, depending on which /dev-entry I > > > > use: > > % mixer -f /dev/mixer1 > > Mixer vol is currently set to 75:75 > > Mixer pcm is currently set to 75:75 > > > > % mixer -f /dev/dsp1 > > Mixer rec is currently set to 45:45 > > > > But recording works. For example, using the rec-utility from the SoX > > > > package: > > % env AUDIODEV=/dev/dsp1 rec /tmp/test.aiff > > Input File : '/dev/dsp1' (ossdsp) > > Channels : 2 > > Sample Rate : 48000 > > Precision : 16-bit > > Sample Encoding: 16-bit Signed Integer PCM > > > > Well, it almost works, because the recording ends up highly distorted -- > > much faster, than what I'm really saying into microphone. About three > > times faster. For example, if I let the above command run for 18 seconds > > (according to time(1)), the created test.aiff will contain a 6-seconds > > recording. > > > > How do I fix this? Thanks! Yours, > > Hi, > > 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 > > --HPS Hi, You could also try: dd if=/dev/dsp1 of=/dev/null bs=128 Let it run for a while and compute the bitrate. 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! A dump of the descriptors using usbconfig and "sysctl hw.usb.uaudio.debug=15" would also be appreciated. --HPS