Hello everybody,
I am having some issues making arecord use the default device for
recording. Could somebody help me get a working .asoundrc configuration?
I attached all information in the attachment and also made temporary
hyperlink: http://debian.pastebin.com/m52601230
It works with:
arecord -v -f S16_LE -r 44100 -D audiodevice0 ~/record0.wav
but it does not work with:
arecord -v -f S16_LE -r 44100 ~/record0.wav
background:
http://mailman.alsa-project.org/pipermail/alsa-devel/2008-November/012366.html
Thanks in advance,
Best regards,
Jelle de Jong
------------------------------------------------------------------------
# ls -hal /dev/snd/
total 0
drwxr-xr-x 2 root root 320 2009-07-29 10:21 .
drwxr-xr-x 14 root root 4.9K 2009-07-29 12:26 ..
crw-rw---- 1 root user0 116, 0 2009-07-29 10:21 controlC0
crw-rw---- 1 root user1 116, 32 2009-07-29 10:21 controlC1
crw-rw---- 1 root user2 116, 64 2009-07-29 10:21 controlC2
crw-rw---- 1 root user3 116, 96 2009-07-29 10:21 controlC3
crw-rw---- 1 root user0 116, 24 2009-07-29 10:21 pcmC0D0c
crw-rw---- 1 root user0 116, 16 2009-07-29 11:26 pcmC0D0p
crw-rw---- 1 root user1 116, 56 2009-07-29 10:21 pcmC1D0c
crw-rw---- 1 root user1 116, 48 2009-07-29 10:40 pcmC1D0p
crw-rw---- 1 root user2 116, 88 2009-07-29 10:21 pcmC2D0c
crw-rw---- 1 root user2 116, 80 2009-07-29 12:26 pcmC2D0p
crw-rw---- 1 root user3 116, 120 2009-07-29 10:21 pcmC3D0c
crw-rw---- 1 root user3 116, 112 2009-07-29 10:37 pcmC3D0p
crw-rw---- 1 root audio 116, 1 2009-07-29 10:21 seq
crw-rw---- 1 root audio 116, 33 2009-07-29 10:21 timer
------------------------------------------------------------------------
# cat /proc/asound/cards
0 [audiodevice0 ]: USB-Audio - C-Media USB Audio Device
C-Media USB Audio Device at usb-0000:00:13.0-1, full speed
1 [audiodevice1 ]: USB-Audio - C-Media USB Audio Device
C-Media USB Audio Device at usb-0000:00:13.0-2, full speed
2 [audiodevice2 ]: USB-Audio - C-Media USB Audio Device
C-Media USB Audio Device at usb-0000:00:13.3-1, full speed
3 [audiodevice3 ]: USB-Audio - C-Media USB Audio Device
C-Media USB Audio Device at usb-0000:00:13.3-2, full speed
------------------------------------------------------------------------
# cat /home/user0/.asoundrc
pcm.!default {
type plug
slave.pcm dmixer
}
pcm.dmixer {
type dmix
ipc_key 2048
slave.pcm hw:audiodevice0
}
ctl.dmixer {
type hw
card audiodevice0
}
pcm.dsp {
type plug
slave.pcm dmixer
}
ctl.mixer {
type hw
card audiodevice0
}
------------------------------------------------------------------------
su user0
# This is the issue. how can I configure the asoundrc so that arecord
# uses audiodevice0 by default like speaker-test already does for playing.
$ arecord -v -f S16_LE -r 44100 ~/record1.wav
ALSA lib pcm_dmix.c:947:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
arecord: main:608: audio open error: Invalid argument
$ arecord -v -f S16_LE -r 44100 -D hw:audiodevice0 ~/record0.wav
Recording WAVE '/home/user0/record0.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
Hardware PCM card 0 'C-Media USB Audio Device ' device 0 subdevice 0
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 22050
period_size : 5513
period_time : 125011
tstamp_mode : NONE
period_step : 1
avail_min : 5513
period_event : 0
start_threshold : 1
stop_threshold : 22050
silence_threshold: 0
silence_size : 0
boundary : 6206523236469964800
appl_ptr : 0
hw_ptr : 0
^CAborted by signal Interrupt...
$ ls -hal ~/record*.wav
-rw-r----- 1 user0 user0 1.8M 2009-07-29 12:56 /home/user0/record0.wa
------------------------------------------------------------------------
su -c "speaker-test -c 2 & speaker-test -c 2 &" user0
------------------------------------------------------------------------
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel