alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: frederik@ofb.net
To: alsa-devel@alsa-project.org
Cc: alsa-user@lists.sourceforge.net
Subject: [alsa-devel] parameter for pulse device?
Date: Wed, 4 Sep 2019 09:47:06 -0700	[thread overview]
Message-ID: <20190904164706.gwjbcywbj7emnwvr@localhost> (raw)

Dear ALSA,

In my ~/.asoundrc, I have lines like this:

    pcm.mic { type pulse; device "mic" }
    pcm.monitor { type pulse; device "monitor"; }
    pcm.music { type pulse; device "music"; }

to make it easier for ALSA-aware programs to input and output via PulseAudio, e.g.:

    ecasound -i alsa,mic -o alsa,monitor -etd:...

However, I would like to simplify this and not have to update ~/.asoundrc every time I create a new PulseAudio device. Since ALSA has the ability for PCMs to take a parameter, I thought this might work with the "pulse" PCM and the PulseAudio device name. But I get an "error: Invalid argument" when trying to pass the device name as an argument to the "pulse" PCM:

    $ ecasound -o alsa,pulse:music -i some.wav
    ...
    ALSA lib conf.c:5014:(snd_config_expand) Unknown parameters music
    ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM pulse:music
    ERROR:  Connecting chainsetup failed: "Enabling chainsetup: AUDIOIO-ALSA:
    ... Unable to open ALSA-device for playback; error: Invalid argument"

Is there some magic with macros that I can use to accomplish this syntax, or can we add the ability for the "pulse" PCM to take a parameter naming the device?

Thanks,

Frederick
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

             reply	other threads:[~2019-09-04 16:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 16:47 frederik [this message]
2019-09-09 17:52 ` [alsa-devel] parameter for pulse device? Takashi Iwai
2019-09-10 17:33   ` frederik
2019-09-17 12:51     ` Tanu Kaskinen
2019-09-17 12:55       ` Takashi Iwai
2019-09-17 13:14         ` Tanu Kaskinen
2019-09-17 13:17           ` Takashi Iwai
2019-09-19 21:12             ` frederik
2019-09-20  7:35               ` Tanu Kaskinen
2019-09-20  7:44                 ` Takashi Iwai
2019-10-15 15:52                   ` frederik
2019-10-18  6:17                     ` Takashi Iwai
2019-10-18  6:41                       ` frederik
2019-09-12 15:42 ` [alsa-devel] How to check ALSA version in Linux kernel xinhui zhou
2019-09-15  9:33   ` Takashi Iwai
2019-11-15 23:28   ` [alsa-devel] Number of PCM instance (pcm device file) for one sound card xinhui zhou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190904164706.gwjbcywbj7emnwvr@localhost \
    --to=frederik@ofb.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=alsa-user@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).