Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Cc: pierre-louis.bossart@linux.jf.intel.com,
	alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
	ckeepax@opensource.wolfsonmicro.com,
	vinod.koul@linux.jf.intel.com
Subject: Re: [TINYCOMPRESS][PATCH 1/1] compress: fix hpointer error when no	sample rate
Date: Thu, 23 May 2013 07:58:37 +0530	[thread overview]
Message-ID: <20130523022837.GU14863@intel.com> (raw)
In-Reply-To: <20130502135853.GA2744@opensource.wolfsonmicro.com>

On Thu, May 02, 2013 at 02:58:53PM +0100, Richard Fitzgerald wrote:
> Fixes the oops() in compress_get_hpointer() to return
> -ENODATA instead of errno if the sample rate is zero.
> The value in errno here is not related to the reason
> we are returning an error.
> 
> Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Applied thanks

--
~Vinod
> ---
>  compress.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/compress.c b/compress.c
> index e80e598..abd0799 100644
> --- a/compress.c
> +++ b/compress.c
> @@ -315,7 +315,7 @@ int compress_get_hpointer(struct compress *compress,
>  	if (ioctl(compress->fd, SNDRV_COMPRESS_AVAIL, &kavail))
>  		return oops(compress, errno, "cannot get avail");
>  	if (0 == kavail.tstamp.sampling_rate)
> -		return oops(compress, errno, "invalid paramter");
> +		return oops(compress, -ENODATA, "sample rate unknown");
>  	*avail = (unsigned int)kavail.avail;
>  	time = kavail.tstamp.pcm_io_frames / kavail.tstamp.sampling_rate;
>  	tstamp->tv_sec = time;
> -- 
> 1.7.2.5
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

      reply	other threads:[~2013-05-23  3:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02 13:58 [TINYCOMPRESS][PATCH 1/1] compress: fix hpointer error when no sample rate Richard Fitzgerald
2013-05-23  2:28 ` Vinod Koul [this message]

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=20130523022837.GU14863@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=pierre-louis.bossart@linux.jf.intel.com \
    --cc=rf@opensource.wolfsonmicro.com \
    --cc=vinod.koul@linux.jf.intel.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