recording issues
My sound card uses different devices for capture (device 0) and playback (device 1). I have two issues with capture right now:
1. If I do something like:
arecord -f dat -D hw:0,1 -d 5 foo.wav
it seems to record for much longer than 5 seconds. In fact, "time arecord..." tells me that it goes for 10 seconds. If I then try to play back the result with aplay:
aplay foo.wav
the playback is too fast. The same thing happens with the -f cd format. I thought I'd try forcing mono recording but:
[n8gray@golux alsa]$ arecord -D hw:0,1 -c 1 -r 48000 -f S16_LE -d 5 foo.wav
Recording WAVE 'foo.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
arecord: set_params:833: Channels count non available
2. Is there a way to make the OSS emulation use hw:0,0 as the playback device and hw:0,1 as the capture device?
Here's some info:
[n8gray@golux alsa]$ cat /proc/asound/version Advanced Linux Sound Architecture Driver Version 0.9.7a. Compiled on Oct 1 2003 for kernel 2.4.21-0.16mm-mdkcustom.
[n8gray@golux alsa]$ cat /proc/asound/cards
0 [I82801CAICH3 ]: ICH - Intel 82801CA-ICH3
Intel 82801CA-ICH3 at 0xd800, irq 11
[n8gray@golux alsa]$ cat /proc/asound/devices
0: [0- 0]: ctl
25: [0- 1]: digital audio capture
16: [0- 0]: digital audio playback
24: [0- 0]: digital audio capture
1: : sequencer
33: : timer
Can anybody help?
Thanks,
-Nathan
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
-- Nathaniel Gray -- Caltech Computer Science ------> -- Mojave Project -- http://mojave.cs.caltech.edu -->
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 8 lines · On 01-Oct-2003 Nathaniel Gray wrote:
My sound card uses different devices for capture (device 0) and playback (device 1). I have two issues with capture right now:
1. If I do something like:
arecord -f dat -D hw:0,1 -d 5 foo.wav
it seems to record for much longer than 5 seconds. In fact, "time arecord..." tells me that it goes for 10 seconds. If I then try to play back the result with aplay:
Try aplay/arecord -v[vvvvvv] to see what parameters have been actually set. You can also put printk()'s in the driver to check what's going on. Why are you using different devices for capture and playback ? Perhaps it's a typo, but if capture is dev 0, you have to type
arecord -D hw:0,0
^
|--
Giuliano.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 11 lines · Giuliano Pochini
Quoted 8 lines · On 01-Oct-2003 Nathaniel Gray wrote:
My sound card uses different devices for capture (device 0) and playback (device 1). I have two issues with capture right now:
1. If I do something like:
arecord -f dat -D hw:0,1 -d 5 foo.wav
it seems to record for much longer than 5 seconds. In fact, "time arecord..." tells me that it goes for 10 seconds. If I then try to play back the result with aplay:
Quoted 3 lines
Try aplay/arecord -v[vvvvvv] to see what parameters have been actually set. You can also put printk()'s in the driver to check what's going on.
Well before going to printk's here's the -v output:
[n8gray@golux alsa]$ arecord -f dat -D hw:0,1 -d 5 -v foo.wav Recording WAVE 'foo.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Hardware PCM card 0 'Intel 82801CA-ICH3' device 1 subdevice 0
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16buffer_size : 24000period_size : 6000period_time : 125000tick_time : 10000tstamp_mode : NONEperiod_step : 1sleep_min : 0avail_min : 6000xfer_align : 6000start_threshold : 1stop_threshold : 24000silence_threshold: 0silence_size : 0
boundary : 1572864000
[n8gray@golux alsa]$ aplay -v foo.wav
Playing WAVE 'foo.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo Plug PCM: Hardware PCM card 0 'Intel 82801CA-ICH3' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16buffer_size : 12000period_size : 6000period_time : 125000tick_time : 10000tstamp_mode : NONEperiod_step : 1sleep_min : 0avail_min : 6000xfer_align : 6000start_threshold : 12000stop_threshold : 12000silence_threshold: 0silence_size : 0
boundary : 1572864000
Could it be possible that RW_INTERLEAVED is incorrect since playback and record are on different devices?
Quoted 1 line
Why are you using different devices for capture and playback ?
It's the way my card is designed. Recording from hw:0,0 doesn't work.
Quoted 3 lines
Perhaps it's a typo, but if capture is dev 0, you have to type
arecord -D hw:0,0
Yes, that was a typo. Capture is device 1 and playback is device 0.
Thanks,
-Nathan
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
-- Nathaniel Gray -- Caltech Computer Science ------> -- Mojave Project -- http://mojave.cs.caltech.edu -->
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf