Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2097383iof; Tue, 7 Jun 2022 19:38:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSJ4byWt7oxurdpVZ9Izzr7O6HiJSrcGHC5i1wuVRJO/U69dNkDABNJ2NvJsZ6g9qHjR4m X-Received: by 2002:a17:902:ce0b:b0:163:ead5:8321 with SMTP id k11-20020a170902ce0b00b00163ead58321mr32176274plg.99.1654655894496; Tue, 07 Jun 2022 19:38:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654655894; cv=none; d=google.com; s=arc-20160816; b=jgf0Rpa2mwYt6LjZt64sEjh70KGEsolTFJievHqohzRg8yUays1LnmNUM0xaU9DNlq 73leVAx08PAL73o9RuM1FZ9FVHwLGV77o3WkgzanVSXaHvyJYZ3og5FcDPUeZ/6OfsRT hShUUg+wdg3aG3EJWEZN6jKd2NmYPX/sLwgjZY/NtGv1eit7NMuo8HbDHn5qEXWmW6HJ 6a/vNklz54npgmr65tAsD+R5bipwS+ZmD9PWak738HU2B8hP1kFSr2ZXc6LTxSCSzy6v kAJVintYD64cLhJHLjCXKRio3dGnrdPR9aoQeA583xPf8NkzH8JEv2Ewm3RHtcSuXYVr Dang== 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=jcAUvIxN8jPtuizl7Wp91sRV3pzklN02CARFg2Ldte4=; b=VoCELE66pn/Xd2XTj96li6ZY5ktVbQrZ4SYmF0jpTQjcjwMGm5PLaOGMFnsBrWTsCd BuaZgJxyBNSDtFWN2jpSEmQCi2vQTLpzABLes+RmUjh/L4/1piUwTpJGx3S1ilApu1/3 1zoX1wK3kxDdkwP4Kfg9zWM4saDPM8siRztQkybpSqEPjjWJVSeaufKINW1SnTpTWfFC cNgpUAOgSfdJGEAhgRcu0Q3PPq/cK8Uz3GyaG/wnErbC9T9/P/+b4aiJ9pKUJ0zWvoIA UC4ciECjMx6HyKz71GTVHs7aF6o3f90fmSFGOQRE24wiOv94NVrWJQnV4/keWHDCT8IE tQkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PZRXrMfj; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t7-20020a056a0021c700b0050605f7112bsi25176308pfj.130.2022.06.07.19.38.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 19:38:14 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PZRXrMfj; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 81E973EB9DE; Tue, 7 Jun 2022 19:28:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382196AbiFGWDH (ORCPT + 99 others); Tue, 7 Jun 2022 18:03:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378922AbiFGVBz (ORCPT ); Tue, 7 Jun 2022 17:01:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECD276D1B4; Tue, 7 Jun 2022 11:45:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 82F336156D; Tue, 7 Jun 2022 18:45:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9160DC385A2; Tue, 7 Jun 2022 18:45:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627556; bh=oRsdagmTqjRgG5rvNnCdvfEpUsAV6/16oxShlkmqr3I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PZRXrMfjzaKAuablHCiXcNHyMf8PPY1ubcw9nszVBLFUvxoFlm87N5NuzD4TsvbjN O9DrMzzBMQxTKT/tLnsXROYinsOoa0vRZFJDJABzjlSmQOKaAW0G2Yze6qXBVOcFZV +jnvW+t5ltAmCyh+9dJHpcZsaqvQKlr7LOpFUms0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kailang Yang , Takashi Iwai Subject: [PATCH 5.18 011/879] ALSA: hda/realtek - Add new type for ALC245 Date: Tue, 7 Jun 2022 18:52:09 +0200 Message-Id: <20220607165002.999421807@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kailang Yang commit 60571929d06b028800f27b51a7c81de1144944cf upstream. Add new type for ALC245. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/cef26a7cd3d146eb96a3994ce79e34d2@realtek.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -3131,6 +3131,7 @@ enum { ALC269_TYPE_ALC257, ALC269_TYPE_ALC215, ALC269_TYPE_ALC225, + ALC269_TYPE_ALC245, ALC269_TYPE_ALC287, ALC269_TYPE_ALC294, ALC269_TYPE_ALC300, @@ -3168,6 +3169,7 @@ static int alc269_parse_auto_config(stru case ALC269_TYPE_ALC257: case ALC269_TYPE_ALC215: case ALC269_TYPE_ALC225: + case ALC269_TYPE_ALC245: case ALC269_TYPE_ALC287: case ALC269_TYPE_ALC294: case ALC269_TYPE_ALC300: @@ -3695,7 +3697,8 @@ static void alc225_init(struct hda_codec hda_nid_t hp_pin = alc_get_hp_pin(spec); bool hp1_pin_sense, hp2_pin_sense; - if (spec->codec_variant != ALC269_TYPE_ALC287) + if (spec->codec_variant != ALC269_TYPE_ALC287 && + spec->codec_variant != ALC269_TYPE_ALC245) /* required only at boot or S3 and S4 resume time */ if (!spec->done_hp_init || is_s3_resume(codec) || @@ -10148,7 +10151,10 @@ static int patch_alc269(struct hda_codec case 0x10ec0245: case 0x10ec0285: case 0x10ec0289: - spec->codec_variant = ALC269_TYPE_ALC215; + if (alc_get_coef0(codec) & 0x0010) + spec->codec_variant = ALC269_TYPE_ALC245; + else + spec->codec_variant = ALC269_TYPE_ALC215; spec->shutup = alc225_shutup; spec->init_hook = alc225_init; spec->gen.mixer_nid = 0;