Skip to content

Commit 6a0a5c5

Browse files
committed
ASoC: Intel Skylake: correct snd_hdac_stream_timecounter_init() calls
The change is straight. Mentioned function must be always called in trigger with the start argument to do proper timestamping. JIRA: https://issues.redhat.com/browse/RHEL-60915 Upstream status: RHEL-only Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
1 parent cacf264 commit 6a0a5c5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sound/soc/intel/skylake/skl-pcm.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,10 @@ static int skl_decoupled_trigger(struct snd_pcm_substream *substream,
446446

447447
if (start) {
448448
snd_hdac_stream_start(hdac_stream(stream));
449-
snd_hdac_stream_timecounter_init(hstr, 0);
450449
} else {
451450
snd_hdac_stream_stop(hdac_stream(stream));
452451
}
452+
snd_hdac_stream_timecounter_init(hstr, 0, start);
453453

454454
spin_unlock_irqrestore(&bus->reg_lock, cookie);
455455

@@ -1145,8 +1145,7 @@ static int skl_coupled_trigger(struct snd_pcm_substream *substream,
11451145

11461146
/* reset SYNC bits */
11471147
snd_hdac_stream_sync_trigger(hstr, false, sbits, AZX_REG_SSYNC);
1148-
if (start)
1149-
snd_hdac_stream_timecounter_init(hstr, sbits);
1148+
snd_hdac_stream_timecounter_init(hstr, sbits, start);
11501149
spin_unlock_irqrestore(&bus->reg_lock, cookie);
11511150

11521151
return 0;

0 commit comments

Comments
 (0)