Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3540819pxj; Mon, 24 May 2021 09:00:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjBZRB4MoQHyeIcdT8fNsl6XcqqlumwUeXezSe3X9mMKI0NDIbMyszm+Cj2Jf2yRLEgInS X-Received: by 2002:a6b:b409:: with SMTP id d9mr15046932iof.57.1621872018334; Mon, 24 May 2021 09:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621872018; cv=none; d=google.com; s=arc-20160816; b=ApquPxAK35x+rZn5shWO7BoWVneGRsvaI8FMCOZJGrRrzu0xUog9JSV3HaUX6umhYd hX2KIKk8+VoE3c59Mp8+m4Oz9eABIQO3ShgcVXKExZVL4Nex2VQkZfUGV8i/toxMWCvg asDNgX6iMDKYrkvKuQs5S0OgGdgOzsaNKyJk/kkN6XJKoS6cKkkDkCsLxllmL5z1rb2G OJJwwpEM0XxsMIG2/kWJJjeg8CYAouEd0TS5zbgXKAmXsDTU9ohPFInQMTV65OFWBa9r zyH1MHtM6aZhvbXoiR4fhKZFJ5InqNCOhCSDv01nARKo6yak4pVRaw/ESH45gL2l6RxA 0kAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mdUO1xTQNldbrkk86HMzp9A/8XJ8rC43xN6V56iajOU=; b=Cc1PE3lWZVJlXYhaaTXSgAbGAF2Y3yE8Y/SAItsJqMCdLz7uUSSQV1XKVvfOi20gAh bigM/st36CqzG9VBNNOYfhUh2q6dBpYPGQCKU8gmQifc16EL8YeMeGjeNSI3x+rFtuYC X58bUkJuvUc7EEfaCAJCtzDuKtYa7A7CSvF6WMMzoYmIhUUlx3NB/Rezl6C7/x8JkpRW i4w40Q5U0Au4in/krrBBTwTG0vXhGYuyNF6BhK7FErMj39gapm3FkCMeSPTuL2JRP4W8 6a/bEvvClQc5iRf7afCEPxea5/BYdbkFDmmPl+bk/sVd3rUaYcyeor30w6RWPVeaCgbP oYAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="yExB/Egk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d8si14254018iob.68.2021.05.24.09.00.04; Mon, 24 May 2021 09:00:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="yExB/Egk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235415AbhEXP7y (ORCPT + 99 others); Mon, 24 May 2021 11:59:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:38718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235108AbhEXPy6 (ORCPT ); Mon, 24 May 2021 11:54:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7493261436; Mon, 24 May 2021 15:40:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870831; bh=5jrsJcfOXLB7iq3lldWj7N22rfEhJCXEKYzQ1G6TaiU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yExB/Egk4EvnxYBhqSEdZMPL0tTNnpWpcjXPlLY0igRvNMBLDBjnR+LIQDDEPP9GL 1UcJztAQMSWb4zqwMZv52Svath2ZOuWRNKkVFOswqQHSByJ1O/UP2KbKhe6aP6Y18Q tUJXhJpEjO3Ab20xGzi93qLDCfqq2xqoVbqjGdq0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kailang Yang , Hui Wang , Takashi Iwai Subject: [PATCH 5.10 045/104] ALSA: hda/realtek: reset eapd coeff to default value for alc287 Date: Mon, 24 May 2021 17:25:40 +0200 Message-Id: <20210524152334.312826588@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152332.844251980@linuxfoundation.org> References: <20210524152332.844251980@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hui Wang commit 8822702f6e4c8917c83ba79e0ebf2c8c218910d4 upstream. Ubuntu users reported an audio bug on the Lenovo Yoga Slim 7 14IIL05, he installed dual OS (Windows + Linux), if he booted to the Linux from Windows, the Speaker can't work well, it has crackling noise, if he poweroff the machine first after Windows, the Speaker worked well. Before rebooting or shutdown from Windows, the Windows changes the codec eapd coeff value, but the BIOS doesn't re-initialize its value, when booting into the Linux from Windows, the eapd coeff value is not correct. To fix it, set the codec default value to that coeff register in the alsa driver. BugLink: http://bugs.launchpad.net/bugs/1925057 Suggested-by: Kailang Yang Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20210507024452.8300-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -395,7 +395,6 @@ static void alc_fill_eapd_coef(struct hd case 0x10ec0282: case 0x10ec0283: case 0x10ec0286: - case 0x10ec0287: case 0x10ec0288: case 0x10ec0285: case 0x10ec0298: @@ -406,6 +405,10 @@ static void alc_fill_eapd_coef(struct hd case 0x10ec0275: alc_update_coef_idx(codec, 0xe, 0, 1<<0); break; + case 0x10ec0287: + alc_update_coef_idx(codec, 0x10, 1<<9, 0); + alc_write_coef_idx(codec, 0x8, 0x4ab7); + break; case 0x10ec0293: alc_update_coef_idx(codec, 0xa, 1<<13, 0); break;