summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel/hda-dsp.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2022-02-09 08:31:04 +0200
committerMark Brown <broonie@kernel.org>2022-02-09 14:36:14 +0000
commit7d88b9608142f95ccdd3dfb190da4a5faddb1cc7 (patch)
tree547c877e53d5165bc2721fa3fcc82c85b21f9b25 /sound/soc/sof/intel/hda-dsp.c
parent960a89045e146025f019647d3305b7eeddde68c6 (diff)
ASoC: SOF: Intel: hdac_ext_stream: consistent prefixes for variables/members
The existing code maximizes confusion by using 'stream' and 'hstream' variables of different types, e.g: struct hdac_stream *stream; struct hdac_ext_stream *stream; struct hdac_stream *hstream; struct hdac_ext_stream *hstream; This confusion is partly inherited from legacy code but SOF contributors added their own creative spin, e.g. struct hdac_ext_stream *link_dev; struct hdac_ext_stream *dsp_stream; struct hdac_ext_stream hda_stream; and my personal favorite: stream = &hda_stream->hda_stream; This patch suggests a consistent naming across all Intel code related to HDAudio stream management. The convention is - by hierarchical order: struct sof_intel_hda_stream *hda_stream; struct hdac_ext_stream *hext_stream; struct hdac_stream *hstream; No functionality change - just renaming of variables/members. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20220209063104.9971-1-peter.ujfalusi@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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c
index 916a257ea96b..0fe522549c91 100644
--- a/sound/soc/sof/intel/hda-dsp.c
+++ b/sound/soc/sof/intel/hda-dsp.c
@@ -904,7 +904,7 @@ int hda_dsp_set_hw_params_upon_resume(struct snd_sof_dev *sdev)
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
struct hdac_bus *bus = sof_to_bus(sdev);
struct snd_soc_pcm_runtime *rtd;
- struct hdac_ext_stream *stream;
+ struct hdac_ext_stream *hext_stream;
struct hdac_ext_link *link;
struct hdac_stream *s;
const char *name;
@@ -912,7 +912,7 @@ int hda_dsp_set_hw_params_upon_resume(struct snd_sof_dev *sdev)
/* set internal flag for BE */
list_for_each_entry(s, &bus->stream_list, list) {
- stream = stream_to_hdac_ext_stream(s);
+ hext_stream = stream_to_hdac_ext_stream(s);
/*
* clear stream. This should already be taken care for running
@@ -920,20 +920,20 @@ int hda_dsp_set_hw_params_upon_resume(struct snd_sof_dev *sdev)
* streams do not get suspended, so this needs to be done
* explicitly during suspend.
*/
- if (stream->link_substream) {
- rtd = asoc_substream_to_rtd(stream->link_substream);
+ if (hext_stream->link_substream) {
+ rtd = asoc_substream_to_rtd(hext_stream->link_substream);
name = asoc_rtd_to_codec(rtd, 0)->component->name;
link = snd_hdac_ext_bus_get_link(bus, name);
if (!link)
return -EINVAL;
- stream->link_prepared = 0;
+ hext_stream->link_prepared = 0;
- if (hdac_stream(stream)->direction ==
+ if (hdac_stream(hext_stream)->direction ==
SNDRV_PCM_STREAM_CAPTURE)
continue;
- stream_tag = hdac_stream(stream)->stream_tag;
+ stream_tag = hdac_stream(hext_stream)->stream_tag;
snd_hdac_ext_link_clear_stream_id(link, stream_tag);
}
}