Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Sep 2011 21:51:42 +0200
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        "Mikhail T." <mi+thun@aldan.algebra.com>
Cc:        freebsd-multimedia@freebsd.org, freebsd-usb@freebsd.org
Subject:   Re: [uaudio] Sound-recording too fast
Message-ID:  <201109112151.42363.hselasky@c2i.net>
In-Reply-To: <4E6CFEC4.5050100@aldan.algebra.com>
References:  <201109110308.p8B38btZ057145@narawntapu.narawntapu> <201109111008.12973.hselasky@c2i.net> <4E6CFEC4.5050100@aldan.algebra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <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


Is your device marked spd=HIGH ?

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109112151.42363.hselasky>