Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jan 2009 22:10:01 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r187196 - head/sys/dev/sound/pci/hda
Message-ID:  <200901132210.n0DMA1gj017738@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Jan 13 22:10:01 2009
New Revision: 187196
URL: http://svn.freebsd.org/changeset/base/187196

Log:
  Improve AD1983 codec support:
   - force playback via mixer to get PCM volume control,
   - make cleanup on recoring source selection.

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	Tue Jan 13 21:55:39 2009	(r187195)
+++ head/sys/dev/sound/pci/hda/hdac.c	Tue Jan 13 22:10:01 2009	(r187196)
@@ -83,7 +83,7 @@
 
 #include "mixer_if.h"
 
-#define HDA_DRV_TEST_REV	"20090113_0124"
+#define HDA_DRV_TEST_REV	"20090113_0125"
 
 SND_DECLARE_FILE("$FreeBSD$");
 
@@ -4649,6 +4649,33 @@ hdac_vendor_patch_parse(struct hdac_devi
 		 * nid: 26 = Line-in, leave it alone.
 		 */
 		break;
+	case HDA_CODEC_AD1983:
+		/*
+		 * This codec has several posisble usages, but none
+		 * fit parser best. Help parser to choose better.
+		 */
+		/* Disable direct unmixed playback to get pcm volume. */
+		w = hdac_widget_get(devinfo, 5);
+		if (w != NULL)
+			w->connsenable[0] = 0;
+		w = hdac_widget_get(devinfo, 6);
+		if (w != NULL)
+			w->connsenable[0] = 0;
+		w = hdac_widget_get(devinfo, 11);
+		if (w != NULL)
+			w->connsenable[0] = 0;
+		/* Disable mic and line selectors. */
+		w = hdac_widget_get(devinfo, 12);
+		if (w != NULL)
+			w->connsenable[1] = 0;
+		w = hdac_widget_get(devinfo, 13);
+		if (w != NULL)
+			w->connsenable[1] = 0;
+		/* Disable recording from mono playback mix. */
+		w = hdac_widget_get(devinfo, 20);
+		if (w != NULL)
+			w->connsenable[3] = 0;
+		break;
 	case HDA_CODEC_AD1986A:
 		/*
 		 * This codec has overcomplicated input mixing.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901132210.n0DMA1gj017738>