From owner-freebsd-multimedia@FreeBSD.ORG Sun Jan 15 08:55:06 2006 Return-Path: X-Original-To: multimedia@freebsd.org Delivered-To: freebsd-multimedia@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B80EB16A41F for ; Sun, 15 Jan 2006 08:55:06 +0000 (GMT) (envelope-from michael@gargantuan.com) Received: from phoenix.gargantuan.com (srv01.lak.lwxdatacom.net [24.73.171.238]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F3C543D45 for ; Sun, 15 Jan 2006 08:55:05 +0000 (GMT) (envelope-from michael@gargantuan.com) Received: from localhost (phoenix.gargantuan.com [IPv6:3ffe:c00:8034:a00::7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by phoenix.gargantuan.com (Postfix) with ESMTP id 9E605323 for ; Sun, 15 Jan 2006 03:55:03 -0500 (EST) From: "Michael W. Oliver" To: multimedia@freebsd.org Date: Sun, 15 Jan 2006 03:54:56 -0500 User-Agent: KMail/1.9.1 X-Face: @5vPFj3Ew,ZP'cXp; `s%*C}wZqRpmUI>yp@l(uHng}=`]5 n9l.Q!m[r:(MZ2h*Ne^$?ACOZTrnajNprFUWuu|v:X#l>r+yx6-cOwBXoAMrnd1s; c/w*o ?7Ix:&d.i2Fp"|W!\PN4\HM]r, @%V8ziL~7~gomppD~8ft5pBpAA..^CT4+aD*w\9I.!J{ ak*Q1OS+O3%]hquR' Cc: Subject: cwpcm straight to dsp is way 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, 15 Jan 2006 08:55:06 -0000 --nextPart16327788.L8tj6OXlRF Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 >/d= ev/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... =2D----------------------------------------------------- $ cat /dev/sndstat =46reeBSD Audio Driver (newpcm) Installed devices: pcm0: at io 0x1400 irq 22 kld snd_via8233 (5p/1r/8v channels d= uplex default) on... =2D----------------------------------------------------- $ uname -a =46reeBSD gambit.gargantuan.com 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue Jan 10 11:38:19 EST 2006 mwoliver@gambit.gargantuan.com:/usr/obj/usr/src/sys/GAMBIT i386 and some sysctl stuff... =2D----------------------------------------------------- $ sysctl -a | grep pcm pcm0: 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: pcm0: Codec features 20 bit DAC, 18 bit ADC, 5 bit master volume, Realtek 3= D Stereo Enhancement pcm0: Primary codec extended features variable rate PCM, double rate PCM, r= eserved 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: <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=3D17 function=3D5 handle=3D\_SB_.PCI0.AU97 dev.pcm.0.%pnpinfo: vendor=3D0x1106 device=3D0x3059 subvendor=3D0x1558 subd= evice=3D0x4701 class=3D0x040100 dev.pcm.0.%parent: pci0 and the driver is kldloaded... =2D----------------------------------------------------- $ 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! =2D-=20 Mike Oliver [see complete headers for contact information] --nextPart16327788.L8tj6OXlRF Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDyg3msWv7q8X6o8kRArGJAJ0eBRO93uQ7uq1DszI8N34OPQ9m+wCgvxq3 me+6qENB9MbjAb8lPMI0meY= =VhWR -----END PGP SIGNATURE----- --nextPart16327788.L8tj6OXlRF--