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: 13584274 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 smtp.subspace.kernel.org (Postfix) with ESMTPS id 68A2760912; Wed, 6 Mar 2024 16:15:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.152.168 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709741707; cv=none; b=q1mgbtwNksvRGsymlqZGY/aMmawfahpVhEYLt4MLPTn8N4UxgZpmNi8eBrjrYH9WBuG/hKEFyIjxipxxnA7bkmlEAQWHkhFZGoHOrObl6vHqTDflCotsxy+AY0dNQMqADM48Rwc9uUCFwkD8QYLnvWABN1+Z5cte8Bb6oqEfSG4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709741707; c=relaxed/simple; bh=N1y4nbPYklUfzjtuyH7rOVJRAsLNFjOy8FvLbQ54CR8=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Eb9f4IavwZXhQ2CV7ZxPby3/+8hqQFUgf4JxWwVmgR9KoF6/t/DoxbWT0EA8iEnfnIzj7kmqepowDbFej4W6sZbkUcoP8wian83OPT10VzTUnoBXuZt44Ksld7nnmuf8KzHWyKWvpLH9aZphmyzI3QEkXnYCXDkKuDZmBoBNn4w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=MvRn+r6F; arc=none smtp.client-ip=67.231.152.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com 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 Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: l_UbqcPDYUusJtVyLRYriK-0E3ybHfBm X-Proofpoint-ORIG-GUID: l_UbqcPDYUusJtVyLRYriK-0E3ybHfBm X-Proofpoint-Spam-Reason: safe 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: 13584275 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 smtp.subspace.kernel.org (Postfix) with ESMTPS id B1EB660912; Wed, 6 Mar 2024 16:15:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.149.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709741716; cv=none; b=Gdo3DsGWRa4IOmyxwmtAN3h5dYwtY8Ls/wPNZR397i9YLGMvI6/B3rxsbQhVhg2iOR4swFI4JjnyJ1e5VH1gx2kt82HFypyscWy+C6ywLTeRsf9eDyKVuZwfq9HEfnZvfhe6I+7GmoogCHIpiYBT+U6pQv6UCY8xg9El+M6ysLQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709741716; c=relaxed/simple; bh=mf/a3fJvXAWlIxG7i7kGND+vj/W4iuRR4kcrYdv2AZo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=NR1iyqKxixnpDhV8IEViZJopszM1buz1CnxaoFjtECD3xRZcm7LzFjBHBgbVcDExKxXQrm7zxnQFPk/OBpPMFggSSN7/nmP4y4m3VDXt2KvS01GVht7YjpS7lekgM1G7ZzXP3x6eowflbcrJKaorQzPpTZguO+qxPdAfTG5+ymM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=N4cpKvZJ; arc=none smtp.client-ip=67.231.149.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com 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> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: FSOOlnZEJT6VPeZIY-D8claeutY-n2KL X-Proofpoint-GUID: FSOOlnZEJT6VPeZIY-D8claeutY-n2KL X-Proofpoint-Spam-Reason: safe 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: 13584276 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 smtp.subspace.kernel.org (Postfix) with ESMTPS id E8CA81361C6; Wed, 6 Mar 2024 16:15:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.149.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709741716; cv=none; b=HCZIHL0JI7+Ov6yG/UgKqbBTVL0UaqL+3a/bW5HDCm0kh0fmaTQtJ5S8vhTeu8uag2AnM5dyGVdbVEuqsNX1JyEH0W8CoSx7+vnJVxCkHRG9x/RzP36GpjFdi58106NnFAVvMWkIXLeWCDUZZ0Su8OGlbyZSS7/+A9uWrlteGrM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709741716; c=relaxed/simple; bh=RMQmLYTq+/lca1JA6Zn12GvSI8xskgbIRo9zEF+OM+U=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=okIcfsckkGCzj6d+XkgUfQZF3FMnjbjoT8spw0/mGNCgyZ6v4VMxc7DOAEvGX+dwB5wrTWvWt6/2YFOMg0DLKs1ocD3Vna7eTm9gqzME652Psfj79IV9igQHsdOP1cOIvhZNqLteJThMBcycBDxZA66mKNSYPmzB4MLKtDEEXHM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=Yxr2izgv; arc=none smtp.client-ip=67.231.149.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com 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> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: Zq9cizakeBP__Op7gmoYpMpTME1TrWbh X-Proofpoint-GUID: Zq9cizakeBP__Op7gmoYpMpTME1TrWbh X-Proofpoint-Spam-Reason: safe 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: 13584277 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 smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F18E1361CF; Wed, 6 Mar 2024 16:15:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.149.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709741716; cv=none; b=kSJdWCN1vh20OJM/YczvyXTymBnnGOR9OkKK0lyNMAsksE4okC3P+RquvCdoP1JfTXPlnOErJQt7/PQob9Qkh+vi0Al+Xz2KGXpRquGE9HRxEIuNR0h/EeKVx8F3F72EcygTir0S+fCefoMbhVj8TzL7BsLIutxYmuMVAldDQyM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709741716; c=relaxed/simple; bh=NL/0kJLMNB3af/nPrZVGA4zsieNtor+zdkiPluqcrOw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Kyo8kvWkze1F0XgkgBar4mAQ4AevLmrBl7IBsMYvv/v4QHHVz/CXwPOvR4SNUYTgcQjXBeonzfDkNvW0a0/RS8s6nlNMYf79M7ONrIwP8efu3quqZoboc71QkE/kBQS3bIIFQ5ICXxeRSY47s6W3xzDixpK158lwmkOoj9N+OTg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=WRxLoTK3; arc=none smtp.client-ip=67.231.149.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com 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> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: fpMeca3XnbrZ1u6BZ8CozMD4xQPnsanN X-Proofpoint-GUID: fpMeca3XnbrZ1u6BZ8CozMD4xQPnsanN X-Proofpoint-Spam-Reason: safe 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: 13584278 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 smtp.subspace.kernel.org (Postfix) with ESMTPS id B4177137936; Wed, 6 Mar 2024 16:15:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.152.168 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709741718; cv=none; b=cOPiktw/aVtfsnYz3qjt0/i1fj9f0dhk7oNDi5qmqkjEU8FtAhBzckgkJF7qyHf5Kr2cSqEk5qpQgZfuSSUaTARLv8tWMjjAOieuyeVby5MyY2r/AREr4XUTW3f2NlpB/Y4pHe978kcas8MkCDIjQ0CMiwwY9N1L+S1F8hSe0Bk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709741718; c=relaxed/simple; bh=ioYN/9YghUj0aCB+8sxcgLE59kh3ARmKIokGHWoPN0s=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LwV9wyYcTlAR6jLeop41NoSoD4MyjWOon7oQm95Pm1LQu6vb//1f1HGhCs3GNgjd7jcemiKioi7G95CPfHuSJc3Kz97t0mPSK6fjDRrxPciTBAta71HP4nPuHaPQPyLdOpfrU8Q1upbqDRmIX3/gfmMqTSakUlgsTvi96zpAKyE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=DzuFhK0x; arc=none smtp.client-ip=67.231.152.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com 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> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: GQpgMBZCV7sidcX6J5TRZH52UMzzfD2J X-Proofpoint-ORIG-GUID: GQpgMBZCV7sidcX6J5TRZH52UMzzfD2J X-Proofpoint-Spam-Reason: safe 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; }