summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel/hda-dai.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2022-10-24 19:53:01 +0300
committerMark Brown <broonie@kernel.org>2022-10-26 16:17:59 +0300
commit4842f79f8fdd9a5aae3d5db98ab3e3a36a387cfd (patch)
tree7f70b2c9a5432691db422656c8fa7ac49f280063 /sound/soc/sof/intel/hda-dai.c
parent0351a9b8f8447935e67b98829c1ad287de426f7e (diff)
downloadlinux-4842f79f8fdd9a5aae3d5db98ab3e3a36a387cfd.tar.xz
ASoC: SOF: Intel: hda-dai: use component_get_drvdata to find hdac_bus
Remove the last usage of substream->runtime->private_data in the HDAudio BE hw_params. The SOF core saves the 'sdev' global context as component drvdata, and we already save the bus information in sdev. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221024165310.246183-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/hda-dai.c')
-rw-r--r--sound/soc/sof/intel/hda-dai.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c
index c7b07c269365..2bce8dff4627 100644
--- a/sound/soc/sof/intel/hda-dai.c
+++ b/sound/soc/sof/intel/hda-dai.c
@@ -207,14 +207,17 @@ static int hda_link_dma_params(struct hdac_ext_stream *hext_stream,
static int hda_link_dma_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
- struct hdac_stream *hstream = substream->runtime->private_data;
- struct hdac_ext_stream *hext_stream;
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
struct hda_pipe_params p_params = {0};
- struct hdac_bus *bus = hstream->bus;
+ struct hdac_ext_stream *hext_stream;
struct hdac_ext_link *hlink;
+ struct snd_sof_dev *sdev;
+ struct hdac_bus *bus;
+
+ sdev = snd_soc_component_get_drvdata(cpu_dai->component);
+ bus = sof_to_bus(sdev);
hext_stream = snd_soc_dai_get_dma_data(cpu_dai, substream);
if (!hext_stream) {