From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 12 11:25:56 2010 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D9D7106566C for ; Tue, 12 Jan 2010 11:25:56 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id A7F1F8FC0C for ; Tue, 12 Jan 2010 11:25:55 +0000 (UTC) Received: by fxm27 with SMTP id 27so97442fxm.3 for ; Tue, 12 Jan 2010 03:25:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=1wzJIyjcowKGC4e5SZIwXDdYOANVJ1NChD14gcp3JWs=; b=g3teD5G/fYhl/1qKP/yH/73avuA09aXuDIt4xT5nc4vqDNiSMTHa1l+tzCEzs64H5b PP3F5Faq9vIAGacFyL5LdBhU7AuLWB7y1Q2HZRRXKw15SaQvxxtHq0JoqQP2Tklx95Rn dBxlBf61WhJcnj2ZyWmhq8WeMv9fm67GguyHg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=atWQsoX4nzEkoT+nTWjvU6XKsjR9XtGFjlUisrwwfLVzsCATiRkKdUinV+GFLP2Omw 4hUNp6U6EH3i4mL+dSYeep4SIxElGsR8iWl1A94V8REYS2WT6rPe/mn4lAmN4jXdsGeO G4kzGx4qYe+WYQXCTSk9li2lHMtTM1ZaP0U48= Received: by 10.223.76.65 with SMTP id b1mr64094fak.5.1263295549275; Tue, 12 Jan 2010 03:25:49 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 13sm10140792fxm.9.2010.01.12.03.25.47 (version=SSLv3 cipher=RC4-MD5); Tue, 12 Jan 2010 03:25:48 -0800 (PST) Sender: Alexander Motin Message-ID: <4B4C5C0E.5040301@FreeBSD.org> Date: Tue, 12 Jan 2010 13:25:02 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20090901) MIME-Version: 1.0 To: Juergen Lock References: <20100109215928.GA93188@triton8.kn-bremen.de> In-Reply-To: <20100109215928.GA93188@triton8.kn-bremen.de> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-multimedia@FreeBSD.org, netchild@FreeBSD.org, Ryan Beasley Subject: Re: native OSS_GETVERSION ioctl doesn't really work X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 11:25:56 -0000 Juergen Lock wrote: > While fixing qemu for the upcoming 0.12.1 (or .2) qemu-devel port > I discovered that the OSS_GETVERSION ioctl added by r164613 in 2006, > http://svn.freebsd.org/viewvc/base?view=revision&revision=164613 > is only implemented for the mixer device (other than in the Linuxolator), > and on top of that that code is never reached because OSS_GETVERSION > is defined as an _IOR ('M', ...), which are all handled by an > if ((cmd & MIXER_READ(0)) == MIXER_READ(0)) { > ... > here, > http://fxr.watson.org/fxr/source/dev/sound/pcm/mixer.c#L1255 > and so even if actually done on a mixer device the ioctl ends up failing > with ENXIO. > > JFY... :) > Juergen > > PS: I guess I can try to make a patch, but only if its needed :) Fixed it for mixer in HEAD. I see 4Front OSS also implements it for sndstat and audio devices. Is it right, or it is some kind of bug or workaround? -- Alexander Motin