Re: [PATCH v2 3/4] ALSA: timer: Introduce virtual userspace-driven timers

2024-07-29 Thread Takashi Iwai
On Mon, 29 Jul 2024 10:59:04 +0200, Ivan Orlov wrote: > --- a/include/uapi/sound/asound.h > +++ b/include/uapi/sound/asound.h (snip) > +/* > + * This structure describes the userspace-driven timer. Such timers are > purely virtual, > + * and can only be triggered from software (for instance, by

Re: [PATCH v2 0/2] kselftest/alsa: Diagnostic improvements

2024-07-18 Thread Takashi Iwai
On Tue, 16 Jul 2024 16:47:58 +0200, Mark Brown wrote: > > The first patch fixes unstable naming of tests due to probe ordering not > being stable, the second just provides a bit more information. > > Signed-off-by: Mark Brown > --- > Changes in v2: > - Switch to using ID rather than longame. >

Re: [PATCH] kselftest/alsa: Use card name rather than number in test names

2024-07-15 Thread Takashi Iwai
On Mon, 15 Jul 2024 15:18:44 +0200, Mark Brown wrote: > > On Sat, Jul 13, 2024 at 08:46:43AM +0200, Takashi Iwai wrote: > > Mark Brown wrote: > > > OTOH, if the former is the problem, using longname won't help, > > either, rather it can be confusing. I noticed that th

Re: [PATCH] kselftest/alsa: Use card name rather than number in test names

2024-07-13 Thread Takashi Iwai
On Fri, 12 Jul 2024 20:19:33 +0200, Mark Brown wrote: > > On Fri, Jul 12, 2024 at 06:25:21PM +0200, Jaroslav Kysela wrote: > > On 12. 07. 24 15:00, Mark Brown wrote: > > > > The trouble with the ID field is that it's too short and seems likely to > > > create collisions, for example HDA stuff

Re: [PATCH] kselftest/alsa: Use card name rather than number in test names

2024-07-12 Thread Takashi Iwai
On Thu, 11 Jul 2024 18:19:25 +0200, Mark Brown wrote: > > On Thu, Jul 11, 2024 at 06:08:38PM +0200, Jaroslav Kysela wrote: > > On 11. 07. 24 16:33, Mark Brown wrote: > > > > Address this by replacing our use of card numbers with card names which > > > are > > > more likely to be stable across

Re: [PATCH] selftests/alsa:Fix printf format string in pcm-test.c

2024-06-27 Thread Takashi Iwai
On Wed, 26 Jun 2024 10:48:59 +0200, Zhu Jun wrote: > > Inside of test_pcm_time() arguments are printed via printf > but '%d' is used to print @flags (of type unsigned int). > Use '%u' instead, just like we do everywhere else. > > Signed-off-by: Zhu Jun Applied now to for-next branch. Thanks.

[PATCH v3 6/6] ALSA: hda: Add input value sanity checks to HDMI channel map controls

2024-06-16 Thread Takashi Iwai
Add a simple sanity check to HD-audio HDMI Channel Map controls. Although the value might not be accepted for the actual connection, we can filter out some bogus values beforehand, and that should be enough for making kselftest happier. Reviewed-by: Jaroslav Kysela Signed-off-by: Takashi Iwai

[PATCH v3 3/6] ALSA: control: Apply sanity check of input values for user elements

2024-06-16 Thread Takashi Iwai
-by: Jaroslav Kysela Reviewed-by: Mark Brown Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- sound/core/control.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/core/control.c b/sound/core/control.c index fb0c60044f7b..1dd2337e2930 100644 --- a/sound/core

[PATCH v3 0/6] ALSA: some driver fixes for control input validations

2024-06-16 Thread Takashi Iwai
write, too v2: https://lore.kernel.org/r/20240614153717.30143-1-ti...@suse.de v1: https://lore.kernel.org/r/20240614124728.27901-1-ti...@suse.de Takashi === Mark Brown (1): kselftest/alsa: Fix validation of writes to volatile controls Takashi Iwai (5): ALSA: vmaster: Return error for invalid

[PATCH v3 5/6] ALSA: chmap: Mark Channel Map controls as volatile

2024-06-16 Thread Takashi Iwai
lav Kysela Signed-off-by: Takashi Iwai --- sound/core/pcm_lib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 6f73b3c2c205..071c67cbc479 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -2556,6 +2556,7 @@ int snd_pcm_add_chmap_c

[PATCH v3 4/6] kselftest/alsa: Fix validation of writes to volatile controls

2024-06-16 Thread Takashi Iwai
the check for volatile controls that we currently do for events to a separate block and just verifying that whatever value we read is valid for the control. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20240614-alsa-selftest-volatile-v1-1-3874f0296...@kernel.org Signed-off-by: Takashi Iwai

[PATCH v3 2/6] ALSA: hda: Return -EINVAL for invalid volume/switch inputs

2024-06-16 Thread Takashi Iwai
values instead. Reported-by: Paul Menzel Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09...@molgen.mpg.de Reviewed-by: Jaroslav Kysela Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_codec.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff

[PATCH v3 1/6] ALSA: vmaster: Return error for invalid input values

2024-06-16 Thread Takashi Iwai
Menzel Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09...@molgen.mpg.de Reviewed-by: Jaroslav Kysela Signed-off-by: Takashi Iwai --- sound/core/vmaster.c | 8 1 file changed, 8 insertions(+) diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c index 04a57f7be6ea

Re: [PATCH] kselftest/alsa: Fix validation of writes to volatile controls

2024-06-16 Thread Takashi Iwai
On Fri, 14 Jun 2024 18:40:37 +0200, Mark Brown wrote: > > When validating writes to controls we check that whatever value we wrote > actually appears in the control. For volatile controls we cannot assume > that this will be the case, the value may be changed at any time > including between our

Re: [PATCH v2 3/6] ALSA: control: Apply sanity check of input values for user elements

2024-06-15 Thread Takashi Iwai
On Sat, 15 Jun 2024 10:30:10 +0200, Takashi Iwai wrote: > > On Sat, 15 Jun 2024 10:02:35 +0200, > Takashi Sakamoto wrote: > > > > On Sat, Jun 15, 2024 at 09:28:50AM +0200, Takashi Iwai wrote: > > > > In the commit coment, I can see "that's the only way to

Re: [PATCH v2 3/6] ALSA: control: Apply sanity check of input values for user elements

2024-06-15 Thread Takashi Iwai
On Sat, 15 Jun 2024 10:02:35 +0200, Takashi Sakamoto wrote: > > On Sat, Jun 15, 2024 at 09:28:50AM +0200, Takashi Iwai wrote: > > > In the commit coment, I can see "that's the only way to filter out the > > > invalid values", however it not so good idea, since th

Re: [PATCH v2 3/6] ALSA: control: Apply sanity check of input values for user elements

2024-06-15 Thread Takashi Iwai
On Sat, 15 Jun 2024 07:13:29 +0200, Takashi Sakamoto wrote: > > Hi, > > On Fri, Jun 14, 2024 at 05:37:12PM +0200, Takashi Iwai wrote: > > Although we have already a mechanism for sanity checks of input values > > for control writes, it's not ap

Re: [PATCH v2 4/6] kselftest/alsa: mixer-test: Skip write verification for volatile controls

2024-06-14 Thread Takashi Iwai
On Fri, 14 Jun 2024 17:57:37 +0200, Mark Brown wrote: > > On Fri, Jun 14, 2024 at 05:37:13PM +0200, Takashi Iwai wrote: > > > @@ -616,6 +616,10 @@ static int write_and_verify(struct ctl_data *ctl, > > if (!snd_ctl_elem_info_is_readable(ctl->info)) &g

[PATCH v2 5/6] ALSA: chmap: Mark Channel Map controls as volatile

2024-06-14 Thread Takashi Iwai
lav Kysela Signed-off-by: Takashi Iwai --- sound/core/pcm_lib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 6f73b3c2c205..071c67cbc479 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -2556,6 +2556,7 @@ int snd_pcm_add_chmap_c

[PATCH v2 4/6] kselftest/alsa: mixer-test: Skip write verification for volatile controls

2024-06-14 Thread Takashi Iwai
: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09...@molgen.mpg.de Signed-off-by: Takashi Iwai --- tools/testing/selftests/alsa/mixer-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/alsa/mixer-test.c b/tools/testing/selftests/alsa/mixer-test.c

[PATCH v2 2/6] ALSA: hda: Return -EINVAL for invalid volume/switch inputs

2024-06-14 Thread Takashi Iwai
values instead. Reported-by: Paul Menzel Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09...@molgen.mpg.de Reviewed-by: Jaroslav Kysela Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_codec.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff

[PATCH v2 6/6] ALSA: hda: Add input value sanity checks to HDMI channel map controls

2024-06-14 Thread Takashi Iwai
Add a simple sanity check to HD-audio HDMI Channel Map controls. Although the value might not be accepted for the actual connection, we can filter out some bogus values beforehand, and that should be enough for making kselftest happier. Signed-off-by: Takashi Iwai --- sound/hda/hdmi_chmap.c

[PATCH v2 3/6] ALSA: control: Apply sanity check of input values for user elements

2024-06-14 Thread Takashi Iwai
-5ae2a4f09...@molgen.mpg.de Reviewed-by: Jaroslav Kysela Reviewed-by: Mark Brown Signed-off-by: Takashi Iwai --- sound/core/control.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/core/control.c b/sound/core/control.c index fb0c60044f7b..50890983d7e2 100644 --- a/sound/core

[PATCH v2 0/6] ALSA: some driver fixes for control input validations

2024-06-14 Thread Takashi Iwai
for volatile controls, too. It's for the channel map controls that can't hold the stable values. v1->v2: * Skip only verification after write in kselftest * Add sanity check to HDMI chmap write, too Takashi === Takashi Iwai (6): ALSA: vmaster: Return error for invalid input values ALSA: hda: Ret

[PATCH v2 1/6] ALSA: vmaster: Return error for invalid input values

2024-06-14 Thread Takashi Iwai
Menzel Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09...@molgen.mpg.de Reviewed-by: Jaroslav Kysela Signed-off-by: Takashi Iwai --- sound/core/vmaster.c | 8 1 file changed, 8 insertions(+) diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c index 04a57f7be6ea

Re: [PATCH 4/5] kselftest/alsa: mixer-test: Skip write tests for volatile controls

2024-06-14 Thread Takashi Iwai
On Fri, 14 Jun 2024 16:29:03 +0200, Mark Brown wrote: > > On Fri, Jun 14, 2024 at 02:47:26PM +0200, Takashi Iwai wrote: > > > The control elements with volatile flag don't guarantee that the > > written values are actually saved for the next reads, hence they > > aren'

[PATCH 4/5] kselftest/alsa: mixer-test: Skip write tests for volatile controls

2024-06-14 Thread Takashi Iwai
://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09...@molgen.mpg.de Signed-off-by: Takashi Iwai --- tools/testing/selftests/alsa/mixer-test.c | 21 + 1 file changed, 21 insertions(+) diff --git a/tools/testing/selftests/alsa/mixer-test.c b/tools/testing/selftests/alsa/mixer

[PATCH 3/5] ALSA: control: Apply sanity check of input values for user elements

2024-06-14 Thread Takashi Iwai
-5ae2a4f09...@molgen.mpg.de Signed-off-by: Takashi Iwai --- sound/core/control.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/core/control.c b/sound/core/control.c index fb0c60044f7b..50890983d7e2 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -1317,7 +1317,8

[PATCH 1/5] ALSA: vmaster: Return error for invalid input values

2024-06-14 Thread Takashi Iwai
Menzel Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09...@molgen.mpg.de Signed-off-by: Takashi Iwai --- sound/core/vmaster.c | 8 1 file changed, 8 insertions(+) diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c index 04a57f7be6ea..c657659b236c 100644 --- a/sound

[PATCH 0/5] ALSA: some driver fixes for control input validations

2024-06-14 Thread Takashi Iwai
for the channel map controls that can't hold the stable values. Takashi === 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 kselftest/alsa

[PATCH 5/5] ALSA: chmap: Mark Channel Map controls as volatile

2024-06-14 Thread Takashi Iwai
, but this would bring other side effects, such as "alsactl restore" would start receiving unexpected errors. So we still keep returning 0 for those invalid inputs. Reported-by: Paul Menzel Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09...@molgen.mpg.de Signed-off-by: Ta

[PATCH 2/5] ALSA: hda: Return -EINVAL for invalid volume/switch inputs

2024-06-14 Thread Takashi Iwai
values instead. Reported-by: Paul Menzel Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09...@molgen.mpg.de Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_codec.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/sound/pci/hda

Re: testing/selftests/alsa/mixer-test: 10 failures on Dell XPS 13 9360

2024-06-14 Thread Takashi Iwai
On Fri, 14 Jun 2024 13:42:05 +0200, Jaroslav Kysela wrote: > > On 14. 06. 24 13:33, Takashi Iwai wrote: > > On Mon, 03 Jun 2024 13:38:18 +0200, > > Mark Brown wrote: > >> > >> On Fri, May 31, 2024 at 08:06:14PM +0200, Takashi Iwai wrote: > >>> Mar

Re: testing/selftests/alsa/mixer-test: 10 failures on Dell XPS 13 9360

2024-06-14 Thread Takashi Iwai
On Mon, 03 Jun 2024 13:38:18 +0200, Mark Brown wrote: > > On Fri, May 31, 2024 at 08:06:14PM +0200, Takashi Iwai wrote: > > Mark Brown wrote: > > > On Fri, May 31, 2024 at 05:17:43PM +0200, Takashi Iwai wrote: > > > > On Fri, 31 May 2024 07:50:33 +0200, >

Re: testing/selftests/alsa/mixer-test: 10 failures on Dell XPS 13 9360

2024-05-31 Thread Takashi Iwai
On Fri, 31 May 2024 18:03:52 +0200, Mark Brown wrote: > > On Fri, May 31, 2024 at 05:17:43PM +0200, Takashi Iwai wrote: > > On Fri, 31 May 2024 07:50:33 +0200, > > > > not ok 5 write_invalid.0.40 > > > not ok 201 write_invalid.0.12 > > > not

Re: testing/selftests/alsa/mixer-test: 10 failures on Dell XPS 13 9360

2024-05-31 Thread Takashi Iwai
On Fri, 31 May 2024 07:50:33 +0200, Paul Menzel wrote: > > Dear Linux folks, > > > Running the ALSA kselftests with Linux 6.10-rc1, `mixer-test` shows > ten failures: > > # Totals: pass:24 fail:0 xfail:0 xpass:0 skip:11 error:0 > > These are: > > not ok 5 write_invalid.0.40 > not

Re: [PATCH] kselftest/alsa: Ensure _GNU_SOURCE is defined

2024-05-17 Thread Takashi Iwai
n the tree (Shuah's?) that introduced this change. So feel free to take my ack: Acked-by: Takashi Iwai thanks, Takashi > --- > tools/testing/selftests/alsa/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/alsa/Makefil

Re: [PATCH v2] selftests/alsa: missing a return value in unused dump_config_tree()

2024-05-06 Thread Takashi Iwai
On Mon, 06 May 2024 09:27:38 +0200, Jaroslav Kysela wrote: > > On 06. 05. 24 9:19, Takashi Iwai wrote: > > On Sun, 05 May 2024 23:08:24 +0200, > > John Hubbard wrote: > >> > >> dump_config_tree() is declared to return an int, but the compiler cannot > &g

Re: [PATCH v2] selftests/alsa: missing a return value in unused dump_config_tree()

2024-05-06 Thread Takashi Iwai
On Sun, 05 May 2024 23:08:24 +0200, John Hubbard wrote: > > dump_config_tree() is declared to return an int, but the compiler cannot > prove that it always returns any value at all. This leads to a clang > warning, when building via: > > make LLVM=1 -C tools/testing/selftests > >

Re: [PATCH v2 0/4] kselftest: alsa: Fix a couple of format specifiers and function parameters

2024-01-09 Thread Takashi Iwai
On Sun, 07 Jan 2024 18:37:00 +0100, Mirsad Todorovac wrote: > > Minor fixes of compiler warnings and one bug in the number of parameters which > would not crash the test but it is better fixed for correctness sake. > > As the general climate in the Linux kernel community is to fix all compiler >

Re: [PATCH] kselftest: alsa: fixed a print formatting warning

2023-12-18 Thread Takashi Iwai
On Sun, 17 Dec 2023 09:00:19 +0100, Ghanshyam Agrawal wrote: > > A statement used %d print formatter where %s should have > been used. The same has been fixed in this commit. > > Signed-off-by: Ghanshyam Agrawal Thanks, applied now. Takashi

Re: [PATCH] kselftest/alsa: pcm-test: Report cards declared in config but missing

2023-09-20 Thread Takashi Iwai
On Tue, 19 Sep 2023 17:26:21 +0200, NĂ­colas F. R. A. Prado wrote: > > When parsing the configs, keep track of card configurations that match > the current system but haven't matched any card, and report those as > test failures as they represent that a card which was expected to be > present on