From patchwork Mon Oct 6 14:16:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Farrell X-Patchwork-Id: 5037581 X-Patchwork-Delegate: tiwai@suse.de Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0B076C11AB for ; Mon, 6 Oct 2014 14:26:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C322D2013D for ; Mon, 6 Oct 2014 14:26:40 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id CCFD720121 for ; Mon, 6 Oct 2014 14:26:35 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 20DE4260651; Mon, 6 Oct 2014 16:26:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY, URIBL_RHS_DOB autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 3B6202605E6; Mon, 6 Oct 2014 16:26:00 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 428272604A8; Mon, 6 Oct 2014 16:16:38 +0200 (CEST) Received: from mail.gregfarrell.org (mail.gregfarrell.org [64.62.190.169]) by alsa0.perex.cz (Postfix) with ESMTP id 1F5512604A1 for ; Mon, 6 Oct 2014 16:16:29 +0200 (CEST) Received: from quozl.labs.lincor.com (unknown [84.203.137.218]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: greg) by mail.gregfarrell.org (Postfix) with ESMTPSA id 9C3E99555; Mon, 6 Oct 2014 10:16:27 -0400 (EDT) Message-ID: <5432A439.1050909@gregfarrell.org> Date: Mon, 06 Oct 2014 15:16:25 +0100 From: Greg Farrell User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: alsa-devel@alsa-project.org, Jaroslav Kysela , Takashi Iwai X-Mailman-Approved-At: Mon, 06 Oct 2014 16:25:59 +0200 Subject: [alsa-devel] Patch to enable audio on alc888 vendor id 0x10ec0888 revision id 0x100202 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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: --- 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) {