ASoC: Intel: sof_sdw: Add MAX98373 support

Add max98373-sdw helper function, which configures 2x MAX98373 codecs to
Link1. This patch shares code between the I2S and SoundWire modes of
MAX98373 and adds the trigger already added for I2S.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200625192620.4312-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Esse commit está contido em:
Naveen Manohar
2020-06-25 14:26:20 -05:00
commit de Mark Brown
commit be82e88895
7 arquivos alterados com 111 adições e 6 exclusões

Ver arquivo

@@ -120,7 +120,8 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
DMI_MATCH(DMI_PRODUCT_NAME, "Volteer"),
},
.driver_data = (void *)(SOF_SDW_TGL_HDMI | SOF_SDW_PCH_DMIC),
.driver_data = (void *)(SOF_SDW_TGL_HDMI | SOF_SDW_PCH_DMIC |
SOF_SDW_FOUR_SPK),
},
{}
@@ -159,6 +160,15 @@ static struct snd_soc_codec_conf codec_conf[] = {
.dlc = COMP_CODEC_CONF("sdw:3:25d:715:0"),
.name_prefix = "rt715",
},
/* two MAX98373s on link1 with different unique id */
{
.dlc = COMP_CODEC_CONF("sdw:1:19f:8373:0:3"),
.name_prefix = "Right",
},
{
.dlc = COMP_CODEC_CONF("sdw:1:19f:8373:0:7"),
.name_prefix = "Left",
},
{
.dlc = COMP_CODEC_CONF("sdw:0:25d:5682:0"),
.name_prefix = "rt5682",
@@ -180,12 +190,12 @@ static struct snd_soc_dai_link_component platform_component[] = {
};
/* these wrappers are only needed to avoid typecast compilation errors */
static int sdw_startup(struct snd_pcm_substream *substream)
int sdw_startup(struct snd_pcm_substream *substream)
{
return sdw_startup_stream(substream);
}
static void sdw_shutdown(struct snd_pcm_substream *substream)
void sdw_shutdown(struct snd_pcm_substream *substream)
{
sdw_shutdown_stream(substream);
}
@@ -222,6 +232,12 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "rt715-aif2",
.init = sof_sdw_rt715_init,
},
{
.id = 0x8373,
.direction = {true, true},
.dai_name = "max98373-aif1",
.init = sof_sdw_mx8373_init,
},
{
.id = 0x5682,
.direction = {true, true},