Linux Sound subsystem development
 help / color / mirror / Atom feed
From: "Sylwester Nawrocki" <s.nawrocki@samsung.com>
To: "'Marek Szyprowski'" <m.szyprowski@samsung.com>
Cc: "'Liam Girdwood'" <lgirdwood@gmail.com>,
	"'Mark Brown'" <broonie@kernel.org>,
	"'Charles Keepax'" <ckeepax@opensource.cirrus.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 17:23:03 +0200	[thread overview]
Message-ID: <000301dd6170$111b82f0$335288d0$@samsung.com> (raw)
In-Reply-To: <20261021101750.3297770-4-m.szyprowski@samsung.com>

> -----Original Message-----
> From: Marek Szyprowski <m.szyprowski@samsung.com>
> Sent: środa, 21 października 2026 12:18
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>; Liam Girdwood
> <lgirdwood@gmail.com>; Mark Brown <broonie@kernel.org>; Sylwester
> Nawrocki <s.nawrocki@samsung.com>; Charles Keepax
> <ckeepax@opensource.cirrus.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: [PATCH 3/4] ASoC: wm8994: fix MCLK index used for setting MCLK
> rate
> 
> 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: Sylwester Nawrocki <s.nawrocki@samsung.com>



  parent reply	other threads:[~2026-10-21 15:23 UTC|newest]

Thread overview: 13+ 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
2026-10-21 15:23     ` Sylwester Nawrocki [this message]
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

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='000301dd6170$111b82f0$335288d0$@samsung.com' \
    --to=s.nawrocki@samsung.com \
    --cc=aweber.kernel@gmail.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox