[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eda8b6cdd53576c5487422e46af20bae1a5c864f.1645618332.git.quic_rbankapu@quicinc.com>
Date: Wed, 23 Feb 2022 18:22:50 +0530
From: Raghu Bankapur <quic_rbankapu@...cinc.com>
To: Jaroslav Kysela <perex@...ex.cz>, <linux-kernel@...r.kernel.org>,
"Takashi Iwai" <tiwai@...e.com>, <alsa-devel@...a-project.org>
CC: Krishna Jha <kkishorj@...eaurora.org>,
Raghu Bankapur <quic_rbankapu@...cinc.com>
Subject: [PATCH V1 1/1] ASoC: compress: propagate the error code from the compress framework
Propagate the error code from the compress framework for the timestamp
query. This error code will be used by the client to handle the
error case scenarios gracefully.
Signed-off-by: Raghu Bankapur <quic_rbankapu@...cinc.com>
---
sound/core/compress_offload.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index de514ec8c83d..48aa87d08bdc 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -31,7 +31,11 @@
#include <sound/info.h>
#include <sound/compress_params.h>
#include <sound/compress_offload.h>
-#include <sound/compress_driver.h>
+#include <sound/compress_driver.h>ASoC: compress: propagate the error code from the compress framework
+
+Propagate the error code from the compress framework for the timestamp
+query. This error code will be used by the client to handle the
+error case scenarios gracefully.
/* struct snd_compr_codec_caps overflows the ioctl bit size for some
* architectures, so we need to disable the relevant ioctls.
@@ -166,9 +170,12 @@ static int snd_compr_free(struct inode *inode, struct file *f)
static int snd_compr_update_tstamp(struct snd_compr_stream *stream,
struct snd_compr_tstamp *tstamp)
{
+ int ret = 0;
if (!stream->ops->pointer)
return -ENOTSUPP;
- stream->ops->pointer(stream, tstamp);
+ ret = stream->ops->pointer(stream, tstamp);
+ if (ret)
+ return ret;
pr_debug("dsp consumed till %d total %d bytes\n",
tstamp->byte_offset, tstamp->copied_total);
if (stream->direction == SND_COMPRESS_PLAYBACK)
--
2.17.1
Powered by blists - more mailing lists