Revamp the initialization for Alsa

Jeremy White jwhite at codeweavers.com
Thu Jun 16 13:11:04 CDT 2005


This patch revamps the way Alsa initialization is done.

With this patch, Wine now does the following:  scan all cards given
by Alsa (not brute force 0-5), respect alsa defaults
and environment variable overrides, probe to see
if a reported Alsa device is useful (e.g. strip my
Modem from the list of reported sound cards),
and provide a mechanism for an end user to explicitly
configure Wine to use Alsa.

The default configuration values should 'just work'
in most cases, but the following registry values are
permitted to provide finer control:

**  [Software\Wine\Wine\Config\ALSA]
**  AutoScanCards           Whether or not to scan all known sound cards
**                          and add them to Wine's list (default yes)
**  AutoScanDevices         Whether or not to scan all known PCM devices
**                          on each card (default no)
**  UseDirectHW             If set, we use only the hw:X pcm name,
**			    instead of the default behavior of trying
**                          default:X with a fallback to plughw:X.
**                          (Default no)
**  DeviceCount             If present, specifies the number of hard coded
**                          Alsa devices to add to Wine's list; default 0
**  DevicePCMn              Specifies the Alsa PCM devices to open for
**                          Device n (where n goes from 1 to DeviceCount)
**  DeviceCTLn              Specifies the Alsa control devices to open for
**                          Device n (where n goes from 1 to DeviceCount)
**
**                          Using AutoScanCards no, and then Devicexxx info
**                          is a way to exactly specify the devices used by Wine.

This patch has been privately verified by Kevin Koltzau (thanks, Kevin),
and works for me on a variety of machines, as well as working for Rob Shearman.

I believe it to be fundamentally correct, and an improvement.  Vagaries of Alsa,
however, leave me a bit unsatisified, and suspicious that more work will need
to be done.  But I think this is a better base to start from than what was
there before.

Cheers,

Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alsa6.diff
Type: text/x-patch
Size: 86975 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050616/14bdf8ca/alsa6.bin


More information about the wine-patches mailing list