From owner-freebsd-multimedia@FreeBSD.ORG Sat Dec 27 16:27:22 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 66A4E16A4CE for ; Sat, 27 Dec 2003 16:27:22 -0800 (PST) Received: from hak.cnd.mcgill.ca (hak.cnd.mcgill.ca [132.216.11.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id C31B143D39 for ; Sat, 27 Dec 2003 16:27:19 -0800 (PST) (envelope-from mat@hak.cnd.mcgill.ca) Received: from hak.cnd.mcgill.ca (localhost [127.0.0.1]) by hak.cnd.mcgill.ca (8.12.9/8.12.8) with ESMTP id hBS0O815062634; Sat, 27 Dec 2003 19:24:08 -0500 (EST) (envelope-from mat@hak.cnd.mcgill.ca) Received: (from mat@localhost) by hak.cnd.mcgill.ca (8.12.9/8.12.8/Submit) id hBS0O862062633; Sat, 27 Dec 2003 19:24:08 -0500 (EST) Date: Sat, 27 Dec 2003 19:24:08 -0500 From: Mathew Kanner To: Gerald Pfeifer Message-ID: <20031228002408.GI20827@cnd.mcgill.ca> References: <20031227144106.35943fff.tlp@LiquidX.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Organization: I speak for myself, operating in Montreal, CANADA X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on hak.cnd.mcgill.ca cc: multimedia@freebsd.org 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: Sun, 28 Dec 2003 00:27:22 -0000 On Dec 27, Gerald Pfeifer wrote: > 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? I can see good arguments both ways. My instinct says to have all the IOCTLs that are defined in other OSes oss support and let the app decide what to do. I could be persuaded otherwise. > > > 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? I really like it. Adding support for SOUND_MIXER_INFO isn't hard work, it's grunt work to that touches most drivers. It might turn up soon :) > > 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. I think that would be great. Hopefully, they can take the ifdef FreeBSD out. Sorry for cutting you out of the CC before. --Mat -- (on the United States) Living next to you is in some ways like sleeping with an elephant. No matter how friendly and eventempered the beast, one is affected by every twitch and grunt. - Pierre Elliott Trudeau