unusual behaviour mixerctl & audioctl
Running 3.7-current, I get the following behaviour with audioctl & mixerctl. % audioctl play.sample_rate=11025 audioctl: set failed: Invalid argument % mixerctl -w record.mic=100 record.mic: 0 -> 0 Also, if I try to record through a mic or line in, I get scrambled noise. My sound card is driven by the auich driver. Any suggestions? Log outout (AUDIO_DEBUG) % audioctl play.sample_rate=11025 audioctl: set failed: Invalid argument Jun 21 21:04:50 blackbird /bsd: mixer_ioctl(20,'M',0) result 0 Jun 21 21:04:50 blackbird /bsd: mixer_ioctl(20,'M',1) Jun 21 21:04:50 blackbird /bsd: AUDIO_MIXER_WRITE Jun 21 21:04:50 blackbird /bsd: read(1e) = 0 Jun 21 21:04:50 blackbird /bsd: mixer_ioctl(20,'M',1) result 0 Jun 21 21:04:50 blackbird /bsd: mixer_ioctl(20,'M',0) Jun 21 21:04:50 blackbird /bsd: AUDIO_MIXER_READ Jun 21 21:04:50 blackbird /bsd: read(1e) = 0 Jun 21 21:04:50 blackbird /bsd: mixer_ioctl(20,'M',0) result 0 Jun 21 21:04:50 blackbird /bsd: mixer_close: unit 0 Jun 21 21:13:16 blackbird /bsd: audio_open: dev=0x2ac0 flags=0x3 sc=0xd1fa8e00 h dl=0xd1f9a000 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(48,'A',27) Jun 21 21:13:16 blackbird /bsd: AUDIO_GETDEV Jun 21 21:13:16 blackbird /bsd: audio_ioctl(48,'A',27) result 0 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) Jun 21 21:13:16 blackbird /bsd: AUDIO_GETENC Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) result 0 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) Jun 21 21:13:16 blackbird /bsd: AUDIO_GETENC Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) result 0 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) Jun 21 21:13:16 blackbird /bsd: AUDIO_GETENC Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) result 0 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) Jun 21 21:13:16 blackbird /bsd: AUDIO_GETENC Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) result 0 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) Jun 21 21:13:16 blackbird /bsd: AUDIO_GETENC Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) result 0 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) Jun 21 21:13:16 blackbird /bsd: AUDIO_GETENC Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) result 0 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) Jun 21 21:13:16 blackbird /bsd: AUDIO_GETENC Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) result 0 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) Jun 21 21:13:16 blackbird /bsd: AUDIO_GETENC Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) result 0 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) Jun 21 21:13:16 blackbird /bsd: AUDIO_GETENC Jun 21 21:13:16 blackbird /bsd: audio_ioctl(32,'A',28) result 22 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(4,'A',29) Jun 21 21:13:16 blackbird /bsd: AUDIO_GETFD Jun 21 21:13:16 blackbird /bsd: audio_ioctl(4,'A',29) result 0 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(4,'A',34) Jun 21 21:13:16 blackbird /bsd: AUDIO_GETPROPS Jun 21 21:13:16 blackbird /bsd: audio_ioctl(4,'A',34) result 0 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(4,'A',26) Jun 21 21:13:16 blackbird /bsd: audio_ioctl(4,'A',26) result 0 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(136,'A',21) Jun 21 21:13:16 blackbird /bsd: AUDIO_GETINFO Jun 21 21:13:16 blackbird /bsd: read(1a) = 0 Jun 21 21:13:16 blackbird /bsd: AUDIO_MIXER_ENUM: 0 0 7 0 Jun 21 21:13:16 blackbird /bsd: read(1a) = 0 Jun 21 21:13:16 blackbird /bsd: AUDIO_MIXER_ENUM: 0 0 7 0 Jun 21 21:13:16 blackbird /bsd: read(e) = 8008 Jun 21 21:13:16 blackbird /bsd: read(e) = 8008 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(136,'A',21) result 0 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(136,'A',22) Jun 21 21:13:16 blackbird /bsd: AUDIO_SETINFO mode=0x0 Jun 21 21:13:16 blackbird /bsd: audio: Setting record params sr=8000, enc=1, cha n=1, prec=8 Jun 21 21:13:16 blackbird /bsd: audio: Setting play params sr=11025, enc=1, chan =1, prec=8 Jun 21 21:13:16 blackbird /bsd: set_rate(0) 0 Jun 21 21:13:16 blackbird /bsd: set_rate(0) 0 Jun 21 21:13:16 blackbird /bsd: audio_calc_blksize: record blksize=448 Jun 21 21:13:16 blackbird /bsd: audio_calc_blksize: play blksize=2240 Jun 21 21:13:16 blackbird /bsd: audio_calc_blksize: play blksize=2240 Jun 21 21:13:16 blackbird /bsd: audio: After setting record params sr=8000, enc= 1, chan=1, prec=8 Jun 21 21:13:16 blackbird /bsd: audio: After setting play params sr=11025, enc=1 , chan=1, prec=8 Jun 21 21:13:16 blackbird /bsd: read(1a) = 0 Jun 21 21:13:16 blackbird /bsd: au_set_gain: gain=127 balance=32, l=127 r=127 Jun 21 21:13:16 blackbird /bsd: audio_ioctl(136,'A',22) result 22 % audioctl -a name=ICH4 AC97 version=0x01 config=auich0 encodings=ulinear:8,mulaw:8*,alaw:8*,slinear:8*,slinear_le:16,ulinear_le:16*,slinear_be:16*,ulinear_be:16* properties=full_duplex,mmap,independent full_duplex=0 fullduplex=0 blocksize=2240 hiwat=29 lowat=21 monitor_gain=0 mode= play.rate=11025 play.channels=1 play.precision=8 play.encoding=mulaw play.gain=127 play.balance=32 play.por
Re: unusual behaviour mixerctl & audioctl
On Wed, Jun 22, 2005 at 12:59:35AM +0100, Ed Wandasiewicz wrote: > Running 3.7-current, I get the following behaviour with audioctl & > mixerctl. > > % audioctl play.sample_rate=11025 > audioctl: set failed: Invalid argument > > % mixerctl -w record.mic=100 > record.mic: 0 -> 0 I see the same thing with emu/SBLive! > Also, if I try to record through a mic or line in, I get scrambled > noise. My sound card is driven by the auich driver. Any suggestions? but it does actually work for me. are you sure you're playing with the same parameters you are recording with? how are you recording and playing? have you read http://www.openbsd.org/faq/faq13.html#recordaudio ? -- <[EMAIL PROTECTED]>
Re: unusual behaviour mixerctl & audioctl
Following the faq, here is my output. Using /dev/audio and sox, I get scrambled noise. The bytes/sec dont match... # audioctl record.encoding=mulaw audioctl: set failed: Invalid argument # audioctl record.rate=8000 audioctl: set failed: Invalid argument # audioctl record.channels=1 audioctl: set failed: Invalid argument # audioctl record.precision=8 audioctl: set failed: Invalid argument # mixerctl -w inputs.mic.mute=on inputs.mic.mute: on -> on # mixerctl inputs.mic.preamp=on inputs.mic.preamp: off -> on # mixerctl inputs.mic.source=mic0 inputs.mic.source: mic0 -> mic0 # mixerctl record.source=mic record.source: mic -> mic # mixerctl -w record.volume=255,255 record.volume: 255,255 -> 255,255 # mixerctl -w record.volume.mute=off record.volume.mute: off -> off # mixerctl -w record.mic=0 record.mic: 0 -> 0 # mixerctl record.mic.mute=off record.mic.mute: off -> off # dd if=/dev/audio of=myvoice.raw 289+0 records in 289+0 records out 147968 bytes transferred in 4.636 secs (31917 bytes/sec) # dd if=myvoice.raw of=/dev/audio 289+0 records in 289+0 records out 147968 bytes transferred in 16.498 secs (8969 bytes/sec) # sox -U -c 1 -r 8000 -b myvoice.raw myvoice.wav # play myvoice.wav On Wed, Jun 22, 2005 at 11:50:27AM -0700, Jacob Meuser wrote: > On Wed, Jun 22, 2005 at 12:59:35AM +0100, Ed Wandasiewicz wrote: > > Running 3.7-current, I get the following behaviour with audioctl & > > mixerctl. > > > > % audioctl play.sample_rate=11025 > > audioctl: set failed: Invalid argument > > > > % mixerctl -w record.mic=100 > > record.mic: 0 -> 0 > > I see the same thing with emu/SBLive! > > > Also, if I try to record through a mic or line in, I get scrambled > > noise. My sound card is driven by the auich driver. Any suggestions? > > but it does actually work for me. are you sure you're playing with > the same parameters you are recording with? how are you recording > and playing? have you read > http://www.openbsd.org/faq/faq13.html#recordaudio ? > > -- > <[EMAIL PROTECTED]>
Re: unusual behaviour mixerctl & audioctl
On Wed, Jun 22, 2005 at 11:39:26PM +0100, Ed Wandasiewicz wrote: > Following the faq, here is my output. Using /dev/audio and sox, I get > scrambled noise. The bytes/sec dont match... > # dd if=/dev/audio of=myvoice.raw > 289+0 records in > 289+0 records out > 147968 bytes transferred in 4.636 secs (31917 bytes/sec) > # dd if=myvoice.raw of=/dev/audio > 289+0 records in > 289+0 records out > 147968 bytes transferred in 16.498 secs (8969 bytes/sec) what is the full output of 'audioctl -a' right after running there commands? I'm guessing that something (sample_rate, precision, channels or encoding) doesn't match between record and play. also note, auich(4) says, "Some hardware implementations only support 48kHz sampling rates." did you try using /dev/sound as well? -- <[EMAIL PROTECTED]>
Re: unusual behaviour mixerctl & audioctl
Still get scambled noise with all of these commands. I'm using an IBM X40. device dev/audio, sampling 8000 --- # rec -c 1 -r 8000 -f U -s b -d /dev/audio myvoice.raw Send break (control-c) to end recording ^C # play -c 1 -r 8000 -f U -s b -d /dev/audio myvoice.raw device /dev/sound, sampling 8000 # rec -c 1 -r 8000 -f U -s b -d /dev/sound myvoice.raw Send break (control-c) to end recording ^C # play -c 1 -r 8000 -f U -s b -d /dev/sound myvoice.raw device /dev/sound, sampling 48000 - # rec -c 1 -r 48000 -f U -s b -d /dev/sound myvoice.raw Send break (control-c) to end recording ^C # play -c 1 -r 48000 -f U -s b -d /dev/sound myvoice.raw device /dev/audio, samping 48000 # rec -c 1 -r 48000 -f U -s b -d /dev/audio myvoice.raw Send break (control-c) to end recording ^C # play -c 1 -r 48000 -f U -s b -d /dev/audio myvoice.raw # audioctl -a name=ICH4 AC97 version=0x01 config=auich0 encodings=ulinear:8,mulaw:8*,alaw:8*,slinear:8*,slinear_le:16,ulinear_le:16*,slinear_be:16*,ulinear_be:16* properties=full_duplex,mmap,independent full_duplex=0 fullduplex=0 blocksize=1600 hiwat=40 lowat=1 monitor_gain=0 mode= play.rate=8000 play.channels=1 play.precision=8 play.encoding=mulaw play.gain=127 play.balance=32 play.port=0x0 play.avail_ports=0x0 play.seek=0 play.samples=0 play.eof=0 play.pause=0 play.error=0 play.waiting=0 play.open=0 play.active=0 play.buffer_size=65536 record.rate=8000 record.channels=1 record.precision=8 record.encoding=mulaw record.gain=191 record.balance=32 record.port=0x1 record.avail_ports=0x7 record.seek=0 record.samples=456960 record.eof=0 record.pause=0 record.error=0 record.waiting=0 record.open=0 record.active=0 record.buffer_size=65536 record.errors=0 On Wed, Jun 22, 2005 at 05:09:33PM -0700, Jacob Meuser wrote: > On Wed, Jun 22, 2005 at 11:39:26PM +0100, Ed Wandasiewicz wrote: > > Following the faq, here is my output. Using /dev/audio and sox, I get > > scrambled noise. The bytes/sec dont match... > > > # dd if=/dev/audio of=myvoice.raw > > 289+0 records in > > 289+0 records out > > 147968 bytes transferred in 4.636 secs (31917 bytes/sec) > > # dd if=myvoice.raw of=/dev/audio > > 289+0 records in > > 289+0 records out > > 147968 bytes transferred in 16.498 secs (8969 bytes/sec) > > what is the full output of 'audioctl -a' right after running there > commands? > > I'm guessing that something (sample_rate, precision, channels or > encoding) doesn't match between record and play. > > also note, auich(4) says, "Some hardware implementations only > support 48kHz sampling rates." > > did you try using /dev/sound as well? > > -- > <[EMAIL PROTECTED]>