From owner-freebsd-multimedia@FreeBSD.ORG Wed Feb 21 12:04:52 2007 Return-Path: X-Original-To: multimedia@freebsd.org Delivered-To: freebsd-multimedia@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E1BD16E08D for ; Wed, 21 Feb 2007 12:04:52 +0000 (UTC) (envelope-from kazuhito@ph.noda.tus.ac.jp) Received: from cmta101.odn.ne.jp (mta101.odn.ne.jp [143.90.14.133]) by mx1.freebsd.org (Postfix) with ESMTP id C1CB013C48D for ; Wed, 21 Feb 2007 12:04:51 +0000 (UTC) (envelope-from kazuhito@ph.noda.tus.ac.jp) Received: from vmta101.odn.ne.jp by cmta101.odn.ne.jp with ESMTP id <20070221120450282.RHSL.2567.cmta101.odn.ne.jp@mta101.odn.ne.jp> for ; Wed, 21 Feb 2007 21:04:50 +0900 Received: from emta101.odn.ne.jp by vmta101.odn.ne.jp with ESMTP id <20070221120450236.XQMK.23121.vmta101.odn.ne.jp@mta101.odn.ne.jp>; Wed, 21 Feb 2007 21:04:50 +0900 Received: from localhost ([210.197.207.142] [210.197.207.142]) by emta101.odn.ne.jp with ESMTP id <20070221120450184.EHKG.18736.emta101.odn.ne.jp@mta101.odn.ne.jp>; Wed, 21 Feb 2007 21:04:50 +0900 Date: Wed, 21 Feb 2007 21:04:49 +0900 (JST) Message-Id: <20070221.210449.343186396.kazuhito@ph.noda.tus.ac.jp> To: imp@bsdimp.com From: Kazuhito HONDA In-Reply-To: <20070217.100629.-1297660600.imp@bsdimp.com> References: <20070216.151321.43011330.imp@bsdimp.com> <20070217.205042.835831436.kazuhito@ph.noda.tus.ac.jp> <20070217.100629.-1297660600.imp@bsdimp.com> X-Mailer: Mew version 3.3 on XEmacs 21.4.20 (Double Solitaire) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Wed_Feb_21_21:04:49_2007_524)--" Content-Transfer-Encoding: 7bit Cc: Alexander Leidinger , multimedia@freebsd.org Subject: Re: Sound Blaster USB? 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: Wed, 21 Feb 2007 12:04:52 -0000 ----Next_Part(Wed_Feb_21_21:04:49_2007_524)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit I made mute knobs controlled by volume controllers. When the volume is 0, the mute knob is on. When the volume isn't 0, the mute knob is off. So the mute is canceled when the volume is changed. In the case of `SB Live! 24-bit External', the mute is canceled when the volume for `speaker' is changed. I looked through the new OSS v4 API. But I guess that the mixer controller isn't corresponded to the new OSS v4 API yet. Sincerely yours, Kazuhito HONDA ----Next_Part(Wed_Feb_21_21:04:49_2007_524)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="uaudio.patch" --- sys/dev/sound/usb/uaudio.c.orig Fri Feb 2 19:13:56 2007 +++ sys/dev/sound/usb/uaudio.c Wed Feb 21 20:09:04 2007 @@ -1482,7 +1482,7 @@ uaudio_add_feature(struct uaudio_softc * case MUTE_CONTROL: mix.type = MIX_ON_OFF; #if defined(__FreeBSD__) - mix.ctl = SOUND_MIXER_NRDEVICES; + mix.ctl = mixernumber; #else mix.ctlunit = ""; snprintf(mix.ctlname, sizeof(mix.ctlname), @@ -4370,6 +4370,13 @@ uaudio_mixer_set(device_t dev, unsigned for (i=0; i < sc->sc_nctls; i++) { mc = &sc->sc_ctls[i]; if (mc->ctl == type) { + if (mc->type == MIX_ON_OFF) { /* mute, probably */ + if (left == 0) + uaudio_ctl_set(sc, SET_CUR, mc, 0, 1); + else + uaudio_ctl_set(sc, SET_CUR, mc, 0, 0); + continue; + } if (mc->nchan == 2) { /* set Right */ uaudio_ctl_set(sc, SET_CUR, mc, 1, (int)(right*255)/100); ----Next_Part(Wed_Feb_21_21:04:49_2007_524)----