ASoC: Intel: sdw_max98373: add card_late_probe support

Disable Left and Right Spk pin after boot so that sof can get
suspended.

This follows the same logic added to another machine driver with
commit 94d2d08974 ("ASoC: Intel: Boards: tgl_max98373: add dai_trigger function")

Signed-off-by: randerwang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200708203215.231776-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
randerwang
2020-07-08 15:32:15 -05:00
committed by Mark Brown
parent cb468cd5b9
commit be3afa120c
3 changed files with 36 additions and 1 deletions

View File

@@ -237,6 +237,7 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.direction = {true, true},
.dai_name = "max98373-aif1",
.init = sof_sdw_mx8373_init,
.codec_card_late_probe = sof_sdw_mx8373_late_probe,
},
{
.id = 0x5682,
@@ -927,13 +928,29 @@ DMIC:
return 0;
}
static int sof_sdw_card_late_probe(struct snd_soc_card *card)
{
int i, ret;
for (i = 0; i < ARRAY_SIZE(codec_info_list); i++) {
if (!codec_info_list[i].late_probe)
continue;
ret = codec_info_list[i].codec_card_late_probe(card);
if (ret < 0)
return ret;
}
return sof_sdw_hdmi_card_late_probe(card);
}
/* SoC card */
static const char sdw_card_long_name[] = "Intel Soundwire SOF";
static struct snd_soc_card card_sof_sdw = {
.name = "soundwire",
.owner = THIS_MODULE,
.late_probe = sof_sdw_hdmi_card_late_probe,
.late_probe = sof_sdw_card_late_probe,
.codec_conf = codec_conf,
.num_configs = ARRAY_SIZE(codec_conf),
};