From: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
To: <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: <Vijendar.Mukunda@amd.com>, <Alexander.Deucher@amd.com>,
<Basavaraj.Hiregoudar@amd.com>, <Sunil-kumar.Dommati@amd.com>,
"Ajit Kumar Pandey" <AjitKumar.Pandey@amd.com>,
kernel test robot <lkp@intel.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, "Takashi Iwai" <tiwai@suse.com>,
V sujith kumar Reddy <vsujithkumar.reddy@amd.com>,
open list <linux-kernel@vger.kernel.org>
Subject: [PATCH v2 2/3] ASoC: amd: acp-legacy: Add legacy card support for new machines
Date: Tue, 22 Feb 2022 18:12:12 +0530 [thread overview]
Message-ID: <20220222124213.721224-3-AjitKumar.Pandey@amd.com> (raw)
In-Reply-To: <20220222124213.721224-1-AjitKumar.Pandey@amd.com>
We have newer renoir platforms with different codecs combinations.
Add struct in legacy machine driver and add to list of supported
renoir machine to support sound card registration on platform with
rt5682s as primary headset codec and max98360 and rt1019 as speaker
amp codec.
This also fixes error reported by kernel robot:
"error: 'EN_SPKR_GPIO_DW' undeclared here"
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
---
sound/soc/amd/acp/acp-legacy-mach.c | 30 +++++++++++++++++++++++++++++
sound/soc/amd/acp/acp-renoir.c | 17 ++++++++++++++++
2 files changed, 47 insertions(+)
diff --git a/sound/soc/amd/acp/acp-legacy-mach.c b/sound/soc/amd/acp/acp-legacy-mach.c
index 50a5aa4d6da9..5d276365d644 100644
--- a/sound/soc/amd/acp/acp-legacy-mach.c
+++ b/sound/soc/amd/acp/acp-legacy-mach.c
@@ -30,6 +30,26 @@ static struct acp_card_drvdata rt5682_rt1019_data = {
.gpio_spkr_en = EN_SPKR_GPIO_GB,
};
+static struct acp_card_drvdata rt5682s_max_data = {
+ .hs_cpu_id = I2S_SP,
+ .amp_cpu_id = I2S_SP,
+ .dmic_cpu_id = DMIC,
+ .hs_codec_id = RT5682S,
+ .amp_codec_id = MAX98360A,
+ .dmic_codec_id = DMIC,
+ .gpio_spkr_en = EN_SPKR_GPIO_NONE,
+};
+
+static struct acp_card_drvdata 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,
+ .gpio_spkr_en = EN_SPKR_GPIO_NONE,
+};
+
static const struct snd_kcontrol_new acp_controls[] = {
SOC_DAPM_PIN_SWITCH("Headphone Jack"),
SOC_DAPM_PIN_SWITCH("Headset Mic"),
@@ -99,6 +119,14 @@ static const struct platform_device_id board_ids[] = {
.name = "acp3xalc56821019",
.driver_data = (kernel_ulong_t)&rt5682_rt1019_data,
},
+ {
+ .name = "acp3xalc5682sm98360",
+ .driver_data = (kernel_ulong_t)&rt5682s_max_data,
+ },
+ {
+ .name = "acp3xalc5682s1019",
+ .driver_data = (kernel_ulong_t)&rt5682s_rt1019_data,
+ },
{ }
};
static struct platform_driver acp_asoc_audio = {
@@ -114,4 +142,6 @@ module_platform_driver(acp_asoc_audio);
MODULE_IMPORT_NS(SND_SOC_AMD_MACH);
MODULE_DESCRIPTION("ACP chrome audio support");
MODULE_ALIAS("platform:acp3xalc56821019");
+MODULE_ALIAS("platform:acp3xalc5682sm98360");
+MODULE_ALIAS("platform:acp3xalc5682s1019");
MODULE_LICENSE("GPL v2");
diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c
index b8dc25a1d31d..35d66454e5a3 100644
--- a/sound/soc/amd/acp/acp-renoir.c
+++ b/sound/soc/amd/acp/acp-renoir.c
@@ -44,6 +44,11 @@ static struct snd_soc_acpi_codecs amp_rt1019 = {
.codecs = {"10EC1019"}
};
+static struct snd_soc_acpi_codecs amp_max = {
+ .num_codecs = 1,
+ .codecs = {"MX98360A"}
+};
+
static struct snd_soc_acpi_mach snd_soc_acpi_amd_acp_machines[] = {
{
.id = "10EC5682",
@@ -51,6 +56,18 @@ static struct snd_soc_acpi_mach snd_soc_acpi_amd_acp_machines[] = {
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &_rt1019,
},
+ {
+ .id = "RTL5682",
+ .drv_name = "acp3xalc5682sm98360",
+ .machine_quirk = snd_soc_acpi_codec_list,
+ .quirk_data = &_max,
+ },
+ {
+ .id = "RTL5682",
+ .drv_name = "acp3xalc5682s1019",
+ .machine_quirk = snd_soc_acpi_codec_list,
+ .quirk_data = &_rt1019,
+ },
{
.id = "AMDI1019",
.drv_name = "renoir-acp",
--
2.25.1
next prev parent reply other threads:[~2022-02-22 12:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220222124213.721224-1-AjitKumar.Pandey@amd.com>
2022-02-22 12:42 ` [PATCH v2 1/3] ASoC: amd: acp: Change card name for Guybrush Machine Ajit Kumar Pandey
2022-02-22 12:42 ` Ajit Kumar Pandey [this message]
2022-02-22 12:42 ` [PATCH v2 3/3] ASoC: amd: acp: Add DMIC machine driver ops Ajit Kumar Pandey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220222124213.721224-3-AjitKumar.Pandey@amd.com \
--to=ajitkumar.pandey@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=vsujithkumar.reddy@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®