[alsa-devel] how to configure .asoundrc to make arecord use a default device
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.ht...
Thanks in advance,
Best regards,
Jelle de Jong
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
On 29/07/09 17:28, stan wrote:
On Wed, 29 Jul 2009 14:46:54 +0200 Jelle de Jongjelledejong@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
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.
On 29/07/09 19:51, stan wrote:
On Wed, 29 Jul 2009 19:14:46 +0200 Jelle de Jongjelledejong@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
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.
On 29/07/09 20:52, stan wrote:
On Wed, 29 Jul 2009 20:29:08 +0200 Jelle de Jongjelledejong@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
participants (2)
-
Jelle de Jong
-
stan