All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Takashi Iwai <tiwai@suse.de>,
	Vinod Koul <vinod.koul@linux.intel.com>,
	Richard Fitzgerald <rf@opensource.wolfsonmicro.com>,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH] ALSA: core: don't return uninitialized snd_compr_tstamp
Date: Mon, 04 Feb 2013 08:23:14 -0600	[thread overview]
Message-ID: <510FC452.1070906@linux.intel.com> (raw)
In-Reply-To: <1359599832-6210-1-git-send-email-broonie@opensource.wolfsonmicro.com>


> The snd_compr_update_tstamp() can only fill in the snd_compr_tstamp
> if the codec implements the pointer() function. If that happened
> the code was previously returning uninitialized garbage in the
> tstamp because it wasn't initialized anywhere.
>
> This change zero-fills the tstamp in the two places it is used
> before calling snd_compr_update_tstamp(), and also has
> snd_compr_update_tstamp() return an error indication if it
> can't provide a tstamp. For the case of snd_compr_calc_avail()
> it ignores this error because we still need to return info on
> the available buffer space even if we can't provide tstamp
> info - when the tstamp is not valid all fields are now
> guaranteed to be zero.

I think I am missing something here. For compressed data, the DSP really 
needs to return a timestamp or the application will not be able to track 
the audio time, it'll only be able to refill buffers. Since with 
variable-rate compression we cannot translate bytes to time, isn't it a 
requirement that timestamps be supported for this API? If you don't 
support the .pointer, how will you provide this information to 
user-space levels?
Thanks,
-Pierre

  parent reply	other threads:[~2013-02-04 14:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31  2:37 [PATCH] ALSA: core: don't return uninitialized snd_compr_tstamp Mark Brown
2013-01-31  2:53 ` Vinod Koul
2013-02-04 14:23 ` Pierre-Louis Bossart [this message]
2013-02-04 14:43   ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2013-02-11 13:44 Mark Brown
2013-02-11 14:05 ` Takashi Iwai

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=510FC452.1070906@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=rf@opensource.wolfsonmicro.com \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@linux.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 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.