Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: rockchip: i2s-tdm: register the PCM before the DAI
@ 2026-11-10  7:16 Arun Iyengar via B4 Relay
  2026-11-10  7:16 ` [PATCH 1/2] ASoC: rockchip: i2s-tdm: Register " Arun Iyengar via B4 Relay
  2026-11-10  7:16 ` [PATCH 2/2] ASoC: rockchip: i2s-tdm: add the reset value of XFER to the regmap defaults Arun Iyengar via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-10  7:16 UTC (permalink / raw)
  To: Nicolas Frattaroli, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Heiko Stuebner
  Cc: linux-rockchip, linux-sound, linux-arm-kernel, linux-kernel

The Rockchip I2S-TDM driver registers its DAI component before the
dmaengine PCM component. A sound card that was registered earlier and
waits for the CPU DAI is bound by snd_soc_component_register() as soon
as the DAI component appears, which also satisfies the DAI link's
platform (it defaults to the CPU of_node), so the card binds without the
PCM component. Every open of the PCM then fails with -EINVAL from
snd_pcm_hw_constraints_complete(), silently. On RK3588 this happens to
the HDMI sound card whenever the HDMI codec probes before the I2S
controller. Patch 1 registers the PCM first, as rockchip_spdif already
does.

Patch 2 adds the missing regmap default for I2S_XFER, which otherwise
warns "using zero-initialized flat cache" on its first cached access.

The non-TDM rockchip_i2s driver has the same registration order; the
same change for it will follow once it is tested on a board that uses
that controller (the RK3588 board here only has I2S-TDM instances).

Tested on an Orange Pi 5 (RK3588S): with patch 1 the HDMI card has its
dma:fddf0000.i2s component (debugfs asoc/hdmi0), speaker-test on
plughw:CARD=hdmi0 plays, and "aplay -D hw:<hdmi>,0" no longer fails
with "Invalid argument" (traced before the fix to
snd_pcm_hw_constraint_mask returning -22 with no dmaengine component on
the runtime). With patch 2 the flat-cache warning for fddf0000.i2s is
gone and HDMI playback is unchanged.

This series was developed with Claude (Anthropic) as a coding assistant:
it wrote the code and the commit messages, and I reviewed and tested
every change as described above.

Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
Arun Iyengar (2):
      ASoC: rockchip: i2s-tdm: Register the PCM before the DAI
      ASoC: rockchip: i2s-tdm: add the reset value of XFER to the regmap defaults

 sound/soc/rockchip/rockchip_i2s_tdm.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
---
base-commit: cde5523c75f1320a55ac1d55a717ccbb566557f0
change-id: 20261110-asoc-rockchip-i2s-tdm-d6a6f86e81a9

Best regards,
--  
Arun Iyengar <aiyengar1990@gmail.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-10  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-10  7:16 [PATCH 0/2] ASoC: rockchip: i2s-tdm: register the PCM before the DAI Arun Iyengar via B4 Relay
2026-11-10  7:16 ` [PATCH 1/2] ASoC: rockchip: i2s-tdm: Register " Arun Iyengar via B4 Relay
2026-11-10  7:16 ` [PATCH 2/2] ASoC: rockchip: i2s-tdm: add the reset value of XFER to the regmap defaults Arun Iyengar via B4 Relay
2026-11-10  7:36   ` sashiko-bot
2026-11-10  8:37     ` Arun Iyengar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox