Re: [PATCH 1/4] ASoC: compress: Pass error out of soc_compr_pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 10, 2016 at 10:44:51AM +0000, Charles Keepax wrote:
> The soc_compr_pointer does not correctly pass any errors returned by the
> driver callback back up the stack. This patch corrects this issue.

Should we do that :) I am not too sure. Pointer query is supposed to read
the current value and return. You are trying to indicate that stream has
gone bad which is not the same as read faced an error...

Also please use cover letter for these things to describe problem you are
trying to solve.

> 
> Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
> ---
>  sound/soc/soc-compress.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
> index 875733c..d2df46c 100644
> --- a/sound/soc/soc-compress.c
> +++ b/sound/soc/soc-compress.c
> @@ -530,14 +530,15 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream,
>  {
>  	struct snd_soc_pcm_runtime *rtd = cstream->private_data;
>  	struct snd_soc_platform *platform = rtd->platform;
> +	int ret = 0;
>  
>  	mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
>  
>  	if (platform->driver->compr_ops && platform->driver->compr_ops->pointer)
> -		 platform->driver->compr_ops->pointer(cstream, tstamp);
> +		ret = platform->driver->compr_ops->pointer(cstream, tstamp);
>  
>  	mutex_unlock(&rtd->pcm_mutex);
> -	return 0;
> +	return ret;
>  }
>  
>  static int soc_compr_copy(struct snd_compr_stream *cstream,
> -- 
> 2.1.4
> 

-- 
~Vinod
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux