From owner-freebsd-multimedia@FreeBSD.ORG Sat Dec 27 15:49:19 2003 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD96116A4CE for ; Sat, 27 Dec 2003 15:49:19 -0800 (PST) Received: from vexpert.dbai.tuwien.ac.at (vexpert.dbai.tuwien.ac.at [128.131.111.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D98D43D5A for ; Sat, 27 Dec 2003 15:49:17 -0800 (PST) (envelope-from gerald@pfeifer.com) Received: from [128.131.111.60] (acrux [128.131.111.60]) by vexpert.dbai.tuwien.ac.at (Postfix) with ESMTP id 2F42213789; Sun, 28 Dec 2003 00:49:16 +0100 (CET) Date: Sun, 28 Dec 2003 00:49:22 +0100 (CET) From: Gerald Pfeifer To: Mathew Kanner , multimedia@freebsd.org In-Reply-To: <20031227144106.35943fff.tlp@LiquidX.org> Message-ID: References: <20031227144106.35943fff.tlp@LiquidX.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Travis Poppe Subject: Re: The latest WINE and /dev/mixer* X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 23:49:20 -0000 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, info.name, sizeof(info.name)); 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. + */ OSS_CloseDevice(ossdev); close(mixer); return FALSE; +#endif } } else { ERR("%s: %s\n", ossdev->mixer_name , strerror( errno )); Would you mind double checking that, Travis? What do you think, Mathew? Gerald 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@pfeifer.com http://www.pfeifer.com/gerald/