All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Simon Shields <simon@lineageos.org>,
	Artur Weber <aweber.kernel@gmail.com>,
	patches@opensource.cirrus.com, linux-sound@vger.kernel.org
Subject: Re: [PATCH 3/4] ASoC: wm8994: fix MCLK index used for setting MCLK rate
Date: Wed, 21 Oct 2026 14:57:38 +0100	[thread overview]
Message-ID: <atjE0l21RJ09Wphj@opensource.cirrus.com> (raw)
In-Reply-To: <20261021101750.3297770-4-m.szyprowski@samsung.com>

On Wed, Oct 21, 2026 at 12:17:44PM +0200, Marek Szyprowski wrote:
> wm8994_set_dai_sysclk() passes the AIF index (dai->id - 1) to
> wm8994_set_mclk_rate(), which uses it to index the MCLK clocks and
> their cached rates. As a result, selecting MCLK2 as the AIF1 clock
> source sets and reads back the rate of MCLK1 instead, and the rate
> of MCLK1 is then stored as the MCLK2 rate.
> 
> On the Exynos4412 Trats2 board, where MCLK1 is a fixed 24MHz clock and
> MCLK2 a 32768Hz clock used when the codec is idle, this gives:
> 
>  wm8994-codec wm8994-codec: AIF1 using MCLK2 at 24000000Hz
> 
> so the driver assumes a 12MHz SYSCLK while it actually runs at 32kHz.
> This skips the 128fs AIF clock ratio setup for low SYSCLK rates and
> makes the mic detection rate configuration use the wrong clock rate.
> 
> Pass the MCLK index matching the selected clock source instead.
> 
> Fixes: 419e2f508336 ("ASoC: wm8994: Add support for setting MCLK clock rate")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

  reply	other threads:[~2026-10-21 13:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20261021101815eucas1p2f6dd40fb230ab01b36c7d8f3eada0f45@eucas1p2.samsung.com>
2026-10-21 10:17 ` [PATCH 0/4] ASoC: wm8994/midas_wm1811: fix codec clocking issues Marek Szyprowski
2026-10-21 10:17   ` [PATCH 1/4] ASoC: wm8994: fix MCLK gating for AIF clocks sourced from MCLK2 Marek Szyprowski
2026-10-21 14:39     ` Charles Keepax
2026-10-21 15:17     ` Sylwester Nawrocki
2026-10-21 15:24     ` Mark Brown
2026-10-21 10:17   ` [PATCH 2/4] ASoC: wm8994: don't lose the AIF clock ratio when staying at 32kHz SYSCLK Marek Szyprowski
2026-10-21 14:21     ` Charles Keepax
2026-10-21 15:22     ` Sylwester Nawrocki
2026-10-21 10:17   ` [PATCH 3/4] ASoC: wm8994: fix MCLK index used for setting MCLK rate Marek Szyprowski
2026-10-21 13:57     ` Charles Keepax [this message]
2026-10-21 15:23     ` Sylwester Nawrocki
2026-10-21 10:17   ` [PATCH 4/4] ASoC: samsung: midas_wm1811: run FLL1 at the AIF1 configured rate when idle Marek Szyprowski
2026-10-21 15:31     ` Sylwester Nawrocki
2026-10-21 15:26   ` [PATCH 0/4] ASoC: wm8994/midas_wm1811: fix codec clocking issues Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=atjE0l21RJ09Wphj@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=aweber.kernel@gmail.com \
    --cc=broonie@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=patches@opensource.cirrus.com \
    --cc=s.nawrocki@samsung.com \
    --cc=simon@lineageos.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.