From patchwork Wed May 11 10:02:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Binding X-Patchwork-Id: 572113 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD320C433EF for ; Wed, 11 May 2022 10:04:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DB277191D; Wed, 11 May 2022 12:03:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DB277191D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1652263444; bh=DfuLwoqhoDwOtKM06uI29iQEUeg/2RcZGdSflQAUePQ=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PpnnF0788uzMyNovmA8tzTjKDwl2acUf/bs8uNV0eYHB3AhSeekwPlW1P2IfnBR1t PN5z9RO2E7/Xa9UDkPHwTwoUFRof3rwi3AfTF0YrgQLd+xYTJ7HmmnSbDAiItMXyLw LmvDQ4SaR+P425oAhaqKVFaMGzVVDhvA94IgP9CA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 770E8F80508; Wed, 11 May 2022 12:02:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8290DF804B2; Wed, 11 May 2022 12:02:25 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BCA9BF80212 for ; Wed, 11 May 2022 12:02:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BCA9BF80212 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="njAivVw2" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24B4xHqP029588; Wed, 11 May 2022 05:02:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=uD8g4n5cPT9hscvEkoP6sTC3o6MpJbq8d1DTDJAD3Uo=; b=njAivVw22o46BW5YZC8cPBJspRsIP2mSYwy4gpDQj5yRwu6itp3Uq8xs5VH9UQlUeP8b PQxMMsPeX4MeiKifHzEFiuFIRf3Waklgf0kQv3VVdwZIqKr+UOU754XiveUBgdx4gDPb LKkLTjemEUKv7zbp48HiRu8JjDfhZ8SV53/n2DQIF7hYhO3RHvL/6NiYtxlYl+fiZASv v1LCYkNsMCCrrygaVhQ+GcC+V4ZtnzjUG5VXpITlUMqiTvodl10nNdul0yQDZ7DkueXm iSiR7nmwaQ1APWaqDBva/fr9yh/l7qdbmeErNFu/x20+dn1zvXXmp5RYvLJuOhOPRfBu qg== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3fwn6nwt0g-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 11 May 2022 05:02:16 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 11 May 2022 11:02:13 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Wed, 11 May 2022 11:02:13 +0100 Received: from sbinding-cirrus-dsktp.ad.cirrus.com (unknown [198.90.238.24]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 6ABF2468; Wed, 11 May 2022 10:02:13 +0000 (UTC) From: Stefan Binding To: Jaroslav Kysela , Takashi Iwai Subject: [PATCH v2 3/3] ALSA: hda/cs8409: Add Speaker Playback Switch for Warlock Date: Wed, 11 May 2022 11:02:07 +0100 Message-ID: <20220511100207.1268321-4-sbinding@opensource.cirrus.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220511100207.1268321-1-sbinding@opensource.cirrus.com> References: <20220511100207.1268321-1-sbinding@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: r04KqkmNxpTNbo34xHp9hDwFCSnyHDNQ X-Proofpoint-GUID: r04KqkmNxpTNbo34xHp9hDwFCSnyHDNQ X-Proofpoint-Spam-Reason: safe Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Stefan Binding X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" Add support for a Speaker Playback Switch, which disables the Amp connected to cs8409. The Switch is not added automatically because cs8409 does not have an output amp for the speaker NID. Note: This switch uses a different GPIO to Cyborg/Odin variants Signed-off-by: Stefan Binding --- sound/pci/hda/patch_cs8409.c | 2 ++ sound/pci/hda/patch_cs8409.h | 1 + 2 files changed, 3 insertions(+) diff --git a/sound/pci/hda/patch_cs8409.c b/sound/pci/hda/patch_cs8409.c index e9b9273dbfd9..754aa8ddd2e4 100644 --- a/sound/pci/hda/patch_cs8409.c +++ b/sound/pci/hda/patch_cs8409.c @@ -1168,10 +1168,12 @@ void cs8409_cs42l42_fixups(struct hda_codec *codec, const struct hda_fixup *fix, case CS8409_WARLOCK_MLK: case CS8409_WARLOCK_MLK_DUAL_MIC: spec->scodecs[CS8409_CODEC0]->full_scale_vol = CS42L42_FULL_SCALE_VOL_0DB; + spec->speaker_pdn_gpio = CS8409_WARLOCK_SPEAKER_PDN; break; default: spec->scodecs[CS8409_CODEC0]->full_scale_vol = CS42L42_FULL_SCALE_VOL_MINUS6DB; + spec->speaker_pdn_gpio = CS8409_WARLOCK_SPEAKER_PDN; break; } diff --git a/sound/pci/hda/patch_cs8409.h b/sound/pci/hda/patch_cs8409.h index 630a7a2de51f..260388a6256c 100644 --- a/sound/pci/hda/patch_cs8409.h +++ b/sound/pci/hda/patch_cs8409.h @@ -239,6 +239,7 @@ enum cs8409_coefficient_index_registers { #define CS8409_CS42L42_RESET GENMASK(5, 5) /* CS8409_GPIO5 */ #define CS8409_CS42L42_INT GENMASK(4, 4) /* CS8409_GPIO4 */ #define CS8409_CYBORG_SPEAKER_PDN GENMASK(2, 2) /* CS8409_GPIO2 */ +#define CS8409_WARLOCK_SPEAKER_PDN GENMASK(1, 1) /* CS8409_GPIO1 */ #define CS8409_CS42L42_HP_PIN_NID CS8409_PIN_ASP1_TRANSMITTER_A #define CS8409_CS42L42_SPK_PIN_NID CS8409_PIN_ASP2_TRANSMITTER_A #define CS8409_CS42L42_AMIC_PIN_NID CS8409_PIN_ASP1_RECEIVER_A