From patchwork Wed Mar 6 16:14:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Henderson X-Patchwork-Id: 778862 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 17165C5475B for ; Wed, 6 Mar 2024 16:15:47 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0C8029F6; Wed, 6 Mar 2024 17:15:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0C8029F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1709741745; bh=N1y4nbPYklUfzjtuyH7rOVJRAsLNFjOy8FvLbQ54CR8=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=BRKIIBeSpaLDyLX7pRvY/dk+EB7ozLp3njY9JMG12szkysCj+5UKnYViCunHL40VN tiCQHp8Ep+BTpGXleq6hLiap1E3M8L+j+HmzU02jH9iDwvQAQuRP7Esze6PuB8wceO yM+0NwwDB7FB9uN9dG5uKKtQmQhS73XZg8gIHHrU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4CBF1F8057A; Wed, 6 Mar 2024 17:15:12 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 138F9F802E8; Wed, 6 Mar 2024 17:15:12 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 82B08F80087; Wed, 6 Mar 2024 17:15:05 +0100 (CET) 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 5D4A4F80087 for ; Wed, 6 Mar 2024 17:14:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5D4A4F80087 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=MvRn+r6F Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4268kYKD013643; Wed, 6 Mar 2024 10:14:58 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=PODMain02222019; bh=v EFvDlU/FVBigkdVQeaMuHEzdd7fO0uiPL0OTGnPJUI=; b=MvRn+r6FpAX4yJkdK qabSUFdmuX0BCK+QCx3ifQk15WVXIRdIUiM/hmUC4gdVt1wloLNiuSnRW4rQRbr6 AiDBUf8F1677Xxq3qmDaQHb/JEhoCnPDheNip2dLi9JgomUeUMUoFJpk+85SzTLb 5gT3hZaI6zf3w8v6mCQPiMmep4XzCiRWrtg69qWl/Q/nqKgWKZMvdnBg3meA4DLI F1lsPtrRfRqEx0SVUeXEIRDrJajYo3ivIchfgKYw7P0yqRDDKei7Kdfs8RrfzsvX JhrL81Em74UBcSFiuChOB9I3QK7utOFPpj4QAoZU3eVF2Fy9VPxOeNVSg7N8PzsZ e0Lig== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3wpn930g9e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Mar 2024 10:14:58 -0600 (CST) 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_256_GCM_SHA384) id 15.2.1544.4; Wed, 6 Mar 2024 16:14:56 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4 via Frontend Transport; Wed, 6 Mar 2024 16:14:56 +0000 Received: from ediswws08.ad.cirrus.com (ediswws08.ad.cirrus.com [198.90.208.13]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id AF89F820243; Wed, 6 Mar 2024 16:14:56 +0000 (UTC) From: Stuart Henderson To: , , CC: , , , , "Stuart Henderson" Subject: [PATCH 1/5] ASoC: wm8962: Enable oscillator if selecting WM8962_FLL_OSC Date: Wed, 6 Mar 2024 16:14:35 +0000 Message-ID: <20240306161439.1385643-1-stuarth@opensource.cirrus.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Proofpoint-GUID: l_UbqcPDYUusJtVyLRYriK-0E3ybHfBm X-Proofpoint-ORIG-GUID: l_UbqcPDYUusJtVyLRYriK-0E3ybHfBm X-Proofpoint-Spam-Reason: safe Message-ID-Hash: GMVD2M3ZEPBXKNMLXO54MSIYACAWPGPE X-Message-ID-Hash: GMVD2M3ZEPBXKNMLXO54MSIYACAWPGPE X-MailFrom: prvs=079554e8cd=stuarth@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Stuart Henderson --- sound/soc/codecs/wm8962.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index fb90ae6a8a34..6d7bb696b135 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -2914,8 +2914,12 @@ static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int s switch (fll_id) { case WM8962_FLL_MCLK: case WM8962_FLL_BCLK: + fll1 |= (fll_id - 1) << WM8962_FLL_REFCLK_SRC_SHIFT; + break; case WM8962_FLL_OSC: fll1 |= (fll_id - 1) << WM8962_FLL_REFCLK_SRC_SHIFT; + snd_soc_component_update_bits(component, WM8962_PLL2, + WM8962_OSC_ENA, WM8962_OSC_ENA); break; case WM8962_FLL_INT: snd_soc_component_update_bits(component, WM8962_FLL_CONTROL_1, From patchwork Wed Mar 6 16:14:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Henderson X-Patchwork-Id: 778322 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 5F962C5475B for ; Wed, 6 Mar 2024 16:16:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1E436741; Wed, 6 Mar 2024 17:15:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1E436741 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1709741759; bh=mf/a3fJvXAWlIxG7i7kGND+vj/W4iuRR4kcrYdv2AZo=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gbYH/rObgmXuIet7g/0fB7V/BaQ9fg3DBdc1V190EqmnuDj9EGS46i21nihumfUGB SqmXZol14By2Ch2uFpHG81upjb18NN+izx78PYYea6iei4EQ/yzjPJ2KnWijTZ8NjU ra1NGqrgUGDjs8RKCc5ImAJGpyOwkJiObSSfRm4w= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 399BEF805E3; Wed, 6 Mar 2024 17:15:20 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3D839F805B1; Wed, 6 Mar 2024 17:15:19 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 97127F805B2; Wed, 6 Mar 2024 17:15:15 +0100 (CET) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (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 CB5BBF80087 for ; Wed, 6 Mar 2024 17:15:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CB5BBF80087 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=N4cpKvZJ Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4265UZQi010435; Wed, 6 Mar 2024 10:15:07 -0600 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=pJ/WkIoXhaqR5oIitapGQqC4cshDQ7jqZ1DKMYWOGgM=; b= N4cpKvZJBNuduFYQsLACqWOfpg4e4PuFZnJ+yLTtXbEMlkrMSr1fibOelmoJskYL WL8ySZqXify+amKimsFRUhVW5uMNK76wJ1z57Iy2in9aLtq4IDw3As5CZAt+GpLc Lx2H3A0RdwzcwmkxTlnzW6U/I6y0BXjDdKKG/M5FYFwx35YC2CE2ZhSgGg5C2rrs K4PiVDS+96SQCtBdfCAUkjOtIXPJ2m/fY6H0Bj81+RfGCL3x4T7XvWCrJTc1Qh/F v6WzUmlNtYfQoiShmUGOeVekMWHpmOogAq8UwrId+FcAS4jawh3Q2PE2vFuZe6iU 6/UCQRkKDhoJtp57XY2PHw== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3wm2d2mwg1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Mar 2024 10:15:06 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 6 Mar 2024 16:15:04 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Wed, 6 Mar 2024 16:15:04 +0000 Received: from ediswws08.ad.cirrus.com (ediswws08.ad.cirrus.com [198.90.208.13]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id CA14E820243; Wed, 6 Mar 2024 16:15:04 +0000 (UTC) From: Stuart Henderson To: , , CC: , , , , "Stuart Henderson" Subject: [PATCH 2/5] ASoC: wm8962: Enable both SPKOUTR_ENA and SPKOUTL_ENA in mono mode Date: Wed, 6 Mar 2024 16:14:36 +0000 Message-ID: <20240306161439.1385643-2-stuarth@opensource.cirrus.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240306161439.1385643-1-stuarth@opensource.cirrus.com> References: <20240306161439.1385643-1-stuarth@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: FSOOlnZEJT6VPeZIY-D8claeutY-n2KL X-Proofpoint-GUID: FSOOlnZEJT6VPeZIY-D8claeutY-n2KL X-Proofpoint-Spam-Reason: safe Message-ID-Hash: 6APZ57XLPDIB2QLOX6KOMIOHIL7NTT4I X-Message-ID-Hash: 6APZ57XLPDIB2QLOX6KOMIOHIL7NTT4I X-MailFrom: prvs=079554e8cd=stuarth@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Stuart Henderson --- sound/soc/codecs/wm8962.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 6d7bb696b135..2256cc0a37eb 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -2229,6 +2229,9 @@ SND_SOC_DAPM_PGA_E("HPOUT", SND_SOC_NOPM, 0, 0, NULL, 0, hp_event, SND_SOC_DAPM_OUTPUT("HPOUTL"), SND_SOC_DAPM_OUTPUT("HPOUTR"), + +SND_SOC_DAPM_PGA("SPKOUTL Output", WM8962_CLASS_D_CONTROL_1, 6, 0, NULL, 0), +SND_SOC_DAPM_PGA("SPKOUTR Output", WM8962_CLASS_D_CONTROL_1, 7, 0, NULL, 0), }; static const struct snd_soc_dapm_widget wm8962_dapm_spk_mono_widgets[] = { @@ -2236,7 +2239,6 @@ SND_SOC_DAPM_MIXER("Speaker Mixer", WM8962_MIXER_ENABLES, 1, 0, spkmixl, ARRAY_SIZE(spkmixl)), SND_SOC_DAPM_MUX_E("Speaker PGA", WM8962_PWR_MGMT_2, 4, 0, &spkoutl_mux, out_pga_event, SND_SOC_DAPM_POST_PMU), -SND_SOC_DAPM_PGA("Speaker Output", WM8962_CLASS_D_CONTROL_1, 7, 0, NULL, 0), SND_SOC_DAPM_OUTPUT("SPKOUT"), }; @@ -2251,9 +2253,6 @@ SND_SOC_DAPM_MUX_E("SPKOUTL PGA", WM8962_PWR_MGMT_2, 4, 0, &spkoutl_mux, SND_SOC_DAPM_MUX_E("SPKOUTR PGA", WM8962_PWR_MGMT_2, 3, 0, &spkoutr_mux, out_pga_event, SND_SOC_DAPM_POST_PMU), -SND_SOC_DAPM_PGA("SPKOUTR Output", WM8962_CLASS_D_CONTROL_1, 7, 0, NULL, 0), -SND_SOC_DAPM_PGA("SPKOUTL Output", WM8962_CLASS_D_CONTROL_1, 6, 0, NULL, 0), - SND_SOC_DAPM_OUTPUT("SPKOUTL"), SND_SOC_DAPM_OUTPUT("SPKOUTR"), }; @@ -2366,12 +2365,18 @@ static const struct snd_soc_dapm_route wm8962_spk_mono_intercon[] = { { "Speaker PGA", "Mixer", "Speaker Mixer" }, { "Speaker PGA", "DAC", "DACL" }, - { "Speaker Output", NULL, "Speaker PGA" }, - { "Speaker Output", NULL, "SYSCLK" }, - { "Speaker Output", NULL, "TOCLK" }, - { "Speaker Output", NULL, "TEMP_SPK" }, + { "SPKOUTL Output", NULL, "Speaker PGA" }, + { "SPKOUTL Output", NULL, "SYSCLK" }, + { "SPKOUTL Output", NULL, "TOCLK" }, + { "SPKOUTL Output", NULL, "TEMP_SPK" }, + + { "SPKOUTR Output", NULL, "Speaker PGA" }, + { "SPKOUTR Output", NULL, "SYSCLK" }, + { "SPKOUTR Output", NULL, "TOCLK" }, + { "SPKOUTR Output", NULL, "TEMP_SPK" }, - { "SPKOUT", NULL, "Speaker Output" }, + { "SPKOUT", NULL, "SPKOUTL Output" }, + { "SPKOUT", NULL, "SPKOUTR Output" }, }; static const struct snd_soc_dapm_route wm8962_spk_stereo_intercon[] = { From patchwork Wed Mar 6 16:14:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Henderson X-Patchwork-Id: 778321 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 B1DF8C54E41 for ; Wed, 6 Mar 2024 16:16:42 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 04C5093A; Wed, 6 Mar 2024 17:16:31 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 04C5093A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1709741801; bh=RMQmLYTq+/lca1JA6Zn12GvSI8xskgbIRo9zEF+OM+U=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=f6vDx/QRsVRFY6vFHQHt4Ui+zgXuQozrCybCmHeVNxXFBg8d+9qKElbNkD9+a2+87 GSUFZfwADlzMs7b+ka4AITFVKkQrafSFKzCtdF1ovmRKhwPICB6v9cOsM6b9xgf1Q9 6sg/sZTIv1GrdWsaWl8Vxdn/euAqCb9CWSdr5Ar8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4A82FF8061D; Wed, 6 Mar 2024 17:15:28 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 1BD4BF8061C; Wed, 6 Mar 2024 17:15:28 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 86422F805C9; Wed, 6 Mar 2024 17:15:20 +0100 (CET) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (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 25E27F801F5 for ; Wed, 6 Mar 2024 17:15:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 25E27F801F5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=Yxr2izgv Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4265UZQj010435; Wed, 6 Mar 2024 10:15:08 -0600 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=2EYpIdLCLpu/Qfdxs7ZcC2sdIWeueyqtT7yWJw24UdI=; b= Yxr2izgvWnvIXEAv+/AgNeH3mFypNJerj0Ku9cYA+ai/uqu60rCo6udHh1DE5XoR aUEASdBg7jsLjAB4PAPFChbUP5pHzq/uHU/klTOuECzeIm77SIy8LMIQKj//R+jL xMxBoNNO2jYKLNVszi0Dml6stGNxFqSKApcBKcceHYnOK/DAk4W50Hl7Q+7UR7Ml 3X1iHT8rqcn3I39No05fDSfUZw24Tq52tVYzL0IW4PI5n5JdNhE/79D4N2UTcpER tx66c34JTYcvPitlfbrDE6Hq09scvOCrsQ+UrH2eqeCJx5eH1xZrLJjWOljMNMEc F6H5zvESrzgpDW8nIKcnQg== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3wm2d2mwg1-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Mar 2024 10:15:07 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 6 Mar 2024 16:15:07 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Wed, 6 Mar 2024 16:15:06 +0000 Received: from ediswws08.ad.cirrus.com (ediswws08.ad.cirrus.com [198.90.208.13]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id E33D6820243; Wed, 6 Mar 2024 16:15:06 +0000 (UTC) From: Stuart Henderson To: , , CC: , , , , "Stuart Henderson" Subject: [PATCH 3/5] ASoC: fsl: Fix up mclk_id for fsl,imx-audio-wm8962 Date: Wed, 6 Mar 2024 16:14:37 +0000 Message-ID: <20240306161439.1385643-3-stuarth@opensource.cirrus.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240306161439.1385643-1-stuarth@opensource.cirrus.com> References: <20240306161439.1385643-1-stuarth@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: Zq9cizakeBP__Op7gmoYpMpTME1TrWbh X-Proofpoint-GUID: Zq9cizakeBP__Op7gmoYpMpTME1TrWbh X-Proofpoint-Spam-Reason: safe Message-ID-Hash: D4H7WYO4XYAPX372GTQR7LH3XUY7LTRP X-Message-ID-Hash: D4H7WYO4XYAPX372GTQR7LH3XUY7LTRP X-MailFrom: prvs=079554e8cd=stuarth@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: wm8962_set_fll is currently incorrect, and largely ignores the source parameter. This patch fixes this use of wm8962_set_fll in preparation for fixing this. Previously we were using WM8962_SYSCLK_MCLK (0), but wm8962_set_fll ends up using the fll_id (in this case WM8962_FLL = 1). Change this to WM8962_FLL_MCLK (1) instead. Signed-off-by: Stuart Henderson --- sound/soc/fsl/fsl-asoc-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index bc07f26ba303..2781fd8d198e 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -656,7 +656,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) priv->card.num_dapm_routes = ARRAY_SIZE(audio_map_tx); } else if (of_device_is_compatible(np, "fsl,imx-audio-wm8962")) { codec_dai_name = "wm8962"; - priv->codec_priv.mclk_id = WM8962_SYSCLK_MCLK; + priv->codec_priv.mclk_id = WM8962_FLL_MCLK; priv->codec_priv.fll_id = WM8962_SYSCLK_FLL; priv->codec_priv.pll_id = WM8962_FLL; priv->dai_fmt |= SND_SOC_DAIFMT_CBP_CFP; From patchwork Wed Mar 6 16:14:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Henderson X-Patchwork-Id: 778861 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 1C902C5475B for ; Wed, 6 Mar 2024 16:16:20 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id AD592DEE; Wed, 6 Mar 2024 17:16:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AD592DEE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1709741777; bh=NL/0kJLMNB3af/nPrZVGA4zsieNtor+zdkiPluqcrOw=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mpiwOQpTAHlijJzzMfgSYSbuhda0pQXlamIDyV2SkPkH1qL4j8E0CpDlhTyqXVD/B RGTIT/Pc2ktFSvdpaomSMaByD90ohefe/3DId52ubNJMNgHWA2VGqREcMqX5dklbXd BbT8CeMDHrZuFbHMQ3+bjoeOxNeIJgvt9BGAlTz0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2822CF805F1; Wed, 6 Mar 2024 17:15:22 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 72692F805F9; Wed, 6 Mar 2024 17:15:22 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 04E07F805B1; Wed, 6 Mar 2024 17:15:16 +0100 (CET) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (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 B54A8F8058C for ; Wed, 6 Mar 2024 17:15:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B54A8F8058C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=WRxLoTK3 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4265UZQk010435; Wed, 6 Mar 2024 10:15:08 -0600 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=VZNrVFRkfXL9w5uIYi/FRwxU+dWrhc/p57PfZFvalls=; b= WRxLoTK3l9ZH4Y7a6CbeC65EN2kWfgDWIcKEW6+y020QvLT7GRYPUFUSme9nDEKH nBBs9inOwKpGCm5Sc6CFVq6xX01GJYesK56CGjb4kvQ+t8HHsqpuA7+eRlN2TMeF NdjqrSZQK3Sx50M0gBK1/902hf+AhiUXH9xPmHryZe46N6/EQoLu0ATKhu8+HZrt rIfzqDESazRjC18IOLhN2B97Pc9bzZ3Zw2UPchcXCzKZ1ww7sn9zAAn6m6wu+rQr 53OOan5DC7EMuXLy8+zNBtOK67ohdPAd6w56owdnq4nLlWEra15HEni6gSQIXHa3 tmzMm28SY+VqGCQbOyyffQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3wm2d2mwg1-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Mar 2024 10:15:08 -0600 (CST) 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_256_GCM_SHA384) id 15.2.1544.4; Wed, 6 Mar 2024 16:15:08 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4 via Frontend Transport; Wed, 6 Mar 2024 16:15:08 +0000 Received: from ediswws08.ad.cirrus.com (ediswws08.ad.cirrus.com [198.90.208.13]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id EB68082024D; Wed, 6 Mar 2024 16:15:07 +0000 (UTC) From: Stuart Henderson To: , , CC: , , , , "Stuart Henderson" Subject: [PATCH 4/5] ASoC: wm8962: Fix wm8962_set_fll to use source instead of fll_id Date: Wed, 6 Mar 2024 16:14:38 +0000 Message-ID: <20240306161439.1385643-4-stuarth@opensource.cirrus.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240306161439.1385643-1-stuarth@opensource.cirrus.com> References: <20240306161439.1385643-1-stuarth@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: fpMeca3XnbrZ1u6BZ8CozMD4xQPnsanN X-Proofpoint-GUID: fpMeca3XnbrZ1u6BZ8CozMD4xQPnsanN X-Proofpoint-Spam-Reason: safe Message-ID-Hash: LTNQNQDLCP4LUK6R7BYCLMO6WCQJ5EA3 X-Message-ID-Hash: LTNQNQDLCP4LUK6R7BYCLMO6WCQJ5EA3 X-MailFrom: prvs=079554e8cd=stuarth@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Previously wm8962_set_fll was using fll_id to configure the source. This change is problematic, but it looks like there's limited users of this driver, and luckily they all seem to be intending to use WM8962_FLL_MCLK as the source which happens to have the same value as WM8962_FLL. Signed-off-by: Stuart Henderson --- sound/soc/codecs/wm8962.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 2256cc0a37eb..24bd818c3345 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -2890,6 +2890,14 @@ static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int s int ret; int fll1 = 0; + switch (fll_id) { + case WM8962_FLL: + break; + default: + dev_err(component->dev, "Unknown FLL ID %d\n", fll_id); + return -EINVAL; + } + /* Any change? */ if (source == wm8962->fll_src && Fref == wm8962->fll_fref && Fout == wm8962->fll_fout) @@ -2916,13 +2924,13 @@ static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int s /* Parameters good, disable so we can reprogram */ snd_soc_component_update_bits(component, WM8962_FLL_CONTROL_1, WM8962_FLL_ENA, 0); - switch (fll_id) { + switch (source) { case WM8962_FLL_MCLK: case WM8962_FLL_BCLK: - fll1 |= (fll_id - 1) << WM8962_FLL_REFCLK_SRC_SHIFT; + fll1 |= (source - 1) << WM8962_FLL_REFCLK_SRC_SHIFT; break; case WM8962_FLL_OSC: - fll1 |= (fll_id - 1) << WM8962_FLL_REFCLK_SRC_SHIFT; + fll1 |= (source - 1) << WM8962_FLL_REFCLK_SRC_SHIFT; snd_soc_component_update_bits(component, WM8962_PLL2, WM8962_OSC_ENA, WM8962_OSC_ENA); break; From patchwork Wed Mar 6 16:14:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Henderson X-Patchwork-Id: 778860 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 4A8A3C5475B for ; Wed, 6 Mar 2024 16:16:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8CAD884D; Wed, 6 Mar 2024 17:16:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8CAD884D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1709741811; bh=ioYN/9YghUj0aCB+8sxcgLE59kh3ARmKIokGHWoPN0s=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=LotdBYC8R3Y9Xe0WCG+h5j+EksPy1WUoiWMzlDWygurYKb6nM8cYVX+j1d2+TOMEq Jmb93/DzQKMps+rL+qNqzKlaQYCtKpsIgi+Rd6tGz+X6H7BkUGOSPB4MTgygR36woU 22FcYzPL9NHpqka9xVKKzNLkNvtnAWYUhOJf7Y3E= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 37FD1F80636; Wed, 6 Mar 2024 17:15:30 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A4DF6F8063C; Wed, 6 Mar 2024 17:15:29 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6CDA5F805C9; Wed, 6 Mar 2024 17:15:22 +0100 (CET) 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 5C753F805B0 for ; Wed, 6 Mar 2024 17:15:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5C753F805B0 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=DzuFhK0x Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4268m45H016753; Wed, 6 Mar 2024 10:15:10 -0600 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=bRU53y88xZ5UTSTdeL7E9DlLRqfwscew8y4zZPeOtvw=; b= DzuFhK0xgLwkNfb/9rHkmebTTxtraSge9LlgHjAeC2to/86SSIItWaKJv6zboVu3 qifYBzQ2rIQQdcWClGmXVV+FBnKLgan4HkOPWxPg3IyiR/IBPZo/1sQJqKzAMuBX 3IJaMauPfr11MG2FuUYs2Sn9Pl7TEESesie7PIiyPQhYJiNarufIpQnGQtUZ1SoE OfuPDG/hQbbEBkep9FgIaa1PwmzLt1iQ9h9y60njAPJP1v04KRmqbD66GO9aif2M gGgMqh9fwrfSkbRW349eOP1wpYHFpp1pG1ANS8nlzYXc6xgyQr+hTT41Ppmr0MIk UX4PEaYkaTNIMdCXmIIiXw== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3wpn930g9n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Mar 2024 10:15:10 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 6 Mar 2024 16:15:08 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Wed, 6 Mar 2024 16:15:08 +0000 Received: from ediswws08.ad.cirrus.com (ediswws08.ad.cirrus.com [198.90.208.13]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id BE609820243; Wed, 6 Mar 2024 16:15:08 +0000 (UTC) From: Stuart Henderson To: , , CC: , , , , "Stuart Henderson" Subject: [PATCH 5/5] ASoC: wm8962: Fix up incorrect error message in wm8962_set_fll Date: Wed, 6 Mar 2024 16:14:39 +0000 Message-ID: <20240306161439.1385643-5-stuarth@opensource.cirrus.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240306161439.1385643-1-stuarth@opensource.cirrus.com> References: <20240306161439.1385643-1-stuarth@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: GQpgMBZCV7sidcX6J5TRZH52UMzzfD2J X-Proofpoint-ORIG-GUID: GQpgMBZCV7sidcX6J5TRZH52UMzzfD2J X-Proofpoint-Spam-Reason: safe Message-ID-Hash: K7O5SR4RQEQ2ZNEHAZTFKZDKJAGUJWSN X-Message-ID-Hash: K7O5SR4RQEQ2ZNEHAZTFKZDKJAGUJWSN X-MailFrom: prvs=079554e8cd=stuarth@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Use source instead of ret, which seems to be unrelated and will always be zero. Signed-off-by: Stuart Henderson --- sound/soc/codecs/wm8962.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 24bd818c3345..5ad6850c591f 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -2941,7 +2941,7 @@ static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int s WM8962_FLL_FRC_NCO, WM8962_FLL_FRC_NCO); break; default: - dev_err(component->dev, "Unknown FLL source %d\n", ret); + dev_err(component->dev, "Unknown FLL source %d\n", source); return -EINVAL; }