diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2024-05-03 16:52:20 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-05-05 17:45:47 +0300 |
commit | 3b7bd0c139849e95981961525b7f6dd20097a563 (patch) | |
tree | d853f705ca2a9bf61f0baf1f591f5a984fb7934f /sound/soc/sof/intel/hda-dsp.c | |
parent | 136b37369cc4f044139b886133f3b9a721ecacd1 (diff) | |
download | linux-3b7bd0c139849e95981961525b7f6dd20097a563.tar.xz |
ASoC: SOF: Intel: remove circular dependency on hda_sdw_process_wakeen()
hda_sdw_process_wakeen() is used in hda-loader.c, but defined in
hda.c. This code split will create a circular dependency when hda.c is
moved to a different module. Rather than an invasive code change, this
patch follows the model used for sdw_check_wakeen_irq() with an
abstraction. For now all abstractions point to the same common
routine, which is arguably not great, but this also provides us with a
future-proof way of addressing platform-specific wake processing.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20240503135221.229202-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/hda-dsp.c')
-rw-r--r-- | sound/soc/sof/intel/hda-dsp.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c index 974ac1cd8c6e..780f4c33e678 100644 --- a/sound/soc/sof/intel/hda-dsp.c +++ b/sound/soc/sof/intel/hda-dsp.c @@ -1311,6 +1311,21 @@ int hda_sdw_check_lcount(struct snd_sof_dev *sdev) return 0; } + +void hda_sdw_process_wakeen(struct snd_sof_dev *sdev) +{ + u32 interface_mask = hda_get_interface_mask(sdev); + const struct sof_intel_dsp_desc *chip; + + if (!(interface_mask & BIT(SOF_DAI_INTEL_ALH))) + return; + + chip = get_chip_info(sdev->pdata); + if (chip && chip->sdw_process_wakeen) + chip->sdw_process_wakeen(sdev); +} +EXPORT_SYMBOL_NS(hda_sdw_process_wakeen, SND_SOC_SOF_INTEL_HDA_COMMON); + #endif int hda_dsp_disable_interrupts(struct snd_sof_dev *sdev) |