cwpcm straight to dsp is way fast
Michael W. Oliver
michael at gargantuan.com
Sun Jan 15 00:55:06 PST 2006
Hey guys,
I am using cwpcm to generate morse, and when using this:
echo "sos sos sos" | cwpcm -w 20 -F 24 -f 800 | sox -r 8000 -bu -t raw - sos.wav lowpass 1500
I get a wav file that sounds perfect. However, when using this:
echo "sos sos sos" | cwpcm -w 20 -F 24 -f 800 >/dev/dsp
-or-
echo "sos sos sos" | cwpcm -w 20 -F 24 -f 800 >sos.raw && cat sos.raw >/dev/dsp
I get horrible noise from speakers. I am _guessing_ that it has something
to do with the rate at which dsp is processing that raw data, but I don't
know how to fix it so that I can just play the code without creating the
wav file.
Those two files are here...
http://michael.gargantuan.com/sos.wav
http://michael.gargantuan.com/sos.raw
I am using...
------------------------------------------------------
$ cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <VIA VT8235> at io 0x1400 irq 22 kld snd_via8233 (5p/1r/8v channels duplex default)
on...
------------------------------------------------------
$ uname -a
FreeBSD gambit.gargantuan.com 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue
Jan 10 11:38:19 EST 2006
mwoliver at gambit.gargantuan.com:/usr/obj/usr/src/sys/GAMBIT i386
and some sysctl stuff...
------------------------------------------------------
$ sysctl -a | grep pcm
pcm0: <VIA VT8235> port 0x1400-0x14ff irq 22 at device 17.5 on pci0
pcm0: Reserved 0x100 bytes for rid 0x10 type 4 at 0x1400
pcm0: [MPSAFE]
pcm0: <Avance Logic ALC650 AC97 Codec (id = 0x414c4720)>
pcm0: Codec features 20 bit DAC, 18 bit ADC, 5 bit master volume, Realtek 3D Stereo Enhancement
pcm0: Primary codec extended features variable rate PCM, double rate PCM, reserved 1, center DAC, surround DAC, LFE DAC, reserved 4
pcm0: ac97 codec dac ready count: 0
pcm0: sndbuf_setmap 3e3fa000, 1000; 0xc51a6000 -> 3e3fa000
pcm0: sndbuf_setmap 3e4bf000, 1000; 0xc51cb000 -> 3e4bf000
pcm0: sndbuf_setmap 3e27d000, 1000; 0xc51c9000 -> 3e27d000
pcm0: sndbuf_setmap 3dedb000, 1000; 0xc51c7000 -> 3dedb000
pcm0: sndbuf_setmap 3e319000, 1000; 0xc51c5000 -> 3e319000
pcm0: sndbuf_setmap 3dff7000, 1000; 0xc51c3000 -> 3dff7000
pcm0: <VIA DXS Enabled: DXS 4 / SGD 1 / REC 1>
<118>hw.snd.pcm0.vchans:
Danger! pcm0:play:1 bufsoft size increasing from 2048 to 4096 after CHANNEL_SETBLOCKSIZE()
Danger! pcm0:play:1 bufsoft size increasing from 2048 to 4096 after CHANNEL_SETBLOCKSIZE()
hw.snd.pcm0.buffersize: 4096
hw.snd.pcm0.vchans: 8
hw.snd.pcm0.vchanrate: 48000
hw.snd.pcm0.spdif_enabled: 0
hw.snd.pcm0.via_dxs_src: 0
dev.pcm.0.%desc: VIA VT8235
dev.pcm.0.%driver: pcm
dev.pcm.0.%location: slot=17 function=5 handle=\_SB_.PCI0.AU97
dev.pcm.0.%pnpinfo: vendor=0x1106 device=0x3059 subvendor=0x1558 subdevice=0x4701 class=0x040100
dev.pcm.0.%parent: pci0
and the driver is kldloaded...
------------------------------------------------------
$ kldstat
Id Refs Address Size Name
1 26 0xc0400000 839068 kernel
2 2 0xc0c3a000 25be8 sound.ko
3 1 0xc0c60000 6948 snd_via8233.ko
4 1 0xc0c67000 80f0 ng_ubt.ko
5 6 0xc0c70000 daa0 netgraph.ko
6 1 0xc0c7e000 1e658 radeon.ko
7 2 0xc0c9d000 10c44 drm.ko
8 1 0xc0cae000 943c cpufreq.ko
9 1 0xc0cb8000 61b60 acpi.ko
10 1 0xc5423000 6000 linprocfs.ko
11 1 0xc542e000 19000 linux.ko
12 4 0xc566d000 2000 ng_bluetooth.ko
13 1 0xc5687000 d000 ng_hci.ko
14 1 0xc5694000 10000 ng_l2cap.ko
15 1 0xc56a4000 18000 ng_btsocket.ko
16 1 0xc56c7000 4000 ng_socket.ko
Thanks very much for your help!
--
Mike Oliver
[see complete headers for contact information]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-multimedia/attachments/20060115/78b1018c/attachment.bin
More information about the freebsd-multimedia
mailing list