Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Stefano Radaelli <stefano.radaelli21@gmail.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	alexander.h@variscite.com, pierluigi.p@variscite.com,
	Stefano Radaelli <stefano.r@variscite.com>
Subject: [PATCH v2 0/2] ASoC: simple-card: make sysclk ordering configurable
Date: Tue, 10 Feb 2026 17:45:04 +0100	[thread overview]
Message-ID: <20260210164506.161810-1-stefano.r@variscite.com> (raw)

This patch series addresses an issue in simple-audio-card where the
ordering of sysclk configuration between CPU and codec DAIs can affect
the initial playback behaviour on some platforms.

Some CPU DAIs finalize the MCLK rate as part of their set_sysclk()
callback. If the codec sysclk is configured before the CPU DAI applies
the final MCLK rate, the codec may base its internal clocking on a
non-final MCLK value, resulting in incorrect clocking on the first
playback after boot.

This was observed on i.MX95 systems using fsl_sai, but the issue is
generic and can affect any setup where the CPU DAI adjusts the MCLK rate
in set_sysclk().

Instead of changing the ordering unconditionally, this series keeps the
existing default behaviour (codec-first) and introduces a DT flag that
allows selecting CPU-first sysclk ordering where required. This makes
the behaviour configurable on a per-card or per-link basis while
avoiding regressions on existing systems.

Patch 1 documents the new DT binding.
Patch 2 implements the selectable sysclk ordering in simple-audio-card.

v2:
- Do not change the default sysclk ordering
- Make the ordering selectable via DT flag
- Add DT binding documentation

v1:
Link: https://patchwork.kernel.org/project/alsa-devel/patch/20260206134014.143057-1-stefano.r@variscite.com/

Stefano Radaelli (2):
  dt-bindings: sound: simple-card: add sysclk-cpu-first flag
  ASoC: simple-card-utils: add selectable sysclk ordering

 .../bindings/sound/simple-card.yaml           | 11 ++++++
 include/sound/simple_card_utils.h             |  1 +
 sound/soc/generic/simple-card-utils.c         | 39 +++++++++++++------
 sound/soc/generic/simple-card.c               |  7 ++++
 4 files changed, 47 insertions(+), 11 deletions(-)


base-commit: b7ff7151e653aa296ab6c5495b2c1ab7c21eb250
-- 
2.47.3


             reply	other threads:[~2026-02-10 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-10 16:45 Stefano Radaelli [this message]
2026-02-10 16:45 ` [PATCH v2 1/2] dt-bindings: sound: simple-card: add sysclk-cpu-first flag Stefano Radaelli
2026-02-11  6:23   ` Krzysztof Kozlowski
2026-02-11  9:18     ` Stefano Radaelli
2026-02-10 16:45 ` [PATCH v2 2/2] ASoC: simple-card-utils: add selectable sysclk ordering Stefano Radaelli

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=20260210164506.161810-1-stefano.r@variscite.com \
    --to=stefano.radaelli21@gmail.com \
    --cc=alexander.h@variscite.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierluigi.p@variscite.com \
    --cc=robh@kernel.org \
    --cc=stefano.r@variscite.com \
    --cc=tiwai@suse.com \
    /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