All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/1] ASoC: compress: propagate the error code from the
@ 2022-02-24 12:18 Raghu Bankapur
  2022-02-24 12:18 ` [PATCH V2 1/1] ASoC: compress: propagate the error code from the compress framework Raghu Bankapur
  0 siblings, 1 reply; 4+ messages in thread
From: Raghu Bankapur @ 2022-02-24 12:18 UTC (permalink / raw)
  To: Vinod Koul, Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel
  Cc: Krishna Jha, Raghu Bankapur

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.

This propgated error is used by direct client like Audio HAL through
IOCTL -SNDRV_COMPRESS_TSTAMP response, further this response is sent
to upper layer, based on this error audio related usecases related 
to render position and presentation are handled.

Changes since v1:
- Remove initialization for ret, since it is updated by pointer function
- Added new line after ret declaration

Raghu Bankapur (1):
  ASoC: compress: propagate the error code from the compress framework

 sound/core/compress_offload.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH V2 1/1] ASoC: compress: propagate the error code from the compress framework
  2022-02-24 12:18 [PATCH V2 0/1] ASoC: compress: propagate the error code from the Raghu Bankapur
@ 2022-02-24 12:18 ` Raghu Bankapur
  2022-02-24 13:37     ` Vinod Koul
  0 siblings, 1 reply; 4+ messages in thread
From: Raghu Bankapur @ 2022-02-24 12:18 UTC (permalink / raw)
  To: Vinod Koul, Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel
  Cc: Krishna Jha, Raghu Bankapur

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@quicinc.com>
---
 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 de514ec8c83d..1882b2de1a5a 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -166,9 +166,13 @@ 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;
+
 	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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 1/1] ASoC: compress: propagate the error code from the compress framework
  2022-02-24 12:18 ` [PATCH V2 1/1] ASoC: compress: propagate the error code from the compress framework Raghu Bankapur
@ 2022-02-24 13:37     ` Vinod Koul
  0 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2022-02-24 13:37 UTC (permalink / raw)
  To: Raghu Bankapur
  Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel, Krishna Jha

On 24-02-22, 17:48, Raghu Bankapur wrote:
> 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.


Acked-By: Vinod Koul <vkoul@kernel.org>


-- 
~Vinod

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 1/1] ASoC: compress: propagate the error code from the compress framework
@ 2022-02-24 13:37     ` Vinod Koul
  0 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2022-02-24 13:37 UTC (permalink / raw)
  To: Raghu Bankapur; +Cc: linux-kernel, alsa-devel, Takashi Iwai, Krishna Jha

On 24-02-22, 17:48, Raghu Bankapur wrote:
> 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.


Acked-By: Vinod Koul <vkoul@kernel.org>


-- 
~Vinod

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-24 13:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24 12:18 [PATCH V2 0/1] ASoC: compress: propagate the error code from the Raghu Bankapur
2022-02-24 12:18 ` [PATCH V2 1/1] ASoC: compress: propagate the error code from the compress framework Raghu Bankapur
2022-02-24 13:37   ` Vinod Koul
2022-02-24 13:37     ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.