The latest WINE and /dev/mixer*

Gerald Pfeifer gerald at
Sat Dec 27 15:49:20 PST 2003

Mathew Kanner wrote:
> 	A brief look at the wine source shows that they are relying on
> the SOUND_MIXER_INFO ioctl if defined.  We define it but we don't
> support it [...]
> 	We can't easily implement the ioctl because we don't carry
> specific device string info with the mixer device.  (nor any of the
> other fields in the struct mixer_info)

Ouch. Now that's _really_ bad!

That way we cannot even use autoconf to detect support for the
SOUND_MIXER_INFO ioctl; why do we pretent to support something
which we actually don't?

> 	An easy hack would be to #undef SOUND_MIXER_INFO at the top of
> wine/dlls/winmm/wineoss/audio.c (but after the includes)
> 	Good luck, and if it works, please submit a PR with the patch
> for the wine port.

Travis confirmed that this worked for him.  How about the patch below?

Index: audio.c
RCS file: /home/wine/wine/dlls/winmm/wineoss/audio.c,v
retrieving revision 1.108
diff -u -3 -p -r1.108 audio.c
--- audio.c	12 Dec 2003 05:55:26 -0000	1.108
+++ audio.c	27 Dec 2003 23:48:35 -0000
@@ -544,10 +544,15 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE*
                 strncpy(ossdev->out_caps.szPname,, sizeof(;
                 TRACE("%s\n", ossdev->ds_desc.szDesc);
             } else {
-                ERR("%s: can't read info!\n", ossdev->mixer_name);
+                ERR("%s: cannot read SOUND_MIXER_INFO!\n", ossdev->mixer_name);
+#ifndef __FreeBSD__
+                /* FreeBSD up to at least 5.2 provides this ioctl, but does
+                 * implement it properly, so ignore errors on that platform.
+                 */
                 return FALSE;
         } else {
             ERR("%s: %s\n", ossdev->mixer_name , strerror( errno ));

Would you mind double checking that, Travis?  What do you think, Mathew?


PS: I'm the maintainer of the emulators/wine port, so I could add this
patch to the port and, more importantly, submit it upstream as well.
Gerald Pfeifer (Jerry)   gerald at

More information about the freebsd-multimedia mailing list