Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
UPSTREAM: ASoC: SOF: Intel: lnl: add core get and set support for dsp…
Browse files Browse the repository at this point in the history
… core

Driver uses get and set ops to change the power state of dsp core.

Closes: thesofproject/sof#8478
Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231204214407.208528-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit f31c166
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:326869955
TEST=Test Audio use cases.

Change-Id: If1d2f4eab2beedf44df684ef2dcadeb256ca708a
Signed-off-by: Debi sahoo <debix.prasad.sahoo@intel.com>
Signed-off-by: Hubert Mazur <hmazur@google.com>
  • Loading branch information
RanderWang authored and nowicki-tomasz committed Sep 30, 2024
1 parent 989dff2 commit 371e510
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions sound/soc/sof/intel/lnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ int sof_lnl_ops_init(struct snd_sof_dev *sdev)

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;

sdev->private = kzalloc(sizeof(struct sof_ipc4_fw_data), GFP_KERNEL);
if (!sdev->private)
return -ENOMEM;
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/sof/intel/mtl.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ u64 mtl_dsp_get_stream_hda_link_position(struct snd_sof_dev *sdev,
return ((u64)llp_u << 32) | llp_l;
}

static int mtl_dsp_core_get(struct snd_sof_dev *sdev, int core)
int mtl_dsp_core_get(struct snd_sof_dev *sdev, int core)
{
const struct sof_ipc_pm_ops *pm_ops = sdev->ipc->ops->pm;

Expand All @@ -679,7 +679,7 @@ static int mtl_dsp_core_get(struct snd_sof_dev *sdev, int core)
return 0;
}

static int mtl_dsp_core_put(struct snd_sof_dev *sdev, int core)
int mtl_dsp_core_put(struct snd_sof_dev *sdev, int core)
{
const struct sof_ipc_pm_ops *pm_ops = sdev->ipc->ops->pm;
int ret;
Expand Down
3 changes: 3 additions & 0 deletions sound/soc/sof/intel/mtl.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,6 @@ 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);

0 comments on commit 371e510

Please sign in to comment.