diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2023-05-12 13:17:00 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-05-15 20:14:02 +0900 |
commit | b7b71b8cbd48b435e7e70a27f96b43a8270ec675 (patch) | |
tree | 1ee54612300c289cda4c3174b5f7e4d863a9f729 /sound/soc/sof/intel/hda-dai.c | |
parent | caf7ad845e90f8ac29d7342bea6d9f1fc392c953 (diff) |
ASoC: SOF: Intel: hda-dai: mark functions as __maybe_unused
hda_dai_hw_params, hda_dai_trigger(), hda_dai_hw_free are currently
only used for HDaudio codec support, but will be reused for
SSP/DMIC/SoundWire in the LunarLake/ACE2.x case. To avoid 'defined but
not used' errors or added complexity in Kconfig, mark all these
functions as __maybe_used.
When SSP/DMIC/SoundWire are added, some of these changes may be
reverted. For now this avoids compilation warnings.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
Reviewed-by: Rander Wang <rander.wang@intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512181702.117483-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.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c index cdd842288811..729f750fe746 100644 --- a/sound/soc/sof/intel/hda-dai.c +++ b/sound/soc/sof/intel/hda-dai.c @@ -206,7 +206,8 @@ static int hda_link_dma_hw_params(struct snd_pcm_substream *substream, return 0; } -static int hda_dai_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) +static int __maybe_unused hda_dai_hw_free(struct snd_pcm_substream *substream, + struct snd_soc_dai *cpu_dai) { const struct hda_dai_widget_dma_ops *ops = hda_dai_get_ops(substream, cpu_dai); struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); @@ -226,9 +227,9 @@ static int hda_dai_hw_free(struct snd_pcm_substream *substream, struct snd_soc_d return hda_link_dma_cleanup(substream, hext_stream, cpu_dai, codec_dai); } -static int hda_dai_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params, - struct snd_soc_dai *dai) +static int __maybe_unused hda_dai_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params, + struct snd_soc_dai *dai) { struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(dai, substream->stream); const struct hda_dai_widget_dma_ops *ops = hda_dai_get_ops(substream, dai); @@ -263,7 +264,8 @@ static int hda_dai_hw_params(struct snd_pcm_substream *substream, * In contrast to IPC3, the dai trigger in IPC4 mixes pipeline state changes * (over IPC channel) and DMA state change (direct host register changes). */ -static int hda_dai_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) +static int __maybe_unused hda_dai_trigger(struct snd_pcm_substream *substream, int cmd, + struct snd_soc_dai *dai) { const struct hda_dai_widget_dma_ops *ops = hda_dai_get_ops(substream, dai); struct hdac_ext_stream *hext_stream; |