ASoC: amd: sof-mach: Add support for RT5682S and RT1019 card
authorV sujith kumar Reddy <vsujithkumar.reddy@amd.com>
Sat, 22 Jan 2022 19:46:59 +0000 (01:16 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 24 Jan 2022 13:31:58 +0000 (13:31 +0000)
We have new platform with rt5682s as a primary codec and rt1019 as an
amp codec. Add machine struct to register sof audio based sound card
on such Chrome machine.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: V sujith kumar Reddy <vsujithkumar.reddy@amd.com>
Link: https://lore.kernel.org/r/20220122194707.2661026-1-vsujithkumar.reddy@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp-config.c
sound/soc/amd/acp/acp-sof-mach.c

index c9e1c08..5cbc82e 100644 (file)
@@ -111,6 +111,15 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_sof_machines[] = {
                .sof_tplg_filename = "sof-rn-rt5682-max98360.tplg",
        },
        {
+               .id = "RTL5682",
+               .drv_name = "rt5682s-rt1019",
+               .pdata = (void *)&acp_quirk_data,
+               .machine_quirk = snd_soc_acpi_codec_list,
+               .quirk_data = &amp_rt1019,
+               .fw_filename = "sof-rn.ri",
+               .sof_tplg_filename = "sof-rn-rt5682-rt1019.tplg",
+       },
+       {
                .id = "AMDI1019",
                .drv_name = "renoir-dsp",
                .pdata = (void *)&acp_quirk_data,
index 07de461..c1d9650 100644 (file)
@@ -40,6 +40,15 @@ static struct acp_card_drvdata sof_rt5682_max_data = {
        .gpio_spkr_en = EN_SPKR_GPIO_NK,
 };
 
+static struct acp_card_drvdata sof_rt5682s_rt1019_data = {
+       .hs_cpu_id = I2S_SP,
+       .amp_cpu_id = I2S_SP,
+       .dmic_cpu_id = DMIC,
+       .hs_codec_id = RT5682S,
+       .amp_codec_id = RT1019,
+       .dmic_codec_id = DMIC,
+};
+
 static struct acp_card_drvdata sof_rt5682s_max_data = {
        .hs_cpu_id = I2S_SP,
        .amp_cpu_id = I2S_SP,
@@ -126,6 +135,10 @@ static const struct platform_device_id board_ids[] = {
                .name = "rt5682s-max",
                .driver_data = (kernel_ulong_t)&sof_rt5682s_max_data
        },
+       {
+               .name = "rt5682s-rt1019",
+               .driver_data = (kernel_ulong_t)&sof_rt5682s_rt1019_data
+       },
        { }
 };
 static struct platform_driver acp_asoc_audio = {
@@ -143,4 +156,5 @@ MODULE_DESCRIPTION("ACP chrome SOF audio support");
 MODULE_ALIAS("platform:rt5682-rt1019");
 MODULE_ALIAS("platform:rt5682-max");
 MODULE_ALIAS("platform:rt5682s-max");
+MODULE_ALIAS("platform:rt5682s-rt1019");
 MODULE_LICENSE("GPL v2");