From: Mark Brown <broonie@kernel.org>
To: Vinod Koul <vkoul@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>
Cc: "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
"Mark Brown" <broonie@kernel.org>
Subject: [PATCH 2/2] ALSA: compress: Pay attention if drivers error out retrieving pointers
Date: Wed, 01 Apr 2026 17:57:35 +0100 [thread overview]
Message-ID: <20260401-alsa-unconfigured-tstamp-v1-2-694c2cb5f71d@kernel.org> (raw)
In-Reply-To: <20260401-alsa-unconfigured-tstamp-v1-0-694c2cb5f71d@kernel.org>
Currently we have a return code on the driver pointer operation but the
core ignores that. Let's start paying attention.
Reported-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/core/compress_offload.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 67b3b1a3b526..c91547451311 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -190,6 +190,8 @@ snd_compr_tstamp32_from_64(struct snd_compr_tstamp *tstamp32,
static int snd_compr_update_tstamp(struct snd_compr_stream *stream,
struct snd_compr_tstamp64 *tstamp)
{
+ int ret;
+
if (!stream->ops->pointer)
return -ENOTSUPP;
@@ -200,7 +202,9 @@ static int snd_compr_update_tstamp(struct snd_compr_stream *stream,
break;
}
- stream->ops->pointer(stream, tstamp);
+ ret = stream->ops->pointer(stream, tstamp);
+ if (ret != 0)
+ return ret;
pr_debug("dsp consumed till %u total %llu bytes\n", tstamp->byte_offset,
tstamp->copied_total);
if (stream->direction == SND_COMPRESS_PLAYBACK)
--
2.47.3
next prev parent reply other threads:[~2026-04-01 16:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 16:57 [PATCH 0/2] ALSA: compress: Robustness improvements in pointer() handling Mark Brown
2026-04-01 16:57 ` [PATCH 1/2] ALSA: compress: Refuse to update timestamps for unconfigured streams Mark Brown
2026-04-01 16:57 ` Mark Brown [this message]
2026-04-02 3:35 ` [PATCH 0/2] ALSA: compress: Robustness improvements in pointer() handling Vinod Koul
2026-04-02 9:15 ` 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=20260401-alsa-unconfigured-tstamp-v1-2-694c2cb5f71d@kernel.org \
--to=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=tiwai@suse.com \
--cc=vkoul@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®