winealsa.drv patch to enum all software devices from .asoundrc

Нискородов Серёжа sghpunk at gmail.com
Mon Feb 13 10:12:00 CST 2012


>> Here is another trouble with snd_ctl_open. Not all devices in alsa
>> configuration files have a predefined ctl. Especially defined by user,
>> for example I don't always define a ctls for all my devices in
>> .asoundconf
>
> You can use the "hw:" prefix for snd_ctl_open. All you need it for is to get
> the card info and the available device indices, which doesn't rely on a custom
> prefix.

It's Ok for hardware devices, but what about software devices?

> The problem with also taking everything shown by "aplay -L" is that it has a
> tendency to list the same device multiple times (which themselves are already
> mostly duplicated from the snd_card_next+etc enumeration, just with different
> prefixes). It can greatly increase the number of devices for no reason, IMO.
> You also can't get meaningful names from them (who would know what to make of
> it seeing "HDA NVidia, ALC888 Analog" and "HDA NVidia, ALC888 Digital" next to
> "HDA NVidia - ALC888 Analog" and "HDA NVidia - ALC888 Digital"?).
>
> Registry options to skip device enumeration and to supply a custom list of
> devices will be fine, I think, as well as options to specify custom prefixes.

Here is one small thing... You can not predict what devices are
configured for me or someone else. So you cannot hardcode filter
prefixes (like I do in first pacth version). So I suggest to list all
available devices, but maybe to add in winecfg some checkboxes to
display "dmix:", "hw:" or another... But I have no idea how it would
look like...

> I'd agree with getting rid of alsa_try_open, unless there's a reason to keep
> it. I don't think there's a good reason to prevent enumerating the extra
> devices that can't be opened here though. It's status as unavailable/in-use
> can be handled later, I think.

So i will write my patch to enum all available devices (include
enumeration with snd_device_name_hint()) without using alsa_try_open?
And you or someone can add filter options to winecfg.



More information about the wine-devel mailing list