]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: SOF: Intel: hda: Implement get_stream_position (Linear Link Position)
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 21 Mar 2024 13:08:01 +0000 (15:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:38:17 +0000 (16:38 +0200)
commitf01fd1ea327b5986e7a3e4a56838059df2f34670
tree86c4498e6d31f9de62de27e08b87295d6b88b889
parent9562ff5b912a2d487a6886754d249f934063c942
ASoC: SOF: Intel: hda: Implement get_stream_position (Linear Link Position)

commit 67b182bea08a8d1092b91b57aefdfe420fce1634 upstream.

When the Linear Link Position is not available in firmware SRAM window we
use the host accessible position registers to read it.
The address of the PPLCLLPL/U registers depend on the number of streams
(playback+capture).
At probe time the pplc_addr is calculated for each stream and we can use
it to read the LLP without the need of address re-calculation.

Set the get_stream_position callback in sof_hda_common_ops for all
platforms:
The callback is used for IPC4 delay calculations only but the register is
a generic HDA register, not tied to any specific IPC version.

Cc: stable@vger.kernel.org # 6.8
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240321130814.4412-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/sof/intel/hda-common-ops.c
sound/soc/sof/intel/hda-stream.c
sound/soc/sof/intel/hda.h