All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Farrell <greg@gregfarrell.org>
To: alsa-devel@alsa-project.org, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.de>
Subject: Patch to enable audio on alc888 vendor id 0x10ec0888 revision id 0x100202
Date: Mon, 06 Oct 2014 15:16:25 +0100	[thread overview]
Message-ID: <5432A439.1050909@gregfarrell.org> (raw)

Hi,

I am dealing with some Atom based boards that have a Realtek ALC888 
providing HDA-Intel codec support. Vendor_id of 0x10ec0888.

These boards worked for us when they came with an earlier revision of 
the chip but did not work for us with a revision_id of 0x100202 .

Symptoms on kernel 3.11 (FC18) and 3.17rc7 were identical - sound was 
present but was almost completely inaudible even when mixers were raised 
to the max.

Investigations showed that forcing OFF EAPD resulted in normal amplified 
sound while turning it on resulted in the almost inaudible sound. This 
is - to my limited understanding - counter to how other chipsets work 
and makes me wonder if this particular chip version has an inverted EAPD 
bit. It was also necessary to skip the normal ALC888 coef fixup code 
(alc888_coef_init) in order for sound to work correctly.

I'm providing a patch that performs this behaviour only for alc888's 
with a vendor_id of 0x10ec0888 and a revision_id of 0x100202. It applies 
cleanly against 3.11 and 3.17rc7 but as I do not have a suitable build 
host for a 3.17 kernel it has only been tested with the 3.11 kernel.

I hope this is useful to anyone else running into this problem with this 
particular hardware.

Greg

greg@gregfarrell.org
greg.farrell@lincor.com


--- a/sound/pci/hda/patch_realtek.c    2014-10-03 16:41:50.374730157 +0100
+++ b/sound/pci/hda/patch_realtek.c    2014-10-03 16:52:57.539099277 +0100
@@ -289,7 +289,11 @@
  {
      unsigned int tmp;

-    alc_auto_setup_eapd(codec, true);
+    if ( !(codec->vendor_id == 0x10ec0888 && codec->revision_id == 
0x100202) )
+        alc_auto_setup_eapd(codec, true);
+    else
+        printk(KERN_INFO "hda_codec: %s: alc_auto_init_amp skipping 
alc_auto_setup_eapd due to chip revision test", codec->chip_name);
+
      switch (type) {
      case ALC_INIT_GPIO1:
          snd_hda_sequence_write(codec, alc_gpio1_init_verbs);
@@ -323,7 +327,10 @@
              alc889_coef_init(codec);
              break;
          case 0x10ec0888:
-            alc888_coef_init(codec);
+            if ( codec->revision_id != 0x100202 )
+                alc888_coef_init(codec);
+            else
+                printk(KERN_INFO "hda_codec: %s: alc_auto_init_amp 
0x10ec0888 type skipping alc888_coef_init due to revision_id test", 
codec->chip_name);
              break;
  #if 0 /* XXX: This may cause the silent output on speaker on some 
machines */
          case 0x10ec0267:

             reply	other threads:[~2014-10-06 14:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 14:16 Greg Farrell [this message]
2014-10-06 14:24 ` Patch to enable audio on alc888 vendor id 0x10ec0888 revision id 0x100202 Takashi Iwai
2014-10-06 14:52   ` Greg Farrell
2014-10-06 14:55     ` Takashi Iwai
2014-10-07  9:38       ` Patch to enable audio on alc888 vendor id 0x10ec0888 revisionid 0x100202 Kailang

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=5432A439.1050909@gregfarrell.org \
    --to=greg@gregfarrell.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@perex.cz \
    --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.