diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2015-02-06 16:55:52 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-02-09 10:02:11 -0500 |
commit | ed610af86a717152be5aa5e29410c5183992b4f2 (patch) | |
tree | 7b0e4c8d3076d841acd28d4a450e85bcbc386286 /sound/pci/hda/hda_controller.c | |
parent | 2b79d7a6bf341ebeffb85fc2b3577d0cfa810c49 (diff) |
ALSA: hda: read trigger_timestamp immediately after starting DMA
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@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_controller.c')
-rw-r--r-- | sound/pci/hda/hda_controller.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c index 27dcb142f596..dfcb5e929f9f 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) | |||
657 | azx_writel(chip, SSYNC, azx_readl(chip, SSYNC) & ~sbits); | 657 | azx_writel(chip, SSYNC, azx_readl(chip, SSYNC) & ~sbits); |
658 | if (start) { | 658 | if (start) { |
659 | azx_timecounter_init(substream, 0, 0); | 659 | azx_timecounter_init(substream, 0, 0); |
660 | snd_pcm_gettime(substream->runtime, &substream->runtime->trigger_tstamp); | ||
661 | substream->runtime->trigger_tstamp_latched = true; | ||
662 | |||
660 | if (nsync > 1) { | 663 | if (nsync > 1) { |
661 | cycle_t cycle_last; | 664 | cycle_t cycle_last; |
662 | 665 | ||