Merge tag 'kbuild-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
[sfrench/cifs-2.6.git] / sound / core / pcm_lib.c
index a93a4235a33287864bb5a5047b571355771cd966..10e7ef7a8804b1ba0d88b6a0c4ad478f38a9397e 100644 (file)
@@ -248,8 +248,10 @@ static void update_audio_tstamp(struct snd_pcm_substream *substream,
                                runtime->rate);
                *audio_tstamp = ns_to_timespec(audio_nsecs);
        }
-       runtime->status->audio_tstamp = *audio_tstamp;
-       runtime->status->tstamp = *curr_tstamp;
+       if (!timespec_equal(&runtime->status->audio_tstamp, audio_tstamp)) {
+               runtime->status->audio_tstamp = *audio_tstamp;
+               runtime->status->tstamp = *curr_tstamp;
+       }
 
        /*
         * re-take a driver timestamp to let apps detect if the reference tstamp