Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas GRAZIANO <nicolas.graziano@wanadoo.fr>
To: alsa-devel@alsa-project.org
Subject: [PATCH] hda driver, correct bug in model "auto"
Date: Tue, 19 Jul 2005 23:34:20 +0200	[thread overview]
Message-ID: <42DD71DC.1090002@wanadoo.fr> (raw)

[-- 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;

             reply	other threads:[~2005-07-19 21:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-19 21:34 Nicolas GRAZIANO [this message]
2005-07-27  9:37 ` [PATCH] hda driver, correct bug in model "auto" 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42DD71DC.1090002@wanadoo.fr \
    --to=nicolas.graziano@wanadoo.fr \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox