ALSA: compress: Pay attention if drivers error out retrieving pointers

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>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260401-alsa-unconfigured-tstamp-v1-2-694c2cb5f71d@kernel.org
master
Mark Brown 2026-04-01 17:57:35 +01:00 committed by Takashi Iwai
parent cf6c18cf83
commit 61327f3d81
1 changed files with 5 additions and 1 deletions

View File

@ -183,6 +183,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;
@ -193,7 +195,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)