ASoC: SOF: ipc4-pcm: Use the snd_sof_pcm_get_dai_frame_counter() for pcm_delay
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 21 Mar 2024 13:08:05 +0000 (15:08 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 25 Mar 2024 16:35:58 +0000 (16:35 +0000)
Switch to the new callback to retrieve the DAI (link) frame counter.

Cc: stable@vger.kernel.org # 6.8
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240321130814.4412-9-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc4-pcm.c

index 0f332c8cdbe6afe6fc9449b48194ebb749db5d3d..d0795f77cc1532a661a2191c7c7f43119f721607 100644 (file)
@@ -897,11 +897,12 @@ static snd_pcm_sframes_t sof_ipc4_pcm_delay(struct snd_soc_component *component,
        }
 
        /*
-        * HDaudio links don't support the LLP counter reported by firmware
-        * the link position is read directly from hardware registers.
+        * If the LLP counter is not reported by firmware in the SRAM window
+        * then read the dai (link) position via host accessible means if
+        * available.
         */
        if (!time_info->llp_offset) {
-               tmp_ptr = snd_sof_pcm_get_stream_position(sdev, component, substream);
+               tmp_ptr = snd_sof_pcm_get_dai_frame_counter(sdev, component, substream);
                if (!tmp_ptr)
                        return 0;
        } else {