Commit 579d6596 authored by Bard Liao's avatar Bard Liao Committed by Mark Brown

ASoC: Intel: sof_sdw: remove .init callbacks

Some codec .init callbacks are empty after removing dai_links->init =
xxx_rtd_init;. Remove those callbacks.
Reviewed-by: default avatarRander Wang <rander.wang@intel.com>
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-19-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8266c731
...@@ -650,7 +650,6 @@ static struct sof_sdw_codec_info codec_info_list[] = { ...@@ -650,7 +650,6 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "rt700-aif1", .dai_name = "rt700-aif1",
.dai_type = SOF_SDW_DAI_TYPE_JACK, .dai_type = SOF_SDW_DAI_TYPE_JACK,
.dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID}, .dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID},
.init = sof_sdw_rt700_init,
.rtd_init = rt700_rtd_init, .rtd_init = rt700_rtd_init,
}, },
}, },
...@@ -706,7 +705,6 @@ static struct sof_sdw_codec_info codec_info_list[] = { ...@@ -706,7 +705,6 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "rt712-sdca-aif2", .dai_name = "rt712-sdca-aif2",
.dai_type = SOF_SDW_DAI_TYPE_AMP, .dai_type = SOF_SDW_DAI_TYPE_AMP,
.dailink = {SDW_AMP_OUT_DAI_ID, SDW_UNUSED_DAI_ID}, .dailink = {SDW_AMP_OUT_DAI_ID, SDW_UNUSED_DAI_ID},
.init = sof_sdw_rt712_spk_init,
.rtd_init = rt712_spk_rtd_init, .rtd_init = rt712_spk_rtd_init,
}, },
}, },
...@@ -721,7 +719,6 @@ static struct sof_sdw_codec_info codec_info_list[] = { ...@@ -721,7 +719,6 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "rt712-sdca-dmic-aif1", .dai_name = "rt712-sdca-dmic-aif1",
.dai_type = SOF_SDW_DAI_TYPE_MIC, .dai_type = SOF_SDW_DAI_TYPE_MIC,
.dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID},
.init = sof_sdw_rt712_sdca_dmic_init,
.rtd_init = rt712_sdca_dmic_rtd_init, .rtd_init = rt712_sdca_dmic_rtd_init,
}, },
}, },
...@@ -752,7 +749,6 @@ static struct sof_sdw_codec_info codec_info_list[] = { ...@@ -752,7 +749,6 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "rt712-sdca-dmic-aif1", .dai_name = "rt712-sdca-dmic-aif1",
.dai_type = SOF_SDW_DAI_TYPE_MIC, .dai_type = SOF_SDW_DAI_TYPE_MIC,
.dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID},
.init = sof_sdw_rt712_sdca_dmic_init,
.rtd_init = rt712_sdca_dmic_rtd_init, .rtd_init = rt712_sdca_dmic_rtd_init,
}, },
}, },
...@@ -815,7 +811,6 @@ static struct sof_sdw_codec_info codec_info_list[] = { ...@@ -815,7 +811,6 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "rt715-aif2", .dai_name = "rt715-aif2",
.dai_type = SOF_SDW_DAI_TYPE_MIC, .dai_type = SOF_SDW_DAI_TYPE_MIC,
.dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID},
.init = sof_sdw_rt715_sdca_init,
.rtd_init = rt715_sdca_rtd_init, .rtd_init = rt715_sdca_rtd_init,
}, },
}, },
...@@ -831,7 +826,6 @@ static struct sof_sdw_codec_info codec_info_list[] = { ...@@ -831,7 +826,6 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "rt715-aif2", .dai_name = "rt715-aif2",
.dai_type = SOF_SDW_DAI_TYPE_MIC, .dai_type = SOF_SDW_DAI_TYPE_MIC,
.dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID},
.init = sof_sdw_rt715_sdca_init,
.rtd_init = rt715_sdca_rtd_init, .rtd_init = rt715_sdca_rtd_init,
}, },
}, },
...@@ -847,7 +841,6 @@ static struct sof_sdw_codec_info codec_info_list[] = { ...@@ -847,7 +841,6 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "rt715-aif2", .dai_name = "rt715-aif2",
.dai_type = SOF_SDW_DAI_TYPE_MIC, .dai_type = SOF_SDW_DAI_TYPE_MIC,
.dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID},
.init = sof_sdw_rt715_init,
.rtd_init = rt715_rtd_init, .rtd_init = rt715_rtd_init,
}, },
}, },
...@@ -863,7 +856,6 @@ static struct sof_sdw_codec_info codec_info_list[] = { ...@@ -863,7 +856,6 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "rt715-aif2", .dai_name = "rt715-aif2",
.dai_type = SOF_SDW_DAI_TYPE_MIC, .dai_type = SOF_SDW_DAI_TYPE_MIC,
.dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID},
.init = sof_sdw_rt715_init,
.rtd_init = rt715_rtd_init, .rtd_init = rt715_rtd_init,
}, },
}, },
...@@ -935,7 +927,6 @@ static struct sof_sdw_codec_info codec_info_list[] = { ...@@ -935,7 +927,6 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "rt5682-sdw", .dai_name = "rt5682-sdw",
.dai_type = SOF_SDW_DAI_TYPE_JACK, .dai_type = SOF_SDW_DAI_TYPE_JACK,
.dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID}, .dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID},
.init = sof_sdw_rt5682_init,
.rtd_init = rt5682_rtd_init, .rtd_init = rt5682_rtd_init,
}, },
}, },
...@@ -963,7 +954,6 @@ static struct sof_sdw_codec_info codec_info_list[] = { ...@@ -963,7 +954,6 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "cs42l42-sdw", .dai_name = "cs42l42-sdw",
.dai_type = SOF_SDW_DAI_TYPE_JACK, .dai_type = SOF_SDW_DAI_TYPE_JACK,
.dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID}, .dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID},
.init = sof_sdw_cs42l42_init,
.rtd_init = cs42l42_rtd_init, .rtd_init = cs42l42_rtd_init,
}, },
}, },
...@@ -978,7 +968,6 @@ static struct sof_sdw_codec_info codec_info_list[] = { ...@@ -978,7 +968,6 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "cs42l43-dp5", .dai_name = "cs42l43-dp5",
.dai_type = SOF_SDW_DAI_TYPE_JACK, .dai_type = SOF_SDW_DAI_TYPE_JACK,
.dailink = {SDW_JACK_OUT_DAI_ID, SDW_UNUSED_DAI_ID}, .dailink = {SDW_JACK_OUT_DAI_ID, SDW_UNUSED_DAI_ID},
.init = sof_sdw_cs42l43_hs_init,
.rtd_init = cs42l43_hs_rtd_init, .rtd_init = cs42l43_hs_rtd_init,
}, },
{ {
...@@ -986,7 +975,6 @@ static struct sof_sdw_codec_info codec_info_list[] = { ...@@ -986,7 +975,6 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "cs42l43-dp1", .dai_name = "cs42l43-dp1",
.dai_type = SOF_SDW_DAI_TYPE_MIC, .dai_type = SOF_SDW_DAI_TYPE_MIC,
.dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID},
.init = sof_sdw_cs42l43_dmic_init,
.rtd_init = cs42l43_dmic_rtd_init, .rtd_init = cs42l43_dmic_rtd_init,
}, },
{ {
......
...@@ -121,20 +121,4 @@ int cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd) ...@@ -121,20 +121,4 @@ int cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd)
return ret; return ret;
} }
int sof_sdw_cs42l42_init(struct snd_soc_card *card,
const struct snd_soc_acpi_link_adr *link,
struct snd_soc_dai_link *dai_links,
struct sof_sdw_codec_info *info,
bool playback)
{
/*
* headset should be initialized once.
* Do it with dai link for playback.
*/
if (!playback)
return 0;
return 0;
}
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS); MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS);
...@@ -108,18 +108,6 @@ int cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd) ...@@ -108,18 +108,6 @@ int cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd)
return ret; return ret;
} }
int sof_sdw_cs42l43_hs_init(struct snd_soc_card *card, const struct snd_soc_acpi_link_adr *link,
struct snd_soc_dai_link *dai_links, struct sof_sdw_codec_info *info,
bool playback)
{
/*
* No need to test if (!playback) like other codecs as cs42l43 uses separated dai for
* playback and capture, and sof_sdw_cs42l43_init is only linked to the playback dai.
*/
return 0;
}
int cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd) int cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd)
{ {
struct snd_soc_card *card = rtd->card; struct snd_soc_card *card = rtd->card;
...@@ -145,9 +133,3 @@ int cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd) ...@@ -145,9 +133,3 @@ int cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd)
return ret; return ret;
} }
int sof_sdw_cs42l43_dmic_init(struct snd_soc_card *card, const struct snd_soc_acpi_link_adr *link,
struct snd_soc_dai_link *dai_links, struct sof_sdw_codec_info *info,
bool playback)
{
return 0;
}
...@@ -120,20 +120,4 @@ int rt5682_rtd_init(struct snd_soc_pcm_runtime *rtd) ...@@ -120,20 +120,4 @@ int rt5682_rtd_init(struct snd_soc_pcm_runtime *rtd)
return ret; return ret;
} }
int sof_sdw_rt5682_init(struct snd_soc_card *card,
const struct snd_soc_acpi_link_adr *link,
struct snd_soc_dai_link *dai_links,
struct sof_sdw_codec_info *info,
bool playback)
{
/*
* headset should be initialized once.
* Do it with dai link for playback.
*/
if (!playback)
return 0;
return 0;
}
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS); MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS);
...@@ -119,20 +119,4 @@ int rt700_rtd_init(struct snd_soc_pcm_runtime *rtd) ...@@ -119,20 +119,4 @@ int rt700_rtd_init(struct snd_soc_pcm_runtime *rtd)
return ret; return ret;
} }
int sof_sdw_rt700_init(struct snd_soc_card *card,
const struct snd_soc_acpi_link_adr *link,
struct snd_soc_dai_link *dai_links,
struct sof_sdw_codec_info *info,
bool playback)
{
/*
* headset should be initialized once.
* Do it with dai link for playback.
*/
if (!playback)
return 0;
return 0;
}
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS); MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS);
...@@ -67,15 +67,6 @@ int rt712_spk_rtd_init(struct snd_soc_pcm_runtime *rtd) ...@@ -67,15 +67,6 @@ int rt712_spk_rtd_init(struct snd_soc_pcm_runtime *rtd)
return ret; return ret;
} }
int sof_sdw_rt712_spk_init(struct snd_soc_card *card,
const struct snd_soc_acpi_link_adr *link,
struct snd_soc_dai_link *dai_links,
struct sof_sdw_codec_info *info,
bool playback)
{
return 0;
}
static const char * const dmics[] = { static const char * const dmics[] = {
"rt712-sdca-dmic" "rt712-sdca-dmic"
}; };
...@@ -99,13 +90,4 @@ int rt712_sdca_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd) ...@@ -99,13 +90,4 @@ int rt712_sdca_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd)
return 0; return 0;
} }
int sof_sdw_rt712_sdca_dmic_init(struct snd_soc_card *card,
const struct snd_soc_acpi_link_adr *link,
struct snd_soc_dai_link *dai_links,
struct sof_sdw_codec_info *info,
bool playback)
{
return 0;
}
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS); MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS);
...@@ -24,11 +24,3 @@ int rt715_rtd_init(struct snd_soc_pcm_runtime *rtd) ...@@ -24,11 +24,3 @@ int rt715_rtd_init(struct snd_soc_pcm_runtime *rtd)
return 0; return 0;
} }
int sof_sdw_rt715_init(struct snd_soc_card *card,
const struct snd_soc_acpi_link_adr *link,
struct snd_soc_dai_link *dai_links,
struct sof_sdw_codec_info *info,
bool playback)
{
return 0;
}
...@@ -24,11 +24,3 @@ int rt715_sdca_rtd_init(struct snd_soc_pcm_runtime *rtd) ...@@ -24,11 +24,3 @@ int rt715_sdca_rtd_init(struct snd_soc_pcm_runtime *rtd)
return 0; return 0;
} }
int sof_sdw_rt715_sdca_init(struct snd_soc_card *card,
const struct snd_soc_acpi_link_adr *link,
struct snd_soc_dai_link *dai_links,
struct sof_sdw_codec_info *info,
bool playback)
{
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment