mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Kyle McMartin <kyle@mcmartin.ca>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: patch_realtek: handle unset external amp bits
Date: Fri, 26 Nov 2010 06:51:11 +0100	[thread overview]
Message-ID: <s5h8w0gskds.wl%tiwai@suse.de> (raw)
In-Reply-To: <20101125185730.GK22651@bombadil.infradead.org>

At Thu, 25 Nov 2010 13:57:30 -0500,
Kyle McMartin wrote:
> 
> From: Kyle McMartin <kyle@redhat.com>
> 
> Commit ef5dbbcc removes the default initialization of init_amp to
> ALC_INIT_DEFAULT, with the justification that it should be set by
> alc_subsystem_id, which contains a switch case:
> 
>         tmp = (ass & 0x38) >> 3;        /* external Amp control */
>         switch (tmp) {
>         case 1:
> 	...
> 	case 5:
> 	}
> 
> Which handles values 1,3,7 for GPIOs, or 5 to set _DEFAULT.
> 
> But... what if it's 0? :)
> 
> I got a bug report this morning from a user whose sound had broken
> between 2.6.34 and 2.6.35, and I bisected it down to this commit.
> 
> [ 32.366183] ALSA sound/pci/hda/patch_realtek.c:1374: realtek: Enabling
> init ASM_ID=0x8a05 CODEC_ID=10ec0888
> 
> (0x8a05 & 0x38) >> 3 = 0;
> 
> But otherwise the SKU looks fine (since if I revert that commit, it
> seems to work correctly.)
> 
> I think the best thing to do would be to either restore the 'redundant'
> default initialization, or quirk it.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=657388
> 
> Signed-off-by: Kyle McMartin <kyle@redhat.com>

How about setting default to ALC_INIT_DEFAULT instead like the patch
below?  This is safer than forcing ALC_INIT_DEFAULT to all, I
suppose.


thanks,

Takashi

---
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 81a2a49..886d7c7 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1614,6 +1614,7 @@ do_sku:
 		spec->init_amp = ALC_INIT_GPIO3;
 		break;
 	case 5:
+	default:
 		spec->init_amp = ALC_INIT_DEFAULT;
 		break;
 	}

  reply	other threads:[~2010-11-26  5:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25 18:57 Kyle McMartin
2010-11-26  5:51 ` Takashi Iwai [this message]
2010-11-26 13:29   ` Kyle McMartin
2010-11-26 14:04     ` Takashi Iwai
2010-11-26 16:07       ` Kyle McMartin
2010-11-26 16:18         ` 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=s5h8w0gskds.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=kyle@mcmartin.ca \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®