* how to configure .asoundrc to make arecord use a default device
@ 2009-07-29 12:46 Jelle de Jong
2009-07-29 15:28 ` stan
0 siblings, 1 reply; 7+ messages in thread
From: Jelle de Jong @ 2009-07-29 12:46 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 566 bytes --]
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
[-- Attachment #2: udev-alsa-setup-debug.txt --]
[-- Type: text/plain, Size: 3595 bytes --]
------------------------------------------------------------------------
# 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
------------------------------------------------------------------------
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to configure .asoundrc to make arecord use a default device
2009-07-29 12:46 how to configure .asoundrc to make arecord use a default device Jelle de Jong
@ 2009-07-29 15:28 ` stan
2009-07-29 17:14 ` Jelle de Jong
0 siblings, 1 reply; 7+ messages in thread
From: stan @ 2009-07-29 15:28 UTC (permalink / raw)
To: alsa-devel
On Wed, 29 Jul 2009 14:46:54 +0200
Jelle de Jong <jelledejong@powercraft.nl> wrote:
> Hello everybody,
>
> I am having some issues making arecord use the default device for
> recording. Could somebody help me get a working .asoundrc
> configuration?
> 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
Make audiodevice0 your default device
http://www.alsa-project.org/main/index.php/Asoundrc#The_default_plugin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to configure .asoundrc to make arecord use a default device
2009-07-29 15:28 ` stan
@ 2009-07-29 17:14 ` Jelle de Jong
2009-07-29 17:51 ` stan
0 siblings, 1 reply; 7+ messages in thread
From: Jelle de Jong @ 2009-07-29 17:14 UTC (permalink / raw)
To: alsa-devel
On 29/07/09 17:28, stan wrote:
> On Wed, 29 Jul 2009 14:46:54 +0200
> Jelle de Jong<jelledejong@powercraft.nl> wrote:
>
>> Hello everybody,
>>
>> I am having some issues making arecord use the default device for
>> recording. Could somebody help me get a working .asoundrc
>> configuration?
>
>> 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
>
> Make audiodevice0 your default device
>
> http://www.alsa-project.org/main/index.php/Asoundrc#The_default_plugin
Hi Stan thanks for helping out.
In the original mail I attached my asoundrc setup it can also be found
here: http://debian.pastebin.com/m52601230 and now here below.
pcm.!default {
type plug
slave.pcm dmixer
}
pcm.dmixer {
type dmix
ipc_key 1024
slave.pcm hw:audiodevice0
}
ctl.!default {
type hw
card audiodevice0
}
ctl.dmixer {
type hw
card audiodevice0
}
pcm.dsp {
type plug
slave.pcm dmixer
}
ctl.mixer {
type hw
card audiodevice0
}
I am no asourdrc specialist and I always have got issues understanding
the syntax when it comes down to more complicated setups. I know I need
to make the audiodevice0 the default device. But how can I do this
without losing my mixing support, how I configure it so it has dmix and
dsnoop as default devices?
An example how to fix my asoundrc would be really helpful.
Thanks in advance,
Jelle
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to configure .asoundrc to make arecord use a default device
2009-07-29 17:14 ` Jelle de Jong
@ 2009-07-29 17:51 ` stan
2009-07-29 18:29 ` Jelle de Jong
0 siblings, 1 reply; 7+ messages in thread
From: stan @ 2009-07-29 17:51 UTC (permalink / raw)
To: alsa-devel
On Wed, 29 Jul 2009 19:14:46 +0200
Jelle de Jong <jelledejong@powercraft.nl> wrote:
>
> Hi Stan thanks for helping out.
<snip>
> I am no asourdrc specialist and I always have got issues
Neither am I! Ditto with the issues. There are experts around.
> understanding the syntax when it comes down to more complicated
> setups. I know I need to make the audiodevice0 the default device.
> But how can I do this without losing my mixing support, how I
> configure it so it has dmix and dsnoop as default devices?
>
> An example how to fix my asoundrc would be really helpful.
You're asking the wrong guy! I just use the page I pointed you to, web
search, and trial and error to get an .asoundrc that works. I don't
actually use one right now.
I notice that your USB device is actually interpreted as 4 cards. Are
they each of different functionality? You could try (as a wild guess):
> pcm.!default {
> type plug{
> slave.pcm dmixer
slave.pcm drecord
}
> }
> pcm.dmixer {
> type dmix
> ipc_key 1024
> slave.pcm hw:audiodevice0
> }
pcm.drecord {
type dsnoop
ipc_key 1025
slave.pcm hw:audiodevice0
}
> ctl.!default {
> type hw
> card audiodevice0
> }
> ctl.dmixer {
> type hw
> card audiodevice0
> }
> ctl.drecord {
> type hw
> card audiodevice0
> }
> pcm.dsp {
> type plug {
> slave.pcm dmixer
> slave.pcm drecord
}
> }
> ctl.mixer {
> type hw
> card audiodevice0
> }
All this is supposition on my part. Maybe it will give you enough of a
hint in some way to get it working.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to configure .asoundrc to make arecord use a default device
2009-07-29 17:51 ` stan
@ 2009-07-29 18:29 ` Jelle de Jong
2009-07-29 18:52 ` stan
0 siblings, 1 reply; 7+ messages in thread
From: Jelle de Jong @ 2009-07-29 18:29 UTC (permalink / raw)
To: alsa-devel
On 29/07/09 19:51, stan wrote:
> On Wed, 29 Jul 2009 19:14:46 +0200
> Jelle de Jong<jelledejong@powercraft.nl> wrote:
>
>> Hi Stan thanks for helping out.
> <snip>
>> I am no asourdrc specialist and I always have got issues
>
> Neither am I! Ditto with the issues. There are experts around.
>
>> understanding the syntax when it comes down to more complicated
>> setups. I know I need to make the audiodevice0 the default device.
>> But how can I do this without losing my mixing support, how I
>> configure it so it has dmix and dsnoop as default devices?
>>
>> An example how to fix my asoundrc would be really helpful.
>
> You're asking the wrong guy! I just use the page I pointed you to, web
> search, and trial and error to get an .asoundrc that works. I don't
> actually use one right now.
>
> I notice that your USB device is actually interpreted as 4 cards. Are
> they each of different functionality? You could try (as a wild guess):
>
>> pcm.!default {
>> type plug{
>> slave.pcm dmixer
> slave.pcm drecord
> }
>> }
>> pcm.dmixer {
>> type dmix
>> ipc_key 1024
>> slave.pcm hw:audiodevice0
>> }
> pcm.drecord {
> type dsnoop
> ipc_key 1025
> slave.pcm hw:audiodevice0
> }
>> ctl.!default {
>> type hw
>> card audiodevice0
>> }
>> ctl.dmixer {
>> type hw
>> card audiodevice0
>> }
>> ctl.drecord {
>> type hw
>> card audiodevice0
>> }
>> pcm.dsp {
>> type plug {
>> slave.pcm dmixer
>> slave.pcm drecord
> }
>> }
>> ctl.mixer {
>> type hw
>> card audiodevice0
>> }
>
> All this is supposition on my part. Maybe it will give you enough of a
> hint in some way to get it working.
I don't know how you got it working but i tried several similar setups,
and I ether get syntax error, working recording with broken playing, or
working playing with broken recording. :( see:
http://debian.pastebin.com/m37d09000
I really hope somebody can show a cut and paste .asoundrc that I can use
for testing.
Thanks in advance,
Jelle
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to configure .asoundrc to make arecord use a default device
2009-07-29 18:29 ` Jelle de Jong
@ 2009-07-29 18:52 ` stan
2009-07-29 19:39 ` Jelle de Jong
0 siblings, 1 reply; 7+ messages in thread
From: stan @ 2009-07-29 18:52 UTC (permalink / raw)
To: alsa-devel
On Wed, 29 Jul 2009 20:29:08 +0200
Jelle de Jong <jelledejong@powercraft.nl> wrote:
> I really hope somebody can show a cut and paste .asoundrc that I can
> use for testing.
Someone sent me this link of pre-configured .asoundrc files.
http://home.roadrunner.com/~infofiles/asoundrc.examples.html
Maybe one of those will work for you.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to configure .asoundrc to make arecord use a default device
2009-07-29 18:52 ` stan
@ 2009-07-29 19:39 ` Jelle de Jong
0 siblings, 0 replies; 7+ messages in thread
From: Jelle de Jong @ 2009-07-29 19:39 UTC (permalink / raw)
To: alsa-devel
On 29/07/09 20:52, stan wrote:
> On Wed, 29 Jul 2009 20:29:08 +0200
> Jelle de Jong<jelledejong@powercraft.nl> wrote:
>
>
>> I really hope somebody can show a cut and paste .asoundrc that I can
>> use for testing.
>
> Someone sent me this link of pre-configured .asoundrc files.
>
> http://home.roadrunner.com/~infofiles/asoundrc.examples.html
>
> Maybe one of those will work for you.
Thanks for the hint. i saw that page before sometime in the past :-)
The asym plug seems to be what whe want :D I am testing it now.
pcm.!default {
type asym
playback.pcm {
type plug
slave.pcm "dmixer"
}
capture.pcm {
type plug
slave.pcm "drecord"
}
}
pcm.dmixer {
type dmix
ipc_key 1024
slave.pcm hw:audiodevice0
}
pcm.drecord {
type dsnoop
ipc_key 2048
slave.pcm hw:audiodevice0
}
ctl.!default {
type hw
card audiodevice0
}
Anybody that sees some missing things here? I needs to work with oss,
alsa and gstreamer alsasinks.
Best regards,
Jelle
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-07-29 19:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-29 12:46 how to configure .asoundrc to make arecord use a default device Jelle de Jong
2009-07-29 15:28 ` stan
2009-07-29 17:14 ` Jelle de Jong
2009-07-29 17:51 ` stan
2009-07-29 18:29 ` Jelle de Jong
2009-07-29 18:52 ` stan
2009-07-29 19:39 ` Jelle de Jong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.