[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

/dev/sound always records 4 bytes per sample? (3.5 auich ac97)

Hi all,

Either I'm missing something obvious or /dev/sound doesn't work as advertised...

So I'm playing with the sound device, setting parameters with audioctl and
recording with dd.  Why is it, I'm wondering, that changing record.channels
or record.precision appears to have no effect on number of bytes per second
reported by dd?  For example, with:


"dd if=/dev/sound of=sample count=400" reports very close to 32000 bytes/sec,
as I'd expect, but if I change record.channels to 1:

audioctl -w record.channels=1

dd reports the same byte rate.  Changing record.precision to 8 also has no
effect on the byte rate calculated by dd.  Reading from /dev/audio instead,
which is supposed to force one-channel 8-bit mu-law:  same 32000 bytes/sec.

Does everyone always record stereo linear:16?

Best Regards,


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

Visit your host, monkey.org