From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 09:54:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE88E106568D; Fri, 22 Jan 2010 09:54:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 936C78FC13; Fri, 22 Jan 2010 09:54:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9seId029126; Fri, 22 Jan 2010 09:54:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9se66029124; Fri, 22 Jan 2010 09:54:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001220954.o0M9se66029124@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 09:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202796 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 09:54:40 -0000 Author: mav Date: Fri Jan 22 09:54:40 2010 New Revision: 202796 URL: http://svn.freebsd.org/changeset/base/202796 Log: Oops! r202789 broke recording from input mixer. Restore previous "mix" usage and use "igain" instead for input-to-output monitoring loopback. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Fri Jan 22 09:50:17 2010 (r202795) +++ head/sys/dev/sound/pci/hda/hdac.c Fri Jan 22 09:54:40 2010 (r202796) @@ -6226,6 +6226,15 @@ hdac_audio_assign_mixers(struct hdac_dev hdac_audio_ctl_dest_amp(devinfo, w->nid, -1, SOUND_MIXER_VOLUME, 0, 1); } + if (w->ossdev == SOUND_MIXER_IMIX) { + if (hdac_audio_ctl_source_amp(devinfo, w->nid, -1, + w->ossdev, 1, 0, 1)) { + /* If we are unable to control input monitor + as source - try to control it as destination. */ + hdac_audio_ctl_dest_amp(devinfo, w->nid, -1, + w->ossdev, 0, 1); + } + } if (w->pflags & HDA_ADC_MONITOR) { for (j = 0; j < w->nconns; j++) { if (!w->connsenable[j]) @@ -6239,7 +6248,7 @@ hdac_audio_assign_mixers(struct hdac_dev as[cw->bindas].dir != HDA_CTL_IN) continue; hdac_audio_ctl_dest_amp(devinfo, - w->nid, j, SOUND_MIXER_IMIX, 0, 1); + w->nid, j, SOUND_MIXER_IGAIN, 0, 1); } } } @@ -6739,8 +6748,8 @@ hdac_dump_ctls(struct hdac_pcm_devinfo * if (flag == 0) { flag = ~(SOUND_MASK_VOLUME | SOUND_MASK_PCM | SOUND_MASK_CD | SOUND_MASK_LINE | SOUND_MASK_RECLEV | - SOUND_MASK_MIC | SOUND_MASK_SPEAKER | SOUND_MASK_OGAIN | - SOUND_MASK_IMIX | SOUND_MASK_MONITOR); + SOUND_MASK_MIC | SOUND_MASK_SPEAKER | SOUND_MASK_IGAIN | + SOUND_MASK_OGAIN | SOUND_MASK_IMIX | SOUND_MASK_MONITOR); } for (j = 0; j < SOUND_MIXER_NRDEVICES; j++) { @@ -8150,7 +8159,8 @@ hdac_pcm_attach(device_t dev) hdac_dump_ctls(pdevinfo, "Line-in Volume", SOUND_MASK_LINE); hdac_dump_ctls(pdevinfo, "Speaker/Beep Volume", SOUND_MASK_SPEAKER); hdac_dump_ctls(pdevinfo, "Recording Level", SOUND_MASK_RECLEV); - hdac_dump_ctls(pdevinfo, "Input Monitoring Level", SOUND_MASK_IMIX); + hdac_dump_ctls(pdevinfo, "Input Mix Level", SOUND_MASK_IMIX); + hdac_dump_ctls(pdevinfo, "Input Monitoring Level", SOUND_MASK_IGAIN); hdac_dump_ctls(pdevinfo, NULL, 0); device_printf(dev, "\n"); );