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.orgmaster
parent
cf6c18cf83
commit
61327f3d81
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue