[RFC PATCH v2 0/2] ASoC: tegra: ASRC ratio control updates

From: Sheetal

Date: Mon Oct 05 2026 - 04:56:44 EST


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