[alsa-devel] [PATCH v4 03/10] ALSA: hda: read trigger_timestamp immediately after starting DMA
Takashi Iwai
tiwai at suse.de
Mon Feb 2 11:49:17 CET 2015
At Fri, 30 Jan 2015 17:55:56 -0600,
Pierre-Louis Bossart wrote:
>
> Make sure wallclock counter and trigger timestamp are read very
> close to each other for better alignment.
>
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
> ---
> sound/pci/hda/hda_controller.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
> index 0cfc9c8..271f86e 100644
> --- a/sound/pci/hda/hda_controller.c
> +++ b/sound/pci/hda/hda_controller.c
> @@ -657,6 +657,9 @@ static int azx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
> azx_writel(chip, SSYNC, azx_readl(chip, SSYNC) & ~sbits);
> if (start) {
> azx_timecounter_init(substream, 0, 0);
> + snd_pcm_gettime(substream->runtime, &substream->runtime->trigger_tstamp);
> + substream->runtime->trigger_tstamp_latched = 1;
Better to use "true" for boolean.
Takashi
More information about the Alsa-devel
mailing list