mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/2] ASoC: tegra: ASRC ratio control updates
@ 2026-10-05  8:52 Sheetal
  2026-10-05  8:52 ` [RFC PATCH v2 1/2] ASoC: tegra: Update ASRC ratio controls Sheetal
  2026-10-05  8:52 ` [RFC PATCH v2 2/2] ASoC: tegra: Cache ASRC ratios until streams are active Sheetal
  0 siblings, 2 replies; 3+ messages in thread
From: Sheetal @ 2026-10-05  8:52 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 updates the Tegra ASRC software ratio controls so userspace
programs the integer and fractional ratio parts through one paired ALSA
mixer control.

This is a userspace-visible ALSA mixer control ABI change. Existing
userspace that programs the ratio with separate controls must switch from
the legacy commands:

  amixer -c APE cset name="ASRC1 Ratio<N> Integer Part" \
    <integer part>
  amixer -c APE cset name="ASRC1 Ratio<N> Fractional Part" \
    <fractional part>

to the paired control:

  amixer -c APE cset name="ASRC1 Ratio<N>" \
    "<integer part>,<fractional part>"

For example:

  amixer -c APE cset name="ASRC1 Ratio1" "0,715827882"

The ABI change is needed because the previous separate controls can expose
hardware to a transient mixed ratio when one part has been updated but the
other still contains the old value. The paired control lets the driver
validate and program the full ratio together.

For active streams, the driver only unlocks and re-locks the stream when
the new software ratio differs from the cached ratio by more than 20%.
Hardware allows direct updates for smaller ratio changes, while larger
jumps require the stream lock to be refreshed.

Changes in v2:
- Split the Stream6 input threshold fix out as a separate non-RFC patch,
  since that fix is independent of this ABI discussion.
- Expanded the ABI-change description with legacy userspace commands and
  the new paired control command.
- Clarified why the driver keeps conditional unlock/relock handling for
  active stream ratio updates.

Sheetal (2):
  ASoC: tegra: Update ASRC ratio controls
  ASoC: tegra: Cache ASRC ratios until streams are active

 sound/soc/tegra/tegra186_asrc.c | 511 +++++++++++++++++++++-----------
 sound/soc/tegra/tegra186_asrc.h |   5 +
 2 files changed, 346 insertions(+), 170 deletions(-)

-- 
2.43.0

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-05  8:52 [RFC PATCH v2 0/2] ASoC: tegra: ASRC ratio control updates Sheetal
2026-10-05  8:52 ` [RFC PATCH v2 1/2] ASoC: tegra: Update ASRC ratio controls Sheetal
2026-10-05  8:52 ` [RFC PATCH v2 2/2] ASoC: tegra: Cache ASRC ratios until streams are active Sheetal

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®