From: Vinod Koul <vkoul@kernel.org>
To: Raghu Bankapur <quic_rbankapu@quicinc.com>
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
Takashi Iwai <tiwai@suse.com>,
Krishna Jha <quic_kkishorj@quicinc.com>
Subject: Re: [PATCH V1 1/1] ASoC: compress: propagate the error code from the compress framework
Date: Thu, 24 Feb 2022 15:25:09 +0530 [thread overview]
Message-ID: <YhdV/ZsxJ3J+3JK5@matsya> (raw)
In-Reply-To: <ec8263009612ead127398ba089f84dafb9fcfa88.1645689841.git.quic_rbankapu@quicinc.com>
On 24-02-22, 13:56, 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.
>
> Signed-off-by: Raghu Bankapur <quic_rbankapu@quicinc.com>
> ---
> sound/core/compress_offload.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
> index de514ec8c83d..b89adbf666b1 100644
> --- a/sound/core/compress_offload.c
> +++ b/sound/core/compress_offload.c
> @@ -166,9 +166,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;
why initialize here, also pls leave an empty line here
> 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
--
~Vinod
next prev parent reply other threads:[~2022-02-24 9:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-24 8:06 [PATCH V1 0/1] ASoC: compress: propagate the error code from the Raghu Bankapur
2022-02-24 8:06 ` [PATCH V1 1/1] ASoC: compress: propagate the error code from the compress framework Raghu Bankapur
2022-02-24 8:26 ` Raghu Bankapur
2022-02-24 9:55 ` Vinod Koul [this message]
2022-02-24 8:26 ` [PATCH V1 0/1] ASoC: compress: propagate the error code from the Raghu Bankapur
-- strict thread matches above, loose matches on Subject: below --
2022-02-23 12:52 [PATCH V1 0/1]ASoC: compress: propagate the error code from the compress framework Raghu Bankapur
2022-02-23 12:52 ` [PATCH V1 1/1] ASoC: " Raghu Bankapur
2022-02-23 19:46 ` kernel test robot
2022-02-23 19:56 ` kernel test robot
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=YhdV/ZsxJ3J+3JK5@matsya \
--to=vkoul@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_kkishorj@quicinc.com \
--cc=quic_rbankapu@quicinc.com \
--cc=tiwai@suse.com \
/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