summaryrefslogtreecommitdiff
path: root/sound/soc/intel/boards/sof_board_helpers.c
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2024-03-26 11:04:01 -0500
committerMark Brown <broonie@kernel.org>2024-03-26 16:13:24 +0000
commit0703329606a237c3604230603d58254a8bdf4b81 (patch)
treeb28c0d57797efe5a9834c728cd38d5872d8ade1e /sound/soc/intel/boards/sof_board_helpers.c
parent634ffef9cbc41b9db2b45974969dda06219ffce1 (diff)
ASoC: Intel: sof_sdw: Move get_codec_dai_by_name() into sof_sdw itself
Currently sof_sdw relies on sof_board_helpers to provide get_codec_dai_by_name(), but that is the only function from sof_board_helpers it uses and no other machine driver requires that function. There is no reason for sof_sdw to select SSP_COMMON but more and more functions in sof_board_helpers are gaining dependencies on functions that would require stubs for sof_sdw to build without it. Firstly it was sof_ssp_get_codec_name(), as was fixed in commit c1469c3a8a30 ("ASoC: Intel: ssp-common: Add stub for sof_ssp_get_codec_name"), now it is: ERROR: modpost: "sof_ssp_detect_amp_type" [sound/soc/intel/boards/snd-soc-intel-sof-board-helpers.ko] undefined! ERROR: modpost: "sof_ssp_detect_codec_type" [sound/soc/intel/boards/snd-soc-intel-sof-board-helpers.ko] undefined! Rather than adding more stubs, simply move the affected function to the sof_sdw machine driver itself and no longer select SND_SOC_INTEL_SOF_BOARD_HELPERS at all. This should allow work on SSP_COMMON to progress without affecting sof_sdw. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240326160429.13560-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/sof_board_helpers.c')
-rw-r--r--sound/soc/intel/boards/sof_board_helpers.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/sound/soc/intel/boards/sof_board_helpers.c b/sound/soc/intel/boards/sof_board_helpers.c
index a5135be94f32..586600680e84 100644
--- a/sound/soc/intel/boards/sof_board_helpers.c
+++ b/sound/soc/intel/boards/sof_board_helpers.c
@@ -630,24 +630,6 @@ sof_intel_board_get_ctx(struct device *dev, unsigned long board_quirk)
}
EXPORT_SYMBOL_NS(sof_intel_board_get_ctx, SND_SOC_INTEL_SOF_BOARD_HELPERS);
-struct snd_soc_dai *get_codec_dai_by_name(struct snd_soc_pcm_runtime *rtd,
- const char * const dai_name[], int num_dais)
-{
- struct snd_soc_dai *dai;
- int index;
- int i;
-
- for (index = 0; index < num_dais; index++)
- for_each_rtd_codec_dais(rtd, i, dai)
- if (strstr(dai->name, dai_name[index])) {
- dev_dbg(rtd->card->dev, "get dai %s\n", dai->name);
- return dai;
- }
-
- return NULL;
-}
-EXPORT_SYMBOL_NS(get_codec_dai_by_name, SND_SOC_INTEL_SOF_BOARD_HELPERS);
-
MODULE_DESCRIPTION("ASoC Intel SOF Machine Driver Board Helpers");
MODULE_AUTHOR("Brent Lu <brent.lu@intel.com>");
MODULE_LICENSE("GPL");