ASoC: Intel: sof_sdw: add rt1320 amp support

Add Realtek rt1320 amp support.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240827123215.258859-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Bard Liao 2024-08-27 20:32:00 +08:00 committed by Mark Brown
parent 6785244f3d
commit 1ab959bea2
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
3 changed files with 30 additions and 1 deletions

View File

@ -524,6 +524,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH
select SND_SOC_RT1308
select SND_SOC_RT1316_SDW
select SND_SOC_RT1318_SDW
select SND_SOC_RT1320_SDW
select SND_SOC_RT5682_SDW
select SND_SOC_CS42L42_SDW
select SND_SOC_CS42L43

View File

@ -160,6 +160,13 @@ static const struct snd_soc_dapm_route rt1318_map[] = {
{ "Speaker", NULL, "rt1318-2 SPOR" },
};
static const struct snd_soc_dapm_route rt1320_map[] = {
{ "Speaker", NULL, "rt1320-1 SPOL" },
{ "Speaker", NULL, "rt1320-1 SPOR" },
{ "Speaker", NULL, "rt1320-2 SPOL" },
{ "Speaker", NULL, "rt1320-2 SPOR" },
};
static const struct snd_soc_dapm_route *get_codec_name_and_route(struct snd_soc_dai *dai,
char *codec_name)
{
@ -171,8 +178,10 @@ static const struct snd_soc_dapm_route *get_codec_name_and_route(struct snd_soc_
return rt1308_map;
else if (strcmp(codec_name, "rt1316") == 0)
return rt1316_map;
else
else if (strcmp(codec_name, "rt1318") == 0)
return rt1318_map;
else
return rt1320_map;
}
int asoc_sdw_rt_amp_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai)

View File

@ -254,6 +254,25 @@ struct asoc_sdw_codec_info codec_info_list[] = {
},
.dai_num = 1,
},
{
.part_id = 0x1320,
.dais = {
{
.direction = {true, false},
.dai_name = "rt1320-aif1",
.dai_type = SOC_SDW_DAI_TYPE_AMP,
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
.init = asoc_sdw_rt_amp_init,
.exit = asoc_sdw_rt_amp_exit,
.rtd_init = asoc_sdw_rt_amp_spk_rtd_init,
.controls = generic_spk_controls,
.num_controls = ARRAY_SIZE(generic_spk_controls),
.widgets = generic_spk_widgets,
.num_widgets = ARRAY_SIZE(generic_spk_widgets),
},
},
.dai_num = 1,
},
{
.part_id = 0x714,
.version_id = 3,