--- zzzz-none-000/linux-4.4.271/sound/core/pcm_timer.c 2021-06-03 06:22:09.000000000 +0000 +++ maple-fsgw-759/linux-4.4.271/sound/core/pcm_timer.c 2023-12-20 10:37:43.000000000 +0000 @@ -65,9 +65,23 @@ static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer) { struct snd_pcm_substream *substream; - +#ifdef CONFIG_AUDIO_QGKI + unsigned long ret = 0, flags = 0; +#endif + substream = timer->private_data; +#ifdef CONFIG_AUDIO_QGKI + spin_lock_irqsave(&substream->runtime_lock, flags); + if (substream->runtime) + ret = substream->runtime->timer_resolution; + else + ret = 0; + spin_unlock_irqrestore(&substream->runtime_lock, flags); + + return ret; +#else return substream->runtime ? substream->runtime->timer_resolution : 0; +#endif } static int snd_pcm_timer_start(struct snd_timer * timer)