When I try to record with wavrec (a part of ports/audio/wavplay) on half-duplex mode, cannot record from the second time. At the first time it works correctly. Wavrec open a sound device (default: /dev/audio) with O_RDWR flag. Probably it's wrong. Because wavrec doesn't support full-duplex operation. It is documented in "Open Sound System(TM) Programmer's Guide" pp29: | It is recommended that the device file is opened in read only | (O_RDONLY) or write only (O_WRONLY) mode. Read write mode (O_RDWR) | should be used only when it is necessary to record and play back at | the same time (full duplex mode). ("Selecting and Opening the Sound Device" http://www.opensound.com/pguide/oss.pdf) I've posted about the problem to the freebsd-multimedia mailing list, and taken a comment. http://lists.freebsd.org/pipermail/freebsd-multimedia/2005-December/003242.html How-To-Repeat: * Case 1 (full-duplex mode, works fine) $ grep sbc /boot/device.hints hint.sbc.0.at="isa" hint.sbc.0.port="0x240" hint.sbc.0.irq="5" hint.sbc.0.drq="1" hint.sbc.0.flags="0x15" $ cat /dev/sndstat | grep pcm1 pcm1: <SB16 DSP 4.13> at io 0x240 irq 5 drq 1:5 bufsz 4096 kld snd_sb16 (1p/1r/0v channels duplex) $ time wavrec -d /dev/dsp1 -S -s 44100 -b 16 -t 10 test.wav 10.07 real 0.02 user 1.18 sys $ time wavrec -d /dev/dsp1 -S -s 44100 -b 16 -t 10 test.wav 10.07 real 0.01 user 1.19 sys $ ls -l test.wav -rw-r--r-- 1 nabe nabe 1764044 Dec 9 21:23 test.wav $ * Case 2 (half-duplex mode, works only once) $ grep sbc /boot/device.hints hint.sbc.0.at="isa" hint.sbc.0.port="0x240" hint.sbc.0.irq="5" hint.sbc.0.drq="1" hint.sbc.0.flags="0" $ cat /dev/sndstat | grep pcm1 pcm1: <SB16 DSP 4.13> at io 0x240 irq 5 drq 1 bufsz 4096 kld snd_sb16 (1p/1r/0v channels) $ time wavrec -d /dev/dsp1 -S -s 44100 -b 16 -t 10 test.wav 10.15 real 0.00 user 1.19 sys $ time wavrec -d /dev/dsp1 -S -s 44100 -b 16 -t 10 test.wav Device busy: Opening audio device /dev/dsp1 1.60 real 0.00 user 1.59 sys $ ls -l test.wav -rw-r--r-- 1 nabe nabe 44 Dec 9 21:30 test.wav $
Responsible Changed From-To: freebsd-ports-bugs->barner I'll take it.
State Changed From-To: open->closed Committed, thanks! I also bumped PORTREVISION.