From: Takashi Iwai <tiwai@suse.de>
To: linux-sound@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/5] ALSA: line6: Fix handling of zero-length capture packets
Date: Sat, 10 Oct 2026 10:04:33 +0200 [thread overview]
Message-ID: <87ld86j81a.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261009133341.440917-2-tiwai@suse.de>
On Fri, 09 Oct 2026 15:33:35 +0200,
Takashi Iwai wrote:
>
> The LINE6 playback engine assumes that line6pcm->prev_fsize=0
> indicates that there was no input packet to be processed, and
> synthesizes the frames. But, when a capture stream receives a
> zero-length (or a very small size) packet, it sets 0 to prev_fsize,
> while playback engine still believes it's for synthesis, hence it
> tries to copy the larger data than the actual input data.
>
> As prev_fsize=0 can't be a good indication for "no input", change the
> meaning slightly: now prev_fsize=-1 means no input, while prev_fsize=0
> means it's a zero-length packet.
>
> As a result, the outgoing packet length can be also zero, so the
> corresponding check is dropped, too; otherwise the outgoing URB will
> be lost.
>
> Fixes: 1027f476f507 ("staging: line6: sync with upstream")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> v1->v2: drop the zero urb length check code, too
Hm, still this one looks tricky and can't cover the full cases, as it
seems. So I dropped this from the series for reconsideration for now.
Takashi
next prev parent reply other threads:[~2026-10-10 8:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 13:33 [PATCH v2 0/5] ALSA: yet a few more fixes for AI bug reports Takashi Iwai
2026-10-09 13:33 ` [PATCH v2 1/5] ALSA: line6: Fix handling of zero-length capture packets Takashi Iwai
2026-10-10 8:04 ` Takashi Iwai [this message]
2026-10-09 13:33 ` [PATCH v2 2/5] ALSA: hda: Disable unsol event handling at error and shutdown paths Takashi Iwai
2026-10-09 13:33 ` [PATCH v2 3/5] ALSA: hda: Add lock around codec->registered flag manipulations Takashi Iwai
2026-10-09 13:33 ` [PATCH v2 4/5] ALSA: hda: Stop unsol event and jack polling at hda-ext device removal, too Takashi Iwai
2026-10-09 13:33 ` [PATCH v2 5/5] ALSA: hda: Add NULL check for the driver pointer at unsol event work 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=87ld86j81a.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
/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®