[alsa-devel] [PATCH v2] ALSA: hda - Apply codec delay to wallclock.
tiwai at suse.de
Wed Apr 10 17:16:01 CEST 2013
At Wed, 10 Apr 2013 07:29:32 -0700,
Pierre-Louis Bossart wrote:
> >>> + 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?
> For playback audio_timestamp = wallclk - codec_delay_in_nsec
> for capture audio_timestamp = wallclk + codec_delay_in_nsec
Hmm... I'm confused, too. From a pretty generic view,
- hwptr = the samples (frames) transferred on the (memory) buffer
- hwptr + PCM delay = the point being currently captured
Which position does the wall clock correspond?
More information about the Alsa-devel