[alsa-devel] [PATCH v2] ALSA: hda - Apply codec delay to wallclock.

Dylan Reid dgreid at chromium.org
Wed Apr 10 07:30:31 CEST 2013


On Tue, Apr 9, 2013 at 8:55 PM, Pierre-Louis Bossart
<pierre-louis.bossart at linux.intel.com> wrote:
> On 4/8/13 6:20 PM, Dylan Reid wrote:
>>
>> For playback add the codec-side delay to the timestamp, for capture
>> subtract it.  This brings the timestamps in line with the time that
>> was recently added to the delay reporting.
>>
>> Signed-off-by: Dylan Reid <dgreid at chromium.org>
>> ---
>> Changes since v1:
>> Calculate nsec from frames, subtract delay for playback as well as
>> capture.
>
>
>> +       return (nsec > codec_nsecs) ? nsec - codec_nsecs : 0;
>
>
> Is this correct? I would think for capture you need to add the delay, and
> subtract it for playback?

Should the capture timestamp represents the wall time when the sample
is converted by the A-to-D?  If so, would be the correct time be the
codec delay nsec before what is reported here?

> -Pierre
>


More information about the Alsa-devel mailing list