Re: [PATCH] ALSA: pcmtest: Reject invalid fill_mode values
From: Takashi Iwai
Date: Mon Oct 26 2026 - 04:11:28 EST
On Mon, 26 Oct 2026 04:16:55 +0100,
HyeongJun An wrote:
>
> The fill_block() function handles only fill_mode 0 (random) and 1
> (pattern). With any other value it writes nothing and does not move the
> buffer position. A capture stream then gets no data, and a read fails
> with -EIO after the timeout. Nothing in the kernel log says why.
>
> Check the value in a set callback, so a bad value is rejected both when
> the module is loaded and when the parameter is written.
>
> Fixes: 315a3d57c64c ("ALSA: Implement the new Virtual PCM Test Driver")
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: HyeongJun An <sammiee5311@xxxxxxxxx>
Applied now. Thanks.
Takashi