Patch "ASoC: SOF: Intel: mtl/lnl: Use the generic get_stream_position callback" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ASoC: SOF: Intel: mtl/lnl: Use the generic get_stream_position callback

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-sof-intel-mtl-lnl-use-the-generic-get_stream_position-callback.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 4374f698d7d9f849b66f3fa8f7a64f0bc1a53d7f Mon Sep 17 00:00:00 2001
From: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>
Date: Thu, 21 Mar 2024 15:08:02 +0200
Subject: ASoC: SOF: Intel: mtl/lnl: Use the generic get_stream_position callback

From: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>

commit 4374f698d7d9f849b66f3fa8f7a64f0bc1a53d7f upstream.

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@xxxxxxxxxxxxxxx # 6.8
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>
Reviewed-by: Rander Wang <rander.wang@xxxxxxxxx>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
Link: https://msgid.link/r/20240321130814.4412-6-peter.ujfalusi@xxxxxxxxxxxxxxx
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 sound/soc/sof/intel/lnl.c |    2 --
 sound/soc/sof/intel/mtl.c |   14 --------------
 sound/soc/sof/intel/mtl.h |   10 ----------
 3 files changed, 26 deletions(-)

--- a/sound/soc/sof/intel/lnl.c
+++ b/sound/soc/sof/intel/lnl.c
@@ -118,8 +118,6 @@ int sof_lnl_ops_init(struct snd_sof_dev
 	sof_lnl_ops.resume			= lnl_hda_dsp_resume;
 	sof_lnl_ops.runtime_resume		= lnl_hda_dsp_runtime_resume;
 
-	sof_lnl_ops.get_stream_position = mtl_dsp_get_stream_hda_link_position;
-
 	/* dsp core get/put */
 	sof_lnl_ops.core_get = mtl_dsp_core_get;
 	sof_lnl_ops.core_put = mtl_dsp_core_put;
--- a/sound/soc/sof/intel/mtl.c
+++ b/sound/soc/sof/intel/mtl.c
@@ -626,18 +626,6 @@ static int mtl_dsp_disable_interrupts(st
 	return mtl_enable_interrupts(sdev, false);
 }
 
-u64 mtl_dsp_get_stream_hda_link_position(struct snd_sof_dev *sdev,
-					 struct snd_soc_component *component,
-					 struct snd_pcm_substream *substream)
-{
-	struct hdac_stream *hstream = substream->runtime->private_data;
-	u32 llp_l, llp_u;
-
-	llp_l = snd_sof_dsp_read(sdev, HDA_DSP_HDA_BAR, MTL_PPLCLLPL(hstream->index));
-	llp_u = snd_sof_dsp_read(sdev, HDA_DSP_HDA_BAR, MTL_PPLCLLPU(hstream->index));
-	return ((u64)llp_u << 32) | llp_l;
-}
-
 int mtl_dsp_core_get(struct snd_sof_dev *sdev, int core)
 {
 	const struct sof_ipc_pm_ops *pm_ops = sdev->ipc->ops->pm;
@@ -707,8 +695,6 @@ int sof_mtl_ops_init(struct snd_sof_dev
 	sof_mtl_ops.core_get = mtl_dsp_core_get;
 	sof_mtl_ops.core_put = mtl_dsp_core_put;
 
-	sof_mtl_ops.get_stream_position = mtl_dsp_get_stream_hda_link_position;
-
 	sdev->private = kzalloc(sizeof(struct sof_ipc4_fw_data), GFP_KERNEL);
 	if (!sdev->private)
 		return -ENOMEM;
--- a/sound/soc/sof/intel/mtl.h
+++ b/sound/soc/sof/intel/mtl.h
@@ -6,12 +6,6 @@
  * Copyright(c) 2020-2022 Intel Corporation. All rights reserved.
  */
 
-/* HDA Registers */
-#define MTL_PPLCLLPL_BASE		0x948
-#define MTL_PPLCLLPU_STRIDE		0x10
-#define MTL_PPLCLLPL(x)			(MTL_PPLCLLPL_BASE + (x) * MTL_PPLCLLPU_STRIDE)
-#define MTL_PPLCLLPU(x)			(MTL_PPLCLLPL_BASE + 0x4 + (x) * MTL_PPLCLLPU_STRIDE)
-
 /* DSP Registers */
 #define MTL_HFDSSCS			0x1000
 #define MTL_HFDSSCS_SPA_MASK		BIT(16)
@@ -103,9 +97,5 @@ int mtl_dsp_ipc_get_window_offset(struct
 
 void mtl_ipc_dump(struct snd_sof_dev *sdev);
 
-u64 mtl_dsp_get_stream_hda_link_position(struct snd_sof_dev *sdev,
-					 struct snd_soc_component *component,
-					 struct snd_pcm_substream *substream);
-
 int mtl_dsp_core_get(struct snd_sof_dev *sdev, int core);
 int mtl_dsp_core_put(struct snd_sof_dev *sdev, int core);


Patches currently in stable-queue which might be from peter.ujfalusi@xxxxxxxxxxxxxxx are

queue-6.8/asoc-sof-intel-hda-implement-get_stream_position-linear-link-position.patch
queue-6.8/asoc-sof-intel-mtl-lnl-use-the-generic-get_stream_position-callback.patch
queue-6.8/asoc-sof-add-dsp_max_burst_size_in_ms-member-to-snd_sof_pcm_stream.patch
queue-6.8/asoc-sof-intel-hda-pcm-use-dsp_max_burst_size_in_ms-to-place-constraint.patch
queue-6.8/asoc-sof-intel-hda-common-ops-do-not-set-the-get_stream_position-callback.patch
queue-6.8/asoc-sof-intel-set-the-dai-host-get-frame-byte-counter-callbacks.patch
queue-6.8/asoc-sof-introduce-a-new-callback-pair-to-be-used-for-pcm-delay-reporting.patch
queue-6.8/asoc-sof-ipc4-pcm-use-the-snd_sof_pcm_get_dai_frame_counter-for-pcm_delay.patch
queue-6.8/asoc-sof-ipc4-topology-save-the-dma-maximum-burst-size-for-pcms.patch
queue-6.8/alsa-hda-add-pplcllpl-u-members-to-hdac_ext_stream.patch
queue-6.8/asoc-sof-remove-the-get_stream_position-callback.patch
queue-6.8/asoc-sof-ipc4-pcm-correct-the-delay-calculation.patch
queue-6.8/asoc-sof-ipc4-pcm-combine-the-sof_ipc4_pipe_paused-cases-in-pcm_trigger.patch
queue-6.8/asoc-sof-sof-pcm-add-pointer-callback-to-sof_ipc_pcm_ops.patch
queue-6.8/asoc-sof-intel-hda-compensate-llp-in-case-it-is-not-reset.patch
queue-6.8/asoc-sof-ipc4-pcm-move-struct-sof_ipc4_timestamp_info-definition-locally.patch
queue-6.8/asoc-sof-ipc4-pcm-invalidate-the-stream_start_offset-in-paused-state.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux