All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hda driver, correct bug in model "auto"
@ 2005-07-19 21:34 Nicolas GRAZIANO
  2005-07-27  9:37 ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas GRAZIANO @ 2005-07-19 21:34 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

- Correct some index variable inversion in patch_cmedia.c
- Correct the channels order in model autodetection (not sure of this
part, I need validation)

Signed-off-by: Nicolas Graziano <nicolas.graziano@wanadoo.fr>



[-- Attachment #2: hda_auto.diff --]
[-- Type: text/x-patch, Size: 1663 bytes --]

Index: pci/hda/hda_codec.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/hda_codec.c,v
retrieving revision 1.20
diff -u -r1.20 hda_codec.c
--- pci/hda/hda_codec.c	13 Jun 2005 13:16:39 -0000	1.20
+++ pci/hda/hda_codec.c	19 Jul 2005 20:53:04 -0000
@@ -1804,12 +1804,20 @@
 			}
 
 	/* Swap surround and CLFE: the association order is front/CLFE/surr/back */
-	if (cfg->line_outs >= 3) {
+	if (cfg->line_outs == 3) {
 		nid = cfg->line_out_pins[1];
 		cfg->line_out_pins[1] = cfg->line_out_pins[2];
 		cfg->line_out_pins[2] = nid;
 	}
 
+	if (cfg->line_outs >= 4) {
+		nid = cfg->line_out_pins[1];
+		cfg->line_out_pins[1] = cfg->line_out_pins[3];
+		cfg->line_out_pins[3] = cfg->line_out_pins[2];
+		cfg->line_out_pins[2] = nid;
+	}
+
+
 	return 0;
 }
 
Index: pci/hda/patch_cmedia.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/patch_cmedia.c,v
retrieving revision 1.10
diff -u -r1.10 patch_cmedia.c
--- pci/hda/patch_cmedia.c	13 Jun 2005 13:16:39 -0000	1.10
+++ pci/hda/patch_cmedia.c	19 Jul 2005 20:53:04 -0000
@@ -408,7 +408,7 @@
 		/* search for an empty channel */
 		for (j = 0; j < cfg->line_outs; j++) {
 			if (! assigned[j]) {
-				spec->dac_nids[i] = i + 0x03;
+				spec->dac_nids[i] = j + 0x03;
 				assigned[j] = 1;
 				break;
 			}
@@ -444,11 +444,10 @@
 			len = snd_hda_get_connections(codec, nid, conn, 4);
 			for (k = 0; k < len; k++)
 				if (conn[k] == spec->dac_nids[i]) {
-					spec->multi_init[j].param = j;
+					spec->multi_init[j].param = k;
 					break;
 				}
 			j++;
-			break;
 		}
 	}
 	return 0;

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-07-29 10:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-19 21:34 [PATCH] hda driver, correct bug in model "auto" Nicolas GRAZIANO
2005-07-27  9:37 ` Takashi Iwai
2005-07-27 18:32   ` Nicolas GRAZIANO
2005-07-28  9:06     ` Takashi Iwai
2005-07-28 18:32       ` Nicolas GRAZIANO
2005-07-29 10:49         ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.