ASOC : amd: acp :Add Machine driver changes for
Subsystems (3)
cover ASOC : amd: acp :Add Machine driver changes for
Add Machine driver support for nau8825, max98560 and rt5682s,rt1019 combination
This patch set depends on:
--gpio patch --https://patchwork.kernel.org/project/alsa-devel/patch/[email protected]/ --https://patchwork.kernel.org/project/alsa-devel/patch/[email protected]/
V sujith kumar Reddy (2):
ASoC: amd: acp: Add support for nau8825 and max98360 card
ASoC: amd: acp: Add support for rt5682s and rt1019 card with hs
instance
sound/soc/amd/acp-config.c | 18 +++ sound/soc/amd/acp/Kconfig | 1 + sound/soc/amd/acp/acp-mach-common.c | 228 +++++++++++++++++++++++++--- sound/soc/amd/acp/acp-mach.h | 3 + sound/soc/amd/acp/acp-sof-mach.c | 30 ++++ 5 files changed, 263 insertions(+), 17 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/2 ASoC: amd: acp: Add support for nau8825 and max98360 card
We have new platform with nau8825 as a primary codec and max98360 as an amp codec. Add machine struct to register sof audio based sound card on such Chrome machine.
--- sound/soc/amd/acp-config.c | 9 ++ sound/soc/amd/acp/Kconfig | 1 + sound/soc/amd/acp/acp-mach-common.c | 159 ++++++++++++++++++++++++++-- sound/soc/amd/acp/acp-mach.h | 3 + sound/soc/amd/acp/acp-sof-mach.c | 15 +++ 5 files changed, 181 insertions(+), 6 deletions(-)
sound/soc/amd/acp-config.c +9 -0
@@ -138,6 +138,15 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_sof_machines[] = { .fw_filename = "sof-rmb.ri", .sof_tplg_filename = "sof-acp-rmb.tplg", }, + { + .id = "10508825", + .drv_name = "nau8825-max", + .pdata = (void *)&acp_quirk_data, + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &_max, + .fw_filename = "sof-rmb.ri", + .sof_tplg_filename = "sof-acp-rmb.tplg", + }, {}, };EXPORT_SYMBOL (snd_soc_acpi_amd_rmb_sof_machines);
sound/soc/amd/acp/Kconfig +1 -0
@@ -49,6 +49,7 @@ config SND_SOC_AMD_MACH_COMMON select SND_SOC_RT1019 select SND_SOC_MAX98357A select SND_SOC_RT5682S + select SND_SOC_NAU8825 help This option enables common Machine driver module for ACP.
sound/soc/amd/acp/acp-mach-common.c +153 -6
207 lines not on this page · raw message
sound/soc/amd/acp/acp-mach.h +3 -0
@@ -26,6 +26,7 @@ enum be_id {enum cpu_endpoints {NONE =0 , +I2S_HS ,I2S_SP ,I2S_BT ,DMIC ,
@@ -37,6 +38,7 @@ enum codec_endpoints {RT1019 ,MAX98360A ,RT5682S , + NAU8825, }; struct acp_card_drvdata {
@@ -49,6 +51,7 @@ struct acp_card_drvdata {unsigned int dai_fmt;struct clk *wclk;struct clk *bclk; +bool soc_mclk; };int acp_sofdsp_dai_links_create (struct snd_soc_card *card);
sound/soc/amd/acp/acp-sof-mach.c +15 -0
@@ -56,6 +56,16 @@ static struct acp_card_drvdata sof_rt5682s_max_data = { .dmic_codec_id = DMIC, }; +static struct acp_card_drvdata sof_nau8825_data = { + .hs_cpu_id =I2S_HS , + .amp_cpu_id =I2S_HS , + .dmic_cpu_id =DMIC , + .hs_codec_id =NAU8825 , + .amp_codec_id =MAX98360A , + .dmic_codec_id =DMIC , + .soc_mclk = true, +}; +static const struct snd_kcontrol_new acp_controls[] = {SOC_DAPM_PIN_SWITCH ("Headphone Jack" ),SOC_DAPM_PIN_SWITCH ("Headset Mic" ),
@@ -124,6 +134,10 @@ static const struct platform_device_id board_ids[] = { .name = "rt5682s-rt1019", .driver_data = (kernel_ulong_t)&sof_rt5682s_rt1019_data }, + { + .name = "nau8825-max", + .driver_data = (kernel_ulong_t)&sof_nau8825_data + }, { } };static struct platform_driver acp_asoc_audio = {
@@ -142,4 +156,5 @@ MODULE_ALIAS("platform:rt5682-rt1019");MODULE_ALIAS ("platform:rt5682-max" );MODULE_ALIAS ("platform:rt5682s-max" );MODULE_ALIAS ("platform:rt5682s-rt1019" ); +MODULE_ALIAS ("platform:nau8825-max" );MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.25.1
PATCH 2/2 ASoC: amd: acp: Add support for rt5682s and rt1019 card with hs instance
In reply to V sujith kumar ReddyWe 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.
Here we are configuring as a soc mclk master and codec slave.
--- sound/soc/amd/acp-config.c | 9 ++++ sound/soc/amd/acp/acp-mach-common.c | 69 ++++++++++++++++++++++++----- sound/soc/amd/acp/acp-sof-mach.c | 15 +++++++ 3 files changed, 82 insertions(+), 11 deletions(-)
sound/soc/amd/acp-config.c +9 -0
@@ -147,6 +147,15 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_sof_machines[] = { .fw_filename = "sof-rmb.ri", .sof_tplg_filename = "sof-acp-rmb.tplg", }, + { + .id = "RTL5682", + .drv_name = "rt5682s-hs-rt1019", + .pdata = (void *)&acp_quirk_data, + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &_rt1019, + .fw_filename = "sof-rmb.ri", + .sof_tplg_filename = "sof-acp-rmb.tplg", + }, {}, };EXPORT_SYMBOL (snd_soc_acpi_amd_rmb_sof_machines);
sound/soc/amd/acp/acp-mach-common.c +58 -11
124 lines not on this page · raw message
sound/soc/amd/acp/acp-sof-mach.c +15 -0
@@ -66,6 +66,16 @@ static struct acp_card_drvdata sof_nau8825_data = { .soc_mclk = true, }; +static struct acp_card_drvdata sof_rt5682s_hs_rt1019_data = { + .hs_cpu_id =I2S_HS , + .amp_cpu_id =I2S_HS , + .dmic_cpu_id =DMIC , + .hs_codec_id =RT5682S , + .amp_codec_id =RT1019 , + .dmic_codec_id =DMIC , + .soc_mclk = true, +}; +static const struct snd_kcontrol_new acp_controls[] = {SOC_DAPM_PIN_SWITCH ("Headphone Jack" ),SOC_DAPM_PIN_SWITCH ("Headset Mic" ),
@@ -138,6 +148,10 @@ static const struct platform_device_id board_ids[] = { .name = "nau8825-max", .driver_data = (kernel_ulong_t)&sof_nau8825_data }, + { + .name = "rt5682s-hs-rt1019", + .driver_data = (kernel_ulong_t)&sof_rt5682s_hs_rt1019_data + }, { } };static struct platform_driver acp_asoc_audio = {
@@ -157,4 +171,5 @@ MODULE_ALIAS("platform:rt5682-max");MODULE_ALIAS ("platform:rt5682s-max" );MODULE_ALIAS ("platform:rt5682s-rt1019" );MODULE_ALIAS ("platform:nau8825-max" ); +MODULE_ALIAS ("platform:rt5682s-hs-rt1019" );MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.25.1