summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pci
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-01-13 22:10:01 +0000
committermav <mav@FreeBSD.org>2009-01-13 22:10:01 +0000
commit4724ad04e8c76a549472f6631a151100654108da (patch)
tree076560629fc9b8686f929982fca92671ee93bb33 /sys/dev/sound/pci
parent9d61b04a5c9134fd5ec0b27f68ced13f41c73a3e (diff)
downloadFreeBSD-src-4724ad04e8c76a549472f6631a151100654108da.zip
FreeBSD-src-4724ad04e8c76a549472f6631a151100654108da.tar.gz
Improve AD1983 codec support:
- force playback via mixer to get PCM volume control, - make cleanup on recoring source selection.
Diffstat (limited to 'sys/dev/sound/pci')
-rw-r--r--sys/dev/sound/pci/hda/hdac.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c
index 9ed0f9d..3c0bb63 100644
--- a/sys/dev/sound/pci/hda/hdac.c
+++ b/sys/dev/sound/pci/hda/hdac.c
@@ -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_devinfo *devinfo)
* 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.
OpenPOWER on IntegriCloud