From: Takashi Iwai <tiwai@suse.de>
To: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Cc: perex@perex.cz, tiwai@suse.com, rosen@gmail.com,
cezary.rojewski@intel.com, tim.bird@sony.com,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: pcm: Fix source frame count calculation
Date: Mon, 02 Nov 2026 15:31:55 +0100 [thread overview]
Message-ID: <87wlqv8ftw.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261102141647.3133-1-sreekuttan2156239@gmail.com>
On Mon, 02 Nov 2026 15:16:47 +0100,
Sreeraj S Kurup wrote:
>
> Pass the updated frame count to the "src_frames()" callback.
>
> When the next plugin handles fewer frames than requested, use the
> actual frame count instead of the original requested count.
>
> This ensures the correct number of source frames is calculated.
>
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
> ---
> sound/core/oss/pcm_plugin.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
> index acf5ca663ba8..3de713779993 100644
> --- a/sound/core/oss/pcm_plugin.c
> +++ b/sound/core/oss/pcm_plugin.c
> @@ -604,7 +604,7 @@ snd_pcm_sframes_t snd_pcm_plug_write_transfer(struct snd_pcm_substream *plug, st
> if (err != frames1) {
> frames = err;
> if (plugin->src_frames) {
> - frames = plugin->src_frames(plugin, frames1);
> + frames = plugin->src_frames(plugin, err);
Hm, do you really see actually hitting this code path?
As far as I see, the all client_channels() callbacks return the frame
back as given, so the condition (err != frames1) would be always
false.
Takashi
next prev parent reply other threads:[~2026-11-02 14:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 14:16 Sreeraj S Kurup
2026-11-02 14:31 ` Takashi Iwai [this message]
2026-11-02 14:47 ` Sreeraj S Kurup
2026-11-02 15:04 ` Takashi Iwai
2026-11-02 15:40 ` Sreeraj S Kurup
2026-11-03 12:52 ` Sreeraj S Kurup
2026-11-02 14:34 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=87wlqv8ftw.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=cezary.rojewski@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=rosen@gmail.com \
--cc=sreekuttan2156239@gmail.com \
--cc=tim.bird@sony.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 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®