From: HyeongJun An <sammiee5311@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Daniel Baluta <daniel.baluta@nxp.com>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Arnav Kapoor <kapoorarnav43@gmail.com>,
sound-open-firmware@alsa-project.org,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
HyeongJun An <sammiee5311@gmail.com>
Subject: [PATCH v2 0/2] ASoC: SOF: control: Check the volume and switch values
Date: Wed, 18 Nov 2026 18:38:38 +0900 [thread overview]
Message-ID: <20261118093840.3514408-1-sammiee5311@gmail.com> (raw)
SOF volume and switch controls accept any value from user space. Patch 2
rejects values outside the range the info callbacks report.
Peter pointed out in v1 that snd_sof_volume_info(), which the controls
with more than two channels use, reports the maximum differently from
snd_soc_info_volsw(). Patch 1 makes it report the same range, and patch
2 checks against that range.
Patches 1 and 2 of Arnav Kapoor's series overlap with patch 2 here:
https://lore.kernel.org/all/20261117105953.188645-1-kapoorarnav43@gmail.com/
Changes in v2:
- Add patch 1 to align snd_sof_volume_info() with snd_soc_info_volsw()
(Peter Ujfalusi)
- Patch 2 takes the maximum from the helper added in patch 1
v1: https://lore.kernel.org/all/20261114021730.2349347-1-sammiee5311@gmail.com/
Tested on a Dell Latitude 9420 (Tiger Lake, SOF IPC3,
sof-tgl-rt711-rt1316-rt714.tplg) with only snd-sof replaced. The
mixer-test failures went from 9 to 0 and pcm-test is unchanged. Out of
range writes to the volumes and switches now fail with -EINVAL, and in
range writes still work. The laptop has no SOF control with more than
two channels, so patch 1 changes nothing there. The reported range of
every SOF control is the same before and after.
Prepared with Claude Code (Claude Opus 5.5).
HyeongJun An (2):
ASoC: SOF: control: Report the volume range as ASoC does
ASoC: SOF: control: Reject out of range volume and switch values
sound/soc/sof/control.c | 49 +++++++++++++++++++++++++++++++++++------
1 file changed, 42 insertions(+), 7 deletions(-)
--
2.43.0
next reply other threads:[~2026-11-18 9:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 9:38 HyeongJun An [this message]
2026-11-18 9:38 ` [PATCH v2 1/2] ASoC: SOF: control: Report the volume range as ASoC does HyeongJun An
2026-11-18 9:38 ` [PATCH v2 2/2] ASoC: SOF: control: Reject out of range volume and switch values HyeongJun An
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=20261118093840.3514408-1-sammiee5311@gmail.com \
--to=sammiee5311@gmail.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=broonie@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=kapoorarnav43@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=sound-open-firmware@alsa-project.org \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.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
all inboxes | Powered by JetHome®