All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Cc: tiwai@suse.de, linux-kernel@vger.kernel.org,
	linux-sound@vger.kernel.org, perex@perex.cz, tiwai@suse.com
Subject: Re: [PATCH v2] ALSA: linear: Check frame count for all channels
Date: Fri, 06 Nov 2026 13:53:26 +0100	[thread overview]
Message-ID: <87qzgyp1dl.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261106123750.2981-1-sreekuttan2156239@gmail.com>

On Fri, 06 Nov 2026 13:37:50 +0100,
Sreeraj S Kurup wrote:
> 
> Hi Takashi,
> 
> Thanks for reviewing.
> 
> I added this check because I thought the available frame count could potentially 
> differ between channels, similar to how the alignment is checked separately for 
> each channel under CONFIG_SND_DEBUG.

Those alignment checks are with snd_BUG_ON(), so it'll give kernel
warning with stack trace, i.e. the code shouldn't be triggered.
I believe the checks are superfluous, but it's a sanity check for
debugging, after all.

> I understand that the ALSA plugin framework normally keeps the processed frame count 
> identical across all channels.
> 
> Is there any condition or exceptional case where the available frame count could differ 
> between channels? Or is it guaranteed to be identical by the plugin framework?

The frame count must be identical.  So, if any, such a check should be
conditionally enabled and trigger a kernel WARNING.  It means, if it
happens, something must be completely wrong.


thanks,

Takashi

> If it is guaranteed, I agree that this additional check is unnecessary.
> 
> Thanks for your guidance.
> 
> Best regards,
> Sreeraj

  reply	other threads:[~2026-11-06 12:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 14:22 [PATCH v2] ALSA: linear: Check frame count for all channels Sreeraj S Kurup
2026-11-05 15:08 ` Takashi Iwai
2026-11-06 12:37   ` Sreeraj S Kurup
2026-11-06 12:53     ` Takashi Iwai [this message]
2026-11-06 13:12       ` Sreeraj S Kurup

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=87qzgyp1dl.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=sreekuttan2156239@gmail.com \
    --cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.