snd_hda and nVidia GeForce 8200 (MCP78S)

Alexander Motin mav at FreeBSD.org
Sat Jan 10 02:40:47 PST 2009


Torfinn Ingolfsen wrote:
> FWIW, the machine is now updated to latest 7.1-stable:
> root at kg-v2# uname -a
> FreeBSD kg-v2.kg4.no 7.1-STABLE FreeBSD 7.1-STABLE #3: Fri Jan  9 22:14:31 CET 2009     root at kg-v2.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64
> 
> And sound now works.
> As usual, more info (including verbose dmesgs) can be found on the FreeBSD page for this machine[1].
> 
> References:
> 1) http://tingox.googlepages.com/asus_v2-m3n8200_freebsd

Thanks for feedback. I have found one old bug with help of your dmesg.

On some codecs inter-channel signal leakage was possible. It is not so 
visible now as we have no real multichannel support, but it may affect 
sound quality. Problem is here:

pcm0:     nid=28 [pin: Line-out (Jack)]
pcm0:       |
pcm0:       + <- nid=22 [audio mixer] [src: pcm]
pcm0:              |
pcm0:              + <- nid=16 [audio output] [src: pcm]
pcm0:              + <- nid=37 [audio output] [src: pcm]
pcm0:
pcm0:     nid=29 [pin: Headphones (Jack)]
pcm0:       |
pcm0:       + <- nid=22 [audio mixer] [src: pcm]
pcm0:              |
pcm0:              + <- nid=16 [audio output] [src: pcm]
pcm0:              + <- nid=37 [audio output] [src: pcm]

Signals from nids 16 and 37 should not be mixed.

Could you please test attached patch to check how does it help?
It works fine on my test setup and I just want to be sure.

-- 
Alexander Motin
-------------- next part --------------
--- hdac.c.prev	2009-01-08 21:26:32.000000000 +0200
+++ hdac.c	2009-01-10 12:25:50.000000000 +0200
@@ -83,7 +83,7 @@
 
 #include "mixer_if.h"
 
-#define HDA_DRV_TEST_REV	"20081226_0122"
+#define HDA_DRV_TEST_REV	"20090110_0123"
 
 SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/hda/hdac.c,v 1.85 2008/12/27 11:00:20 mav Exp $");
 
@@ -5479,7 +5479,7 @@ hdac_audio_disable_crossas(struct hdac_d
 	struct hdac_audio_ctl *ctl;
 	int i, j;
 
-	/* Disable crossassociatement connections. */
+	/* Disable crossassociatement and unwanted crosschannel connections. */
 	/* ... using selectors */
 	for (i = devinfo->startnode; i < devinfo->endnode; i++) {
 		w = hdac_widget_get(devinfo, i);
@@ -5497,7 +5497,10 @@ hdac_audio_disable_crossas(struct hdac_d
 			cw = hdac_widget_get(devinfo, w->conns[j]);
 			if (cw == NULL || w->enable == 0)
 				continue;
-			if (w->bindas == cw->bindas || cw->bindas == -2)
+			if (cw->bindas == -2)
+				continue;
+			if (w->bindas == cw->bindas &&
+			    (w->bindseqmask & cw->bindseqmask) != 0)
 				continue;
 			w->connsenable[j] = 0;
 			HDA_BOOTHVERBOSE(
@@ -5516,7 +5519,8 @@ hdac_audio_disable_crossas(struct hdac_d
 		if (ctl->widget->bindas == -2 ||
 		    ctl->childwidget->bindas == -2)
 			continue;
-		if (ctl->widget->bindas != ctl->childwidget->bindas) {
+		if (ctl->widget->bindas != ctl->childwidget->bindas ||
+		    (ctl->widget->bindseqmask & ctl->childwidget->bindseqmask) == 0) {
 			ctl->forcemute = 1;
 			ctl->muted = HDA_AMP_MUTE_ALL;
 			ctl->left = 0;


More information about the freebsd-multimedia mailing list