[Bug 27917] [regression] sound does not work, wine chooses wrong pcm

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Jul 27 10:15:02 CDT 2011


--- Comment #3 from David Naylor <naylor.b.david at gmail.com> 2011-07-27 10:15:01 CDT ---
Thanks for your quick response.  

Reading [2] I interpret that flag indicating a device's suitability as a
default device, not that the device *is* the default device.  Nor does it say
only one device may have this flag set (and only implies multiple devices may
have the flag set).  What is the intended use of PCM_CAP_DEFAULT?  And how is
it used in other oss implementations?  

Does not the second last paragraph imply /dev/dsp should be used as the default

I looked through the source code for FreeBSD and found:

# grep -r PCM_CAP_DEFAULT .
./sys/sys/soundcard.h:# define PCM_CAP_DEFAULT          0x40000000      /*
"Default" device */
./sys/sys/soundcard.h:#define DSP_CAP_DEFAULT           PCM_CAP_DEFAULT
# grep -r DSP_CAP_DEFAULT .
./sys/sys/soundcard.h:#define DSP_CAP_DEFAULT           PCM_CAP_DEFAULT

Which I interpret that FreeBSD does not even set *_CAP_DEFAULT for any device. 
FreeBSD does provide a way to determine the default device (and change it) via
the sysctl "hw.snd.default_unit".  I think there is definitely a bug in
FreeBSD's OSS implementation and will gladly report it.  

I looked through the trace and found two different caps: 23200 and 13200.  The
first occurrence of 13200 is the default device.  I cannot say if that is
significant or just chance.  

I have made a patch to set PCM_CAP_DEFAULT for the default device.  I will test
it, then the one you just posted, and report back.

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list