OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: /dev/sound always records 4 bytes per sample? (3.5 auich ac97)

From: Jeff Chilton (jwcchilton.com)
Date: Thu Feb 24 2005 - 07:53:11 CST


Jacob Meuser wrote:

>On Wed, Feb 23, 2005 at 01:13:22PM -0500, Jeff Chilton wrote:
>
>
>>Hi all,
>>
>>Either I'm missing something obvious or /dev/sound doesn't work as
>>advertised...
>>
>>
>
>it works right for me. even 'dd if=/dev/audio ...' produces 16002
>bytes/sec.
>
>
>
That's interesting. I thought opening /dev/audio set the device to 8kHz
mu-law 8-bit mono, which would yield 8000 bytes/sec. That's what the
comments in /usr/src/sys/dev/audio.c suggest...

>>record.rate=8000
>>record.channels=2
>>record.precision=16
>>record.encoding=ulinear
>>
>>
>
>what about record.source ?
>
>

Don't seem to get one of those in OpenBSD 3.5. I've got record.port=0x2
(line in), though.

>
>
>>Does everyone always record stereo linear:16?
>>
>>
>
>seems most software does by default.
>
>
>
Good enough for me. I can make my own mu-law.

>>dmesg output:
>>
>>OpenBSD 3.5 (GENERIC) #34: Mon Mar 29 12:24:55 MST 2004
>>
>>auich0 at pci0 dev 2 function 7 "SIS 7012 AC97 Audio" rev 0xa0: irq 11,
>>SiS7012 AC97
>>ac97: codec id 0x414c4720 (Avance Logic ALC650)
>>ac97: codec features 20 bit DAC, 18 bit ADC, Realtek 3D
>>audio0 at auich0
>>auich0: measured ac97 link rate at 48005 Hz, will use 48000 Hz
>>
>>
>>
>
>where's the rest? reproducable with newer code?
>
>

Actually, I rolled back to 3.5 from 3.6, where I couldn't get audioctl
to work at all. Everything was "set failed: invalid request". So I'll
revisit that after I free up this computer's twin brother (another
"Shuttle SS51G").

Thanks!

/jwc

[demime 1.01d removed an attachment of type application/x-pkcs7-signature which had a name of smime.p7s]