From: Andrew Eikum <aeikum@codeweavers.com>
To: Anssi Hannula <anssi.hannula@iki.fi>
Cc: Andrew Eikum <aeikum@codeweavers.com>,
alsa-devel@alsa-project.org, Joerg-Cyril.Hoehle@t-systems.com
Subject: Re: how to enumerate useful ALSA devices?
Date: Wed, 4 Jan 2012 15:04:58 -0600 [thread overview]
Message-ID: <20120104210458.GG9868@foghorn.codeweavers.com> (raw)
In-Reply-To: <4F04BAF8.6010701@iki.fi>
On Wed, Jan 04, 2012 at 10:47:52PM +0200, Anssi Hannula wrote:
> > Then it occurred to me that this list also contains neither "default"
> > nor the "pulse" device in my asound.conf[1]. Both of these work when
> > passed to aplay.
>
> AFAIK this is because that file is missing the "hint" statement for the
> devices, which are present on my system (Mageia), and also in upstream ALSA:
> http://git.alsa-project.org/?p=alsa-plugins.git;a=blob;f=pulse/50-pulseaudio.conf;h=dd85dab835168bde84d7b8a3be78fb896ece8ea8;hb=HEAD
> http://git.alsa-project.org/?p=alsa-plugins.git;a=blob;f=pulse/99-pulseaudio-default.conf.example;h=4f5885806898a76f5a5c9b3ec76b804fe54e2480;hb=HEAD
>
Ah ha! That does fix it. If I remove the asound.conf entirely, then
"default:CARD=SB" shows up. If I replace the file and add the hints
fields as you suggest, then both virtual devices show up. I wonder
how common this error is across distros. I'll have to test a bit...
In the meantime I've opened an Arch Linux bug.
https://bugs.archlinux.org/task/27829
> > Looking to other projects for help, I find that VLC uses the snd_card_
> > functions, just like Wine currently does. Of course, that fails to
> > find the "pulse" device from asound.conf. And mplayer's libao2 uses a
> > couple of hard-coded device names, which is even worse (right?).
> >
> > So I'm really stuck here. Where am I supposed to get a list of devices
> > that I can present to the user, including their Bluetooth devices and
> > virtual devices from asound.conf?
>
> I guess the preferred one is 'snd_device_name_hint()', but I don't
> really know if the caller is supposed to then handle surroundXX stuff
> themself.
>
> However, note that on systems using pulseaudio (i.e. the default on most
> distros), an automatically (i.e. via bluetooth "add device" wizard of
> their desktop) configured bluetooth headset may be handled by pulse
> directly and not appear as a distinct device in ALSA at all. At least
> this seems to be the case on my system.
>
Really, on a pulse-using machine, we only ever want to use "default",
since PA should handle endpoint selection. It would be ideal not to
present the user with any options at all, but perhaps that can't be
done.
Thanks very much for the tips,
Andrew
next prev parent reply other threads:[~2012-01-04 21:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-04 19:49 how to enumerate useful ALSA devices? Andrew Eikum
2012-01-04 20:47 ` Anssi Hannula
2012-01-04 21:04 ` Andrew Eikum [this message]
2012-01-04 21:16 ` Anssi Hannula
2012-01-05 23:06 ` Raymond Yau
2012-01-06 0:36 ` Anssi Hannula
2012-03-11 3:01 ` Raymond Yau
2012-01-05 5:35 ` Raymond Yau
2012-01-05 9:59 ` Joerg-Cyril.Hoehle
2012-01-05 13:30 ` Raymond Yau
2012-01-05 17:26 ` Anssi Hannula
-- strict thread matches above, loose matches on Subject: below --
2011-12-21 14:37 Joerg-Cyril.Hoehle
2011-12-22 6:27 ` Raymond Yau
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=20120104210458.GG9868@foghorn.codeweavers.com \
--to=aeikum@codeweavers.com \
--cc=Joerg-Cyril.Hoehle@t-systems.com \
--cc=alsa-devel@alsa-project.org \
--cc=anssi.hannula@iki.fi \
/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).