diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 86fe18198a15..a2a64f10f3b2 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -1253,6 +1253,11 @@ static inline void snd_pcm_gettime(struct snd_pcm_runtime *runtime, case SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW: ktime_get_raw_ts64(tv); break; +#if defined(CONFIG_ARCH_ROCKCHIP) && defined(CONFIG_NO_GKI) + case SNDRV_PCM_TSTAMP_TYPE_BOOTTIME: + ktime_get_boottime_ts64(tv); + break; +#endif default: ktime_get_real_ts64(tv); break; diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index de6810e94abe..0641122d2298 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h @@ -606,7 +606,12 @@ enum { SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0, /* gettimeofday equivalent */ SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, /* posix_clock_monotonic equivalent */ SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, /* monotonic_raw (no NTP) */ +#if defined(__KERNEL__) && defined(CONFIG_ARCH_ROCKCHIP) && defined(CONFIG_NO_GKI) + SNDRV_PCM_TSTAMP_TYPE_BOOTTIME, /* boot time during suspend */ + SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_BOOTTIME, +#else SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, +#endif }; /* channel positions */