diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2023-05-15 15:10:24 +0800 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-05-27 16:06:45 +0530 |
commit | be1798d0d7153bb9900fd6a05f4f34b9bee2c287 (patch) | |
tree | 561193a206ab58552ae0b0da2e5e9adfb8e1b31f /sound | |
parent | ec2c9dbe5392cd17b7b1144918350d67cfbb9ff7 (diff) | |
download | linux-be1798d0d7153bb9900fd6a05f4f34b9bee2c287.tar.gz linux-be1798d0d7153bb9900fd6a05f4f34b9bee2c287.tar.bz2 linux-be1798d0d7153bb9900fd6a05f4f34b9bee2c287.zip |
ASoC: SOF: Intel: hda: retrieve SoundWire eml_lock and pass pointer
Use new helper and interface to make sure the HDaudio and SoundWire
parts use the same mutex when accessing shared registers.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230515071042.2038-9-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/sof/intel/hda.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 4d48f4018617..388e41057172 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -175,6 +175,15 @@ static int hda_sdw_probe(struct snd_sof_dev *sdev) res.alh_base = hdev->desc->sdw_alh_base; res.ext = false; } else { + /* + * retrieve eml_lock needed to protect shared registers + * in the HDaudio multi-link areas + */ + res.eml_lock = hdac_bus_eml_get_mutex(sof_to_bus(sdev), true, + AZX_REG_ML_LEPTR_ID_SDW); + if (!res.eml_lock) + return -ENODEV; + res.mmio_base = sdev->bar[HDA_DSP_HDA_BAR]; /* * the SHIM and SoundWire register offsets are link-specific |