ASoC: SOF: Intel: mtl/lnl: Use the generic get_stream_position callback
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 21 Mar 2024 13:08:02 +0000 (15:08 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 25 Mar 2024 16:35:55 +0000 (16:35 +0000)
commit4374f698d7d9f849b66f3fa8f7a64f0bc1a53d7f
tree04c5fabe7f634f39069144208f9d268f1eef6a99
parent67b182bea08a8d1092b91b57aefdfe420fce1634
ASoC: SOF: Intel: mtl/lnl: Use the generic get_stream_position callback

Drop the MTL mtl_dsp_get_stream_hda_link_position() function and related
defines since it can only work on platforms which have 19 streams because
of the use of 0x948 as base offset for the LLP registers.

The generic hda_dsp_get_stream_hda_link_position() takes the number of
streams into consideration when reading the LLP registers for the stream
and can handle different HDA configurations.

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-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/lnl.c
sound/soc/sof/intel/mtl.c
sound/soc/sof/intel/mtl.h