Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: linux-sound@vger.kernel.org
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Sakamoto <o-takashi@sakamocchi.jp>,
	linux-kselftest@vger.kernel.org
Subject: [PATCH v3 0/6] ALSA: some driver fixes for control input validations
Date: Sun, 16 Jun 2024 09:34:41 +0200	[thread overview]
Message-ID: <20240616073454.16512-1-tiwai@suse.de> (raw)

Hi,

this is a v3 patch set as a follow up of the thread about the errors
reported by kselftest mixer-test.  It changes HD-audio and vmaster
control behavior to return -EINVAL for invalid input values.

There is a change in kselftest itself to skip the verification after
write tests for volatile controls, too.  It's for the channel map
controls that can't hold the stable values.

v2->v3:
* Replace with Mark's patch for kselftest
* Apply the validation for user controls in put callback instead

v1->v2:
* Skip only verification after write in kselftest
* Add sanity check to HDMI chmap write, too

v2: https://lore.kernel.org/r/20240614153717.30143-1-tiwai@suse.de
v1: https://lore.kernel.org/r/20240614124728.27901-1-tiwai@suse.de

Takashi

===

Mark Brown (1):
  kselftest/alsa: Fix validation of writes to volatile controls

Takashi Iwai (5):
  ALSA: vmaster: Return error for invalid input values
  ALSA: hda: Return -EINVAL for invalid volume/switch inputs
  ALSA: control: Apply sanity check of input values for user elements
  ALSA: chmap: Mark Channel Map controls as volatile
  ALSA: hda: Add input value sanity checks to HDMI channel map controls

 sound/core/control.c                      |  6 ++-
 sound/core/pcm_lib.c                      |  1 +
 sound/core/vmaster.c                      |  8 ++++
 sound/hda/hdmi_chmap.c                    | 18 +++++++++
 sound/pci/hda/hda_codec.c                 | 23 +++++++++---
 tools/testing/selftests/alsa/mixer-test.c | 45 +++++++++++++++--------
 6 files changed, 79 insertions(+), 22 deletions(-)

-- 
2.43.0


             reply	other threads:[~2024-06-16  7:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-16  7:34 Takashi Iwai [this message]
2024-06-16  7:34 ` [PATCH v3 1/6] ALSA: vmaster: Return error for invalid input values Takashi Iwai
2024-06-16  7:34 ` [PATCH v3 2/6] ALSA: hda: Return -EINVAL for invalid volume/switch inputs Takashi Iwai
2024-06-16  7:34 ` [PATCH v3 3/6] ALSA: control: Apply sanity check of input values for user elements Takashi Iwai
2024-06-16  7:34 ` [PATCH v3 4/6] kselftest/alsa: Fix validation of writes to volatile controls Takashi Iwai
2024-06-16  7:34 ` [PATCH v3 5/6] ALSA: chmap: Mark Channel Map controls as volatile Takashi Iwai
2024-06-16  7:34 ` [PATCH v3 6/6] ALSA: hda: Add input value sanity checks to HDMI channel map controls Takashi Iwai

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=20240616073454.16512-1-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=broonie@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=o-takashi@sakamocchi.jp \
    --cc=perex@perex.cz \
    --cc=pmenzel@molgen.mpg.de \
    /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