Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4463987ybz; Tue, 28 Apr 2020 11:43:56 -0700 (PDT) X-Google-Smtp-Source: APiQypK40bkQLbXAjwnG98PA582GvIKTFm2SOHrhQ9/wYnHPUy2JI/0BArqW4whJSKgn7lBuC7GI X-Received: by 2002:a05:6402:3121:: with SMTP id dd1mr24222531edb.168.1588099436775; Tue, 28 Apr 2020 11:43:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588099436; cv=none; d=google.com; s=arc-20160816; b=U/58LrSxI89FfAYbywxiGbsnKbTIsK0crkloL3Lb+IUJ8h7EDwkGF/R3MipCYNufxM FT1SanYlpY/YUhQY5203gGBbymw8+ZJ3PKMzkMPpZYbd70dsRKwGEDZaOvtLfhyApzYH 3C5N1Lz6SPD43Rbb5p6/q9CnEIO2LCdE6o3aJgbToicOafY4GDmTGcu8RkE1rixe2nzk pd9RTYTZvrXD6d5NC5KLkIbwOpTB0XP+hvo8ap+rE8V7YbuC/sFyLAtwcz+1gQXJ4ZMw F/IG7QWeTKq0qzcz8a/4ffrjzWP8VSEVoRwnOAgBp9Sj8TugJmAcY1sRHK/v7F7TLGmQ M5TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gAegmLj08prypozP4hnYuKfHU3+8f4OggLzk7j4bRlc=; b=EooLuTsd0S3HKo9MKhc82Db/hR+ijwXI7Fn0KdhtzAOyDhC+LbcZXXQ4y2t/oGO/Cn uCNj2hbqCZplUS0GO++UKj+f8oTSDNz7YB+xLHkIPa0W/8yEp7+46YWEYNw71cF5Slvu ymAomDkdMKzO6MaIO5oVDg0MrBBpomhDuD9fN2bqKNyKNaxP5T5pseHn7YDYsE4WdaEM scyRpWwR0Se9W4ZxrmqxiKUuRN8l9E8pqu9gfHS2Vq4rZwGPRgr4ZK6aP7luIq/xJ5+b 56xSI4iql8A91HwZcJLaTnjt/vMSBXBIo3ULotHCYHrx4EhXNsuajTCVHasryaSZRJtD pYmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=scOHvS1w; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id co2si2143045edb.524.2020.04.28.11.43.33; Tue, 28 Apr 2020 11:43:56 -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=@kernel.org header.s=default header.b=scOHvS1w; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731091AbgD1SmT (ORCPT + 99 others); Tue, 28 Apr 2020 14:42:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:34080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730502AbgD1SmP (ORCPT ); Tue, 28 Apr 2020 14:42:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 08AA72076A; Tue, 28 Apr 2020 18:42:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588099334; bh=ntRI2d4t5d8LgNQWaIoeisCkG2w01XL6Yg21Sgy5huY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=scOHvS1wyV6cwvj7+6LiiOzqVm9pOj0B3+REZWSlIg+eattStCmMo3Wk9CSlDs5x8 a0wEkJWu5zE9PupwwV1xIElz3sjHsvx3/2anITVJiVZ8sp/VK6H6b9gMeTBcao1uAp +8YMRSxJwcXRL9mO2QM8p1OKoWK4jB6rjGzvyHfo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 5.4 109/168] ALSA: hda/realtek - Fix unexpected init_amp override Date: Tue, 28 Apr 2020 20:24:43 +0200 Message-Id: <20200428182246.288982582@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200428182231.704304409@linuxfoundation.org> References: <20200428182231.704304409@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai commit 67791202c5e069cf2ba51db0718d56c634709e78 upstream. The commit 1c76aa5fb48d ("ALSA: hda/realtek - Allow skipping spec->init_amp detection") changed the way to assign spec->init_amp field that specifies the way to initialize the amp. Along with the change, the commit also replaced a few fixups that set spec->init_amp in HDA_FIXUP_ACT_PROBE with HDA_FIXUP_ACT_PRE_PROBE. This was rather aligning to the other fixups, and not supposed to change the actual behavior. However, this change turned out to cause a regression on FSC S7020, which hit exactly the above. The reason was that there is still one place that overrides spec->init_amp after HDA_FIXUP_ACT_PRE_PROBE call, namely in alc_ssid_check(). This patch fixes the regression by adding the proper spec->init_amp override check, i.e. verifying whether it's still ALC_INIT_UNDEFINED. Fixes: 1c76aa5fb48d ("ALSA: hda/realtek - Allow skipping spec->init_amp detection") Cc: BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207329 Link: https://lore.kernel.org/r/20200418190639.10082-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -789,9 +789,11 @@ static void alc_ssid_check(struct hda_co { if (!alc_subsystem_id(codec, ports)) { struct alc_spec *spec = codec->spec; - codec_dbg(codec, - "realtek: Enable default setup for auto mode as fallback\n"); - spec->init_amp = ALC_INIT_DEFAULT; + if (spec->init_amp == ALC_INIT_UNDEFINED) { + codec_dbg(codec, + "realtek: Enable default setup for auto mode as fallback\n"); + spec->init_amp = ALC_INIT_DEFAULT; + } } }