mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] ASoC: tegra: ASRC control fixes and ratio caching
@ 2026-09-21  8:57 Sheetal
  2026-09-21  8:57 ` [RFC PATCH 1/3] ASoC: tegra: Fix ASRC Stream6 input threshold control Sheetal
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Sheetal @ 2026-09-21  8:57 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Jaroslav Kysela, Takashi Iwai, Thierry Reding, Jonathan Hunter,
	Sameer Pujar, Kuninori Morimoto, Mohan Kumar, linux-sound,
	linux-tegra, linux-kernel, Sheetal

This RFC series updates the Tegra186 ASRC driver control handling.

The main RFC point is the userspace-visible ALSA mixer control ABI
change in patch 2. The existing per-stream controls expose the software
ratio as separate integer and fractional mixer controls. This series
replaces each pair with one two-value mixer control so userspace updates
the integer and fractional parts together. That avoids programming a
transient mixed ratio to hardware, but it does require userspace that
sets ASRC software ratios to switch to the new paired controls.

Patch 1 fixes the Stream6 input-threshold control, which was using the
same stream index as Stream5 and therefore addressed the wrong lane.

Patch 2 replaces the separate integer and fractional software ratio
ALSA mixer controls with a paired two-value control per stream. This
keeps the integer/fractional ratio update atomic from userspace,
validates both values before programming hardware, serializes
ratio-source and ratio updates, refreshes the hardware lock for large
ratio jumps, and rolls back partial hardware updates on failure.

ALSA exposes one min and max range for all values in an integer-array
control, so the paired ratio controls advertise the fractional field's
full 32-bit range. The put callback validates the integer part separately
against the hardware field width.

Patch 3 caches software ratio updates while the target stream is not
active or the ASRC device is runtime suspended. Cached ratios are applied
when streams are configured and restored after runtime resume, avoiding
unsafe volatile register accesses while suspended.

Sheetal (3):
  ASoC: tegra: Fix ASRC Stream6 input threshold control
  ASoC: tegra: Update ASRC ratio controls
  ASoC: tegra: Cache ASRC ratios until streams are active

 sound/soc/tegra/tegra186_asrc.c | 513 +++++++++++++++++++++-----------
 sound/soc/tegra/tegra186_asrc.h |   5 +
 2 files changed, 347 insertions(+), 171 deletions(-)

-- 
2.43.0

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

end of thread, other threads:[~2026-09-21 12:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21  8:57 [RFC PATCH 0/3] ASoC: tegra: ASRC control fixes and ratio caching Sheetal
2026-09-21  8:57 ` [RFC PATCH 1/3] ASoC: tegra: Fix ASRC Stream6 input threshold control Sheetal
2026-09-21 11:38   ` Thierry Reding
2026-09-21  8:57 ` [RFC PATCH 2/3] ASoC: tegra: Update ASRC ratio controls Sheetal
2026-09-21 11:50   ` Thierry Reding
2026-09-21  8:57 ` [RFC PATCH 3/3] ASoC: tegra: Cache ASRC ratios until streams are active Sheetal
2026-09-21 12:07 ` [RFC PATCH 0/3] ASoC: tegra: ASRC control fixes and ratio caching Thierry Reding
2026-09-21 12:51   ` Mark Brown

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

all inboxes | Powered by JetHome®