* Re: how to enumerate useful ALSA devices?
@ 2012-01-04 19:49 Andrew Eikum
2012-01-04 20:47 ` Anssi Hannula
2012-01-05 9:59 ` Joerg-Cyril.Hoehle
0 siblings, 2 replies; 13+ messages in thread
From: Andrew Eikum @ 2012-01-04 19:49 UTC (permalink / raw)
To: alsa-devel; +Cc: Joerg-Cyril.Hoehle
> The 2008 audio guide recommends
> http://0pointer.de/blog/projects/guide-to-sound-apis.html
> "Do not use the snd_card_xxx() APIs. For enumerating use
> snd_device_name_hint() (and related functions).
> snd_card_xxx() is obsolete... Bluetooth audio are not included"
>
> Is that correct advice?
>
> Wine still uses snd_card, so it knows only about "default" and
> "plughw:x,y". I believe that's wrong but don't know what should be
> used instead in order not to come up with a long list of artificial
> names mentioned in /usr/share/alsa/alsa.conf such as surround51 when
> the poor on-board card knows nothing but 16 bit stereo.
>
> I'm looking for a list of working devices on this machine, which likely
> should contain "default" (usually leading to PA on a recent Ubuntu machine),
> "plug:dmix" (PA getting out of the way when trying to use other devices),
> "hw:0,0" and presumably not much more.
Bump, still hoping for an answer to this.
I tried experimenting with snd_device_name_hint(). It gave me what
looked like a promising list, consisting of:
null
front:CARD=SB,DEV=0
surround40:CARD=SB,DEV=0
surround41:CARD=SB,DEV=0
surround50:CARD=SB,DEV=0
surround51:CARD=SB,DEV=0
surround71:CARD=SB,DEV=0
iec958:CARD=SB,DEV=0
This is identical to the list from "aplay -L".
But, passing these to aplay fails if I have PulseAudio running
("device in use"). If I kill PA, then they don't fail, but give
warnings about rate conversion and suggest the plug plugin. So I stick
"plug:" in front of the device name, and they fail again ("unknown
parameter front:CARD"). Clearly I'm doing something very wrong. But I
don't know what!
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.
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?
[1] asound.conf from Arch Linux pulseaudio-alsa package:
http://projects.archlinux.org/svntogit/packages.git/tree/trunk/asound.conf?h=packages/pulseaudio-alsa
Andrew
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: how to enumerate useful ALSA devices?
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
` (2 more replies)
2012-01-05 9:59 ` Joerg-Cyril.Hoehle
1 sibling, 3 replies; 13+ messages in thread
From: Anssi Hannula @ 2012-01-04 20:47 UTC (permalink / raw)
To: Andrew Eikum; +Cc: alsa-devel, Joerg-Cyril.Hoehle
Hi,
I'm not really an expert on ALSA api (having never actually used it),
but I'll try to clarify what I can. I hope someone will correct me if
I'm wrong on some point.
On 04.01.2012 21:49, Andrew Eikum wrote:
>> The 2008 audio guide recommends
>> http://0pointer.de/blog/projects/guide-to-sound-apis.html
>> "Do not use the snd_card_xxx() APIs. For enumerating use
>> snd_device_name_hint() (and related functions).
>> snd_card_xxx() is obsolete... Bluetooth audio are not included"
>>
>> Is that correct advice?
>>
>> Wine still uses snd_card, so it knows only about "default" and
>> "plughw:x,y". I believe that's wrong but don't know what should be
>> used instead in order not to come up with a long list of artificial
>> names mentioned in /usr/share/alsa/alsa.conf such as surround51 when
>> the poor on-board card knows nothing but 16 bit stereo.
>>
>> I'm looking for a list of working devices on this machine, which likely
>> should contain "default" (usually leading to PA on a recent Ubuntu machine),
>> "plug:dmix" (PA getting out of the way when trying to use other devices),
>> "hw:0,0" and presumably not much more.
Probably not "hw:0,0", though, as AFAIK one should prefer the symbolical
names instead (e.g. those in "aplay -L").
> Bump, still hoping for an answer to this.
>
> I tried experimenting with snd_device_name_hint(). It gave me what
> looked like a promising list, consisting of:
>
> null
> front:CARD=SB,DEV=0
> surround40:CARD=SB,DEV=0
> surround41:CARD=SB,DEV=0
> surround50:CARD=SB,DEV=0
> surround51:CARD=SB,DEV=0
> surround71:CARD=SB,DEV=0
> iec958:CARD=SB,DEV=0
>
> This is identical to the list from "aplay -L".
>
> But, passing these to aplay fails if I have PulseAudio running
> ("device in use").
Correct. You need to use pulse directly or the default/pulse device
which passes audio to pulseaudio.
> If I kill PA, then they don't fail, but give
> warnings about rate conversion and suggest the plug plugin. So I stick
> "plug:" in front of the device name, and they fail again ("unknown
> parameter front:CARD"). Clearly I'm doing something very wrong. But I
> don't know what!
"plug:'surround71:CARD=SB,DEV=0'"
> 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
> 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.
> [1] asound.conf from Arch Linux pulseaudio-alsa package:
> http://projects.archlinux.org/svntogit/packages.git/tree/trunk/asound.conf?h=packages/pulseaudio-alsa
>
> Andrew
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
--
Anssi Hannula
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: how to enumerate useful ALSA devices?
2012-01-04 20:47 ` Anssi Hannula
@ 2012-01-04 21:04 ` Andrew Eikum
2012-01-04 21:16 ` Anssi Hannula
2012-01-05 5:35 ` Raymond Yau
2 siblings, 0 replies; 13+ messages in thread
From: Andrew Eikum @ 2012-01-04 21:04 UTC (permalink / raw)
To: Anssi Hannula; +Cc: Andrew Eikum, alsa-devel, Joerg-Cyril.Hoehle
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to enumerate useful ALSA devices?
2012-01-04 20:47 ` Anssi Hannula
2012-01-04 21:04 ` Andrew Eikum
@ 2012-01-04 21:16 ` Anssi Hannula
2012-01-05 23:06 ` Raymond Yau
2012-01-05 5:35 ` Raymond Yau
2 siblings, 1 reply; 13+ messages in thread
From: Anssi Hannula @ 2012-01-04 21:16 UTC (permalink / raw)
To: Andrew Eikum; +Cc: alsa-devel, Joerg-Cyril.Hoehle
On 04.01.2012 22:47, Anssi Hannula wrote:
> On 04.01.2012 21:49, Andrew Eikum wrote:
>> But, passing these to aplay fails if I have PulseAudio running
>> ("device in use").
>
> Correct. You need to use pulse directly or the default/pulse device
> which passes audio to pulseaudio.
For the record, pulseaudio does release the device by default after it
has been unused for a few seconds. Not that it matters much here, though.
>> 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.
Reading your last reply made me realize that I forgot that when
pulseaudio is not configured, there is also the "default:CARD=foo"
device listed (which you noticed), so I guess one could just ignore
entries beginning with "front:" or "surround(40|41|50|51|71):", since
one can just use "default" instead of them.
--
Anssi Hannula
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: how to enumerate useful ALSA devices?
2012-01-04 21:16 ` Anssi Hannula
@ 2012-01-05 23:06 ` Raymond Yau
2012-01-06 0:36 ` Anssi Hannula
0 siblings, 1 reply; 13+ messages in thread
From: Raymond Yau @ 2012-01-05 23:06 UTC (permalink / raw)
To: alsa-devel
2012/1/5, Anssi Hannula <anssi.hannula@iki.fi>:
> On 04.01.2012 22:47, Anssi Hannula wrote:
>> On 04.01.2012 21:49, Andrew Eikum wrote:
>
>>> 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.
>
> Reading your last reply made me realize that I forgot that when
> pulseaudio is not configured, there is also the "default:CARD=foo"
> device listed (which you noticed), so I guess one could just ignore
> entries beginning with "front:" or "surround(40|41|50|51|71):", since
> one can just use "default" instead of them.
>
No , this won't work for emu10k1 and ca0106
snd-emu10k1 require "front", "surround40","surround51" and
"surround71" which use "multi" plugin of "front" , "rear" , "clfe" or
"side" devices
you can play stereo stream to "rear" device
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to enumerate useful ALSA devices?
2012-01-05 23:06 ` Raymond Yau
@ 2012-01-06 0:36 ` Anssi Hannula
2012-03-11 3:01 ` Raymond Yau
0 siblings, 1 reply; 13+ messages in thread
From: Anssi Hannula @ 2012-01-06 0:36 UTC (permalink / raw)
To: alsa-devel
On 06.01.2012 01:06, Raymond Yau wrote:
> 2012/1/5, Anssi Hannula <anssi.hannula@iki.fi>:
>> On 04.01.2012 22:47, Anssi Hannula wrote:
>>> On 04.01.2012 21:49, Andrew Eikum wrote:
>>
>>>> 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.
>>
>> Reading your last reply made me realize that I forgot that when
>> pulseaudio is not configured, there is also the "default:CARD=foo"
>> device listed (which you noticed), so I guess one could just ignore
>> entries beginning with "front:" or "surround(40|41|50|51|71):", since
>> one can just use "default" instead of them.
>>
>
> No , this won't work for emu10k1 and ca0106
>
> snd-emu10k1 require "front", "surround40","surround51" and
> "surround71" which use "multi" plugin of "front" , "rear" , "clfe" or
> "side" devices
>
> you can play stereo stream to "rear" device
Ah, thanks for the correction.
--
Anssi Hannula
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to enumerate useful ALSA devices?
2012-01-06 0:36 ` Anssi Hannula
@ 2012-03-11 3:01 ` Raymond Yau
0 siblings, 0 replies; 13+ messages in thread
From: Raymond Yau @ 2012-03-11 3:01 UTC (permalink / raw)
To: alsa-devel
2012/1/6, Anssi Hannula <anssi.hannula@iki.fi>:
> On 06.01.2012 01:06, Raymond Yau wrote:
>> 2012/1/5, Anssi Hannula <anssi.hannula@iki.fi>:
>>> On 04.01.2012 22:47, Anssi Hannula wrote:
>>>> On 04.01.2012 21:49, Andrew Eikum wrote:
>>>
>>>>> 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.
>>>
>>> Reading your last reply made me realize that I forgot that when
>>> pulseaudio is not configured, there is also the "default:CARD=foo"
>>> device listed (which you noticed), so I guess one could just ignore
>>> entries beginning with "front:" or "surround(40|41|50|51|71):", since
>>> one can just use "default" instead of them.
>>>
>>
>> No , this won't work for emu10k1 and ca0106
>>
>> snd-emu10k1 require "front", "surround40","surround51" and
>> "surround71" which use "multi" plugin of "front" , "rear" , "clfe" or
>> "side" devices
>>
>> you can play stereo stream to "rear" device
>
> Ah, thanks for the correction.
>
>
The use of "surround51" is not limited to emu10k1, some ac97 codec
which support smart51 or Universal Jacks need to switch "channel mode"
to 6ch when the motherboards have 3 audio jacks
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5548
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to enumerate useful ALSA devices?
2012-01-04 20:47 ` Anssi Hannula
2012-01-04 21:04 ` Andrew Eikum
2012-01-04 21:16 ` Anssi Hannula
@ 2012-01-05 5:35 ` Raymond Yau
2 siblings, 0 replies; 13+ messages in thread
From: Raymond Yau @ 2012-01-05 5:35 UTC (permalink / raw)
To: alsa-devel
2012/1/5, Anssi Hannula <anssi.hannula@iki.fi>:
> Hi,
>
> I'm not really an expert on ALSA api (having never actually used it),
> but I'll try to clarify what I can. I hope someone will correct me if
> I'm wrong on some point.
>
> On 04.01.2012 21:49, Andrew Eikum wrote:
>>> The 2008 audio guide recommends
>>> http://0pointer.de/blog/projects/guide-to-sound-apis.html
>>> "Do not use the snd_card_xxx() APIs. For enumerating use
>>> snd_device_name_hint() (and related functions).
>>> snd_card_xxx() is obsolete... Bluetooth audio are not included"
>>>
>>> Is that correct advice?
>>>
>>> Wine still uses snd_card, so it knows only about "default" and
>>> "plughw:x,y". I believe that's wrong but don't know what should be
>>> used instead in order not to come up with a long list of artificial
>>> names mentioned in /usr/share/alsa/alsa.conf such as surround51 when
>>> the poor on-board card knows nothing but 16 bit stereo.
>>>
>>> I'm looking for a list of working devices on this machine, which likely
>>> should contain "default" (usually leading to PA on a recent Ubuntu
>>> machine),
>>> "plug:dmix" (PA getting out of the way when trying to use other devices),
>>> "hw:0,0" and presumably not much more.
>
> Probably not "hw:0,0", though, as AFAIK one should prefer the symbolical
> names instead (e.g. those in "aplay -L").
AFAIK PA server only use one sink and one source
so if you have two or more sound cards , you still can open hw device
of your second sound card which is not used by PA server.
>
>> Bump, still hoping for an answer to this.
>>
>> I tried experimenting with snd_device_name_hint(). It gave me what
>> looked like a promising list, consisting of:
>>
>> null
>> front:CARD=SB,DEV=0
>> surround40:CARD=SB,DEV=0
>> surround41:CARD=SB,DEV=0
>> surround50:CARD=SB,DEV=0
>> surround51:CARD=SB,DEV=0
>> surround71:CARD=SB,DEV=0
>> iec958:CARD=SB,DEV=0
>>
>> This is identical to the list from "aplay -L".
The hint just mean that surround71 may be supported and
you get the above list even when your HDA codec support stereo only
so you still have to check whether pcm device support multi-channels
like PA server
>>
>> But, passing these to aplay fails if I have PulseAudio running
>> ("device in use").
>
> Correct. You need to use pulse directly or the default/pulse device
> which passes audio to pulseaudio.
>
>> If I kill PA, then they don't fail, but give
>> warnings about rate conversion and suggest the plug plugin. So I stick
>> "plug:" in front of the device name, and they fail again ("unknown
>> parameter front:CARD"). Clearly I'm doing something very wrong. But I
>> don't know what!
Try aplay -D "plug:'front:CARD=SB'" foo.wav
>
> "plug:'surround71:CARD=SB,DEV=0'"
>
The drawback of using "plug:" is you cannot know whether the device
really support multi-channels
the alternative is to find those "Surround Playback Volume", "Center
Playback Volume" or "Side Playback Volume" controls
>> 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
>
The list name hint provide more device names (e.g. dmix, dsnoop,
plughw and hw) if the user change defaults.namehint.extended from
"off" to "on
# show all name hints also for definitions without hint {} section
defaults.namehint.showall off
# show just basic name hints
defaults.namehint.basic on
# show extended name hints
defaults.namehint.extended off
>> 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.
>
It sill does not provide "device 2" Independent Headphone for ADI and
VIA codecs
(i.e. Realtek HDA 2nd Output in windows)
^ permalink raw reply [flat|nested] 13+ messages in thread
* how to enumerate useful ALSA devices?
2012-01-04 19:49 how to enumerate useful ALSA devices? Andrew Eikum
2012-01-04 20:47 ` Anssi Hannula
@ 2012-01-05 9:59 ` Joerg-Cyril.Hoehle
2012-01-05 13:30 ` Raymond Yau
2012-01-05 17:26 ` Anssi Hannula
1 sibling, 2 replies; 13+ messages in thread
From: Joerg-Cyril.Hoehle @ 2012-01-05 9:59 UTC (permalink / raw)
To: aeikum, alsa-devel
Andrew Eikum wrote:
>I tried experimenting with snd_device_name_hint().
>surround40:CARD=SB,DEV=0
>surround41:CARD=SB,DEV=0
>surround50:CARD=SB,DEV=0
>surround51:CARD=SB,DEV=0
>surround71:CARD=SB,DEV=0
I'm not sure Wine should enumerate these. How can it tell the difference
so as to announce the correct channel mapping to applications?
E.g. 41 vs 50, both 5 channels? Ideally, that should be announced as
one device (as it really is), capable of supporting different formats,
with one preferred format (perhaps the one with most channels) that GetMixFormat uses.
OTOH, I find it important that Wine announces a device capable of more
than stereo if there's one in the system.
Regards,
Jörg Höhle
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to enumerate useful ALSA devices?
2012-01-05 9:59 ` Joerg-Cyril.Hoehle
@ 2012-01-05 13:30 ` Raymond Yau
2012-01-05 17:26 ` Anssi Hannula
1 sibling, 0 replies; 13+ messages in thread
From: Raymond Yau @ 2012-01-05 13:30 UTC (permalink / raw)
To: alsa-devel
2012/1/5, Joerg-Cyril.Hoehle@t-systems.com <Joerg-Cyril.Hoehle@t-systems.com>:
> Andrew Eikum wrote:
>>I tried experimenting with snd_device_name_hint().
>>surround40:CARD=SB,DEV=0
>>surround41:CARD=SB,DEV=0
>>surround50:CARD=SB,DEV=0
>>surround51:CARD=SB,DEV=0
>>surround71:CARD=SB,DEV=0
> I'm not sure Wine should enumerate these. How can it tell the difference
> so as to announce the correct channel mapping to applications?
> E.g. 41 vs 50, both 5 channels? Ideally, that should be announced as
> one device (as it really is), capable of supporting different formats,
> with one preferred format (perhaps the one with most channels) that
> GetMixFormat uses.
>
> OTOH, I find it important that Wine announces a device capable of more
> than stereo if there's one in the system.
>
Does windows really support 41 or 50 ?
All those Creative 4.1 speakers only have front and green jacks (i.e.
the signal for subwoofer is generated by hardware from front and rear
)
e09736109edc978c0e676cbbb5bfef84bdd1d666
Added surround41 and surround50 definitions
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to enumerate useful ALSA devices?
2012-01-05 9:59 ` Joerg-Cyril.Hoehle
2012-01-05 13:30 ` Raymond Yau
@ 2012-01-05 17:26 ` Anssi Hannula
1 sibling, 0 replies; 13+ messages in thread
From: Anssi Hannula @ 2012-01-05 17:26 UTC (permalink / raw)
To: Joerg-Cyril.Hoehle; +Cc: aeikum, alsa-devel
On 05.01.2012 11:59, Joerg-Cyril.Hoehle@t-systems.com wrote:
> Andrew Eikum wrote:
>> I tried experimenting with snd_device_name_hint().
>> surround40:CARD=SB,DEV=0
>> surround41:CARD=SB,DEV=0
>> surround50:CARD=SB,DEV=0
>> surround51:CARD=SB,DEV=0
>> surround71:CARD=SB,DEV=0
> I'm not sure Wine should enumerate these. How can it tell the difference
> so as to announce the correct channel mapping to applications?
> E.g. 41 vs 50, both 5 channels? Ideally, that should be announced as
> one device (as it really is), capable of supporting different formats,
> with one preferred format (perhaps the one with most channels) that GetMixFormat uses.
Yep, as noted I think it should just ignore "surroundXX" and "front" and
only announce the "default" ones (there will be multiple "default" ones
with different $CARD when there are multiple cards, except when
pulseaudio is in use in which case there is only one "default" which
goes to pulseaudio).
IIRC the "surroundXX" and "front" ones are just legacy stuff. Then
again, if that is the case, one'd except them to not have the hint tag
making them listed in "-L"...
> OTOH, I find it important that Wine announces a device capable of more
> than stereo if there's one in the system.
--
Anssi Hannula
^ permalink raw reply [flat|nested] 13+ messages in thread
* how to enumerate useful ALSA devices?
@ 2011-12-21 14:37 Joerg-Cyril.Hoehle
2011-12-22 6:27 ` Raymond Yau
0 siblings, 1 reply; 13+ messages in thread
From: Joerg-Cyril.Hoehle @ 2011-12-21 14:37 UTC (permalink / raw)
To: alsa-devel
Hi,
The 2008 audio guide recommends
http://0pointer.de/blog/projects/guide-to-sound-apis.html
"Do not use the snd_card_xxx() APIs. For enumerating use
snd_device_name_hint() (and related functions).
snd_card_xxx() is obsolete... Bluetooth audio are not included"
Is that correct advice?
Wine still uses snd_card, so it knows only about "default" and
"plughw:x,y". I believe that's wrong but don't know what should be
used instead in order not to come up with a long list of artificial
names mentioned in /usr/share/alsa/alsa.conf such as surround51 when
the poor on-board card knows nothing but 16 bit stereo.
I'm looking for a list of working devices on this machine, which likely
should contain "default" (usually leading to PA on a recent Ubuntu machine),
"plug:dmix" (PA getting out of the way when trying to use other devices),
"hw:0,0" and presumably not much more.
Thank you for your help,
Jörg Höhle
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to enumerate useful ALSA devices?
2011-12-21 14:37 Joerg-Cyril.Hoehle
@ 2011-12-22 6:27 ` Raymond Yau
0 siblings, 0 replies; 13+ messages in thread
From: Raymond Yau @ 2011-12-22 6:27 UTC (permalink / raw)
To: alsa-devel
2011/12/21, Joerg-Cyril.Hoehle@t-systems.com <Joerg-Cyril.Hoehle@t-systems.com>:
> Hi,
>
> The 2008 audio guide recommends
> http://0pointer.de/blog/projects/guide-to-sound-apis.html
> "Do not use the snd_card_xxx() APIs. For enumerating use
> snd_device_name_hint() (and related functions).
> snd_card_xxx() is obsolete... Bluetooth audio are not included"
>
> Is that correct advice?
The only correct item is "Bluetooth audio are not included"
AFAIK, snd_card_xxx() is not obsoleted
>
> Wine still uses snd_card, so it knows only about "default" and
> "plughw:x,y". I believe that's wrong but don't know what should be
> used instead in order not to come up with a long list of artificial
> names mentioned in /usr/share/alsa/alsa.conf such as surround51 when
> the poor on-board card knows nothing but 16 bit stereo.
>
For those MATX size motherboard with 3 audio jacks at rear panel or
those high-end notebook with 3 or 4 jacks
the user need to use "channel mode" or "smart5.1" to retask the two
input pins for output for surroun51
http://git.alsa-project.org/?p=alsa-kernel.git;a=blob_plain;f=Documentation/sound/alsa/HD-Audio-Controls.txt
do wine need AC3 pass-though SPDIF ? ( IEC958 )
It is still not clear how to find a valid HDMI device ?
> I'm looking for a list of working devices on this machine, which likely
> should contain "default" (usually leading to PA on a recent Ubuntu
> machine),
> "plug:dmix" (PA getting out of the way when trying to use other devices),
> "hw:0,0" and presumably not much more.
>
> Thank you for your help,
> Jörg Höhle
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-03-11 3:01 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).