All of lore.kernel.org
 help / color / mirror / Atom feed
From: Torben Schulz <public@letorbi.de>
To: Alsa-Devel <alsa-devel@alsa-project.org>
Cc: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH 1/1] ALC889A chip identification
Date: Fri, 15 May 2009 02:34:07 +0200	[thread overview]
Message-ID: <4A0CB87F.70405@letorbi.de> (raw)

With this patch the ALC889A chip will be identified correctly. The functions patch_alc882() and patch_alc883() have been altered to set the stream names correctly. Without this patch 'aplay -l' would identify an ALC889A chip as ALC885 for example. Apart from that a kernel info message will be printed if ALC885 or ALC889A chips are handled by the wrong patch function.

Signed-off by: Torben Schulz <public@letorbi.de>

--- alsa-driver/alsa-kernel/pci/hda/patch_realtek.c	2009-05-14 18:23:17.000000000 +0200
+++ alsa-driver-mod/alsa-kernel/pci/hda/patch_realtek.c	2009-05-15 01:08:16.000000000 +0200
@@ -7338,8 +7338,17 @@
		setup_preset(spec, &alc882_presets[board_config]);

	if (codec->vendor_id == 0x10ec0885) {
-		spec->stream_name_analog = "ALC885 Analog";
-		spec->stream_name_digital = "ALC885 Digital";
+		if ((codec->revision_id == 0x100101) ||
+ 		    (codec->revision_id == 0x100103)) {
+ 			spec->stream_name_analog = "ALC889A Analog";
+ 			spec->stream_name_digital = "ALC889A Digital";
+			printk(KERN_INFO
+			       "hda_codec: ALC889A handled by patch_alc882(),"
+				" should be handled by patch_alc883()\n");
+ 		} else {
+ 			spec->stream_name_analog = "ALC885 Analog";
+ 			spec->stream_name_digital = "ALC885 Digital";
+ 		}
	} else {
		spec->stream_name_analog = "ALC882 Analog";
		spec->stream_name_digital = "ALC882 Digital";
@@ -9231,6 +9240,27 @@
		setup_preset(spec, &alc883_presets[board_config]);

	switch (codec->vendor_id) {
+ 	case 0x10ec0885:
+ 		if ((codec->revision_id == 0x100101) ||
+ 		    (codec->revision_id == 0x100103)) {
+ 			spec->stream_name_analog = "ALC889A Analog";
+ 			spec->stream_name_digital = "ALC889A Digital";
+			if (!spec->num_adc_nids) {
+				spec->num_adc_nids = ARRAY_SIZE(alc883_adc_nids);
+				spec->adc_nids = alc883_adc_nids;
+			}
+			if (!spec->capsrc_nids)
+				spec->capsrc_nids = alc883_capsrc_nids;
+			spec->capture_style = CAPT_MIX; /* matrix-style capture */
+			spec->init_amp = ALC_INIT_DEFAULT; /* always initialize */
+ 		} else {
+ 			spec->stream_name_analog = "ALC885 Analog";
+ 			spec->stream_name_digital = "ALC885 Digital";
+			printk(KERN_INFO
+			       "hda_codec: ALC885 handled by patch_alc883(),"
+				" should be handled by patch_alc882()\n");
+ 		}
+ 		break;
	case 0x10ec0888:
		if (codec->revision_id == 0x100101) {
			spec->stream_name_analog = "ALC1200 Analog";

             reply	other threads:[~2009-05-15  0:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15  0:34 Torben Schulz [this message]
2009-05-15  5:50 ` [PATCH 1/1] ALC889A chip identification Takashi Iwai
2009-05-15 15:23   ` Takashi Iwai
2009-05-15 17:52     ` Torben Schulz
2009-05-16  8:08       ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2009-06-17  6:26 Runbox

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=4A0CB87F.70405@letorbi.de \
    --to=public@letorbi.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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 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.