Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: SOF: Intel: mtl: Enable multicore support

Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

The following series will enable multicore support on MTL platforms similarly
to other Intel platforms.

The TGL patch is included to simplify the core_put implementation.

Multicore support can be enabled by updated topologies, with current set of
tplg files this series is not introducing any runtime change.

+39 -4
+32 -1
sound/soc/sof/intel/mtl.c
··· 613 613 return ((u64)llp_u << 32) | llp_l; 614 614 } 615 615 616 + static int mtl_dsp_core_get(struct snd_sof_dev *sdev, int core) 617 + { 618 + const struct sof_ipc_pm_ops *pm_ops = sdev->ipc->ops->pm; 619 + 620 + if (core == SOF_DSP_PRIMARY_CORE) 621 + return mtl_dsp_core_power_up(sdev, SOF_DSP_PRIMARY_CORE); 622 + 623 + if (pm_ops->set_core_state) 624 + return pm_ops->set_core_state(sdev, core, true); 625 + 626 + return 0; 627 + } 628 + 629 + static int mtl_dsp_core_put(struct snd_sof_dev *sdev, int core) 630 + { 631 + const struct sof_ipc_pm_ops *pm_ops = sdev->ipc->ops->pm; 632 + int ret; 633 + 634 + if (pm_ops->set_core_state) { 635 + ret = pm_ops->set_core_state(sdev, core, false); 636 + if (ret < 0) 637 + return ret; 638 + } 639 + 640 + if (core == SOF_DSP_PRIMARY_CORE) 641 + return mtl_dsp_core_power_down(sdev, SOF_DSP_PRIMARY_CORE); 642 + 643 + return 0; 644 + } 645 + 616 646 /* Meteorlake ops */ 617 647 struct snd_sof_dsp_ops sof_mtl_ops; 618 648 EXPORT_SYMBOL_NS(sof_mtl_ops, SND_SOC_SOF_INTEL_HDA_COMMON); ··· 679 649 sof_mtl_ops.parse_platform_ext_manifest = NULL; 680 650 681 651 /* dsp core get/put */ 682 - /* TODO: add core_get and core_put */ 652 + sof_mtl_ops.core_get = mtl_dsp_core_get; 653 + sof_mtl_ops.core_put = mtl_dsp_core_put; 683 654 684 655 sof_mtl_ops.get_stream_position = mtl_dsp_get_stream_hda_link_position; 685 656
+7 -3
sound/soc/sof/intel/tgl.c
··· 39 39 static int tgl_dsp_core_put(struct snd_sof_dev *sdev, int core) 40 40 { 41 41 const struct sof_ipc_pm_ops *pm_ops = sdev->ipc->ops->pm; 42 + int ret; 43 + 44 + if (pm_ops->set_core_state) { 45 + ret = pm_ops->set_core_state(sdev, core, false); 46 + if (ret < 0) 47 + return ret; 48 + } 42 49 43 50 /* power down primary core and return */ 44 51 if (core == SOF_DSP_PRIMARY_CORE) 45 52 return hda_dsp_core_reset_power_down(sdev, BIT(core)); 46 - 47 - if (pm_ops->set_core_state) 48 - return pm_ops->set_core_state(sdev, core, false); 49 53 50 54 return 0; 51 55 }