ASoC: Intel: add sof-nau8825 machine driver
Subsystems (3)
PATCH v2 1/1 ASoC: Intel: add sof-nau8825 machine driver
From: David Lin <[email protected]>
The machine driver is a generic machine driver for SOF with nau8825 codec w or w/o speaker additionally. Depending on the SOC HDMI, DMIC, Bluetooth offload support are added dynamically.
Only add information related to SOF since the machine driver was only tested with SOF.
There are currently 4 i2s machine variants of ADL.
This supports the headphone NUA8825(SSP0) alone or with smart or dumb speakers.
Board 2,3,4 use SSP2 for Bluetooth offload support except board 1.
Board 1 : NAU8825 + RT1019P(SSP2)
Board 2 : NAU8825 + MAX98373(SSP1)
Board 3 : NAU8825 + MAX98360A(SSP1)
Board 4 : NAU8825
---
1. remove hdac_hdmi relevant codes support
2. remove duplicated max_98360a_dai_link calls. Instead of checking no_amp condition
3. alter module license name to "GPL"
4. due to rt1019 non-i2c mode, so change to SND_SOC_RT1015P in KConfig
--- sound/soc/intel/boards/Kconfig | 19 + sound/soc/intel/boards/Makefile | 2 + sound/soc/intel/boards/sof_nau8825.c | 651 ++++++++++++++++++ .../intel/common/soc-acpi-intel-adl-match.c | 35 + 4 files changed, 707 insertions(+) create mode 100644 sound/soc/intel/boards/sof_nau8825.c
sound/soc/intel/boards/Kconfig +19 -0
@@ -526,6 +526,25 @@ config SND_SOC_INTEL_SOF_ES8336_MACH Say Y if you have such a device. If unsure select "N". +config SND_SOC_INTEL_SOF_NAU8825_MACH + tristate "SOF with nau8825 codec in I2S Mode" + depends on I2C && ACPI && GPIOLIB + depends on ((SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC) &&\ + (MFD_INTEL_LPSS || COMPILE_TEST)) + select SND_SOC_NAU8825 + select SND_SOC_RT1015P + select SND_SOC_MAX98373_I2C + select SND_SOC_MAX98357A + select SND_SOC_DMIC + select SND_SOC_HDAC_HDMI + select SND_SOC_INTEL_HDA_DSP_COMMON + select SND_SOC_INTEL_SOF_MAXIM_COMMON + help + This adds support for ASoC machine driver for SOF platforms + with nau8825 codec. + Say Y if you have such a device. + If unsure select "N". + endif ## SND_SOC_SOF_HDA_LINK || SND_SOC_SOF_BAYTRAIL if (SND_SOC_SOF_COMETLAKE && SND_SOC_SOF_HDA_LINK)
sound/soc/intel/boards/Makefile +2 -0
@@ -22,6 +22,7 @@ snd-soc-sst-byt-cht-nocodec-objs := bytcht_nocodec.o snd-soc-sof_rt5682-objs := sof_rt5682.o sof_realtek_common.o snd-soc-sof_cs42l42-objs := sof_cs42l42.o snd-soc-sof_es8336-objs := sof_es8336.o +snd-soc-sof_nau8825-objs := sof_nau8825.o sof_realtek_common.o snd-soc-cml_rt1011_rt5682-objs := cml_rt1011_rt5682.o snd-soc-kbl_da7219_max98357a-objs := kbl_da7219_max98357a.o snd-soc-kbl_da7219_max98927-objs := kbl_da7219_max98927.o
@@ -44,6 +45,7 @@ snd-soc-sof-sdw-objs += sof_sdw.o \ obj-$(CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH) += snd-soc-sof_rt5682.o obj-$(CONFIG_SND_SOC_INTEL_SOF_CS42L42_MACH) += snd-soc-sof_cs42l42.o obj-$(CONFIG_SND_SOC_INTEL_SOF_ES8336_MACH) += snd-soc-sof_es8336.o +obj-$(CONFIG_SND_SOC_INTEL_SOF_NAU8825_MACH) += snd-soc-sof_nau8825.o obj-$(CONFIG_SND_SOC_INTEL_HASWELL_MACH) += snd-soc-sst-haswell.o obj-$(CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON) += snd-soc-sst-bxt-da7219_max98357a.o obj-$(CONFIG_SND_SOC_INTEL_BXT_RT298_MACH) += snd-soc-sst-bxt-rt298.o
sound/soc/intel/boards/sof_nau8825.c new file +651 -0
651 lines not on this page · raw message
sound/soc/intel/common/soc-acpi-intel-adl-match.c +35 -0
@@ -285,6 +285,11 @@ static const struct snd_soc_acpi_codecs adl_max98360a_amp = { .codecs = {"MX98360A"} }; +static const struct snd_soc_acpi_codecs adl_rt1019p_amp = { + .num_codecs =1 , + .codecs = {"RTL1019" } +}; +struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { { .id ="10EC5682" ,
@@ -310,6 +315,36 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { .sof_fw_filename = "sof-adl.ri", .sof_tplg_filename = "sof-adl-max98360a-rt5682.tplg", }, + { + .id = "10508825", + .drv_name = "adl_rt1019p_nau8825", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &adl_rt1019p_amp, + .sof_fw_filename = "sof-adl.ri", + .sof_tplg_filename = "sof-adl-rt1019-nau8825.tplg", + }, + { + .id = "10508825", + .drv_name = "adl_max98373_nau8825", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &adl_max98373_amp, + .sof_fw_filename = "sof-adl.ri", + .sof_tplg_filename = "sof-adl-max98373-nau8825.tplg", + }, + { + .id = "10508825", + .drv_name = "adl_mx98360a_nau8825", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &adl_max98360a_amp, + .sof_fw_filename = "sof-adl.ri", + .sof_tplg_filename = "sof-adl-mx98360a-nau8825.tplg", + }, + { + .id = "10508825", + .drv_name = "sof_nau8825", + .sof_fw_filename = "sof-adl.ri", + .sof_tplg_filename = "sof-adl-nau8825.tplg", + }, {}, }; EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_machines);
Signature · 1 line
2.20.1
Quoted 22 lines · Mac Chiang
From: David Lin <[email protected]>
The machine driver is a generic machine driver for SOF with nau8825 codec w or w/o speaker additionally. Depending on the SOC HDMI, DMIC, Bluetooth offload support are added dynamically.
Only add information related to SOF since the machine driver was only tested with SOF.
There are currently 4 i2s machine variants of ADL.
This supports the headphone NUA8825(SSP0) alone or with smart or dumb speakers.
Board 2,3,4 use SSP2 for Bluetooth offload support except board 1.Board 1 : NAU8825 + RT1019P(SSP2)
Board 2 : NAU8825 + MAX98373(SSP1)
Board 3 : NAU8825 + MAX98360A(SSP1)
Board 4 : NAU8825Signed-off-by David Lin <[email protected]>Co-developed-by Mac Chiang <[email protected]>Signed-off-by Mac Chiang <[email protected]>
Quoted 6 lines
---
1. removehdac_hdmirelevant codes support
2. remove duplicatedmax_98360a_dai_linkcalls. Instead of checkingno_ampcondition
3. alter module license name to "GPL"
4. due to rt1019 non-i2c mode, so change toSND_SOC_RT1015Pin KConfig
---
Looks good to me, thanks.
Quoted 39 lines
-----Original Message-----
From: Pierre-Louis Bossart <[email protected]>
Sent: Thursday, November 4, 2021 12:37 AM
To: Chiang, Mac <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Gopal, Vamshi Krishna <[email protected]>; M R, Sathya Prakash <[email protected]>; Liao, Bard <[email protected]>
Subject: Re: [PATCH v2] ASoC: Intel: add sof-nau8825 machine driverQuoted 19 lines · Mac Chiang
From: David Lin <[email protected]>
The machine driver is a generic machine driver for SOF with nau8825 codec w or w/o speaker additionally. Depending on the SOC HDMI, DMIC, Bluetooth offload support are added dynamically.
Only add information related to SOF since the machine driver was only tested with SOF.
There are currently 4 i2s machine variants of ADL.
This supports the headphone NUA8825(SSP0) alone or with smart or dumb speakers.
Board 2,3,4 use SSP2 for Bluetooth offload support except board 1.Board 1 : NAU8825 + RT1019P(SSP2)
Board 2 : NAU8825 + MAX98373(SSP1)
Board 3 : NAU8825 + MAX98360A(SSP1)
Board 4 : NAU8825Quoted 6 lines
Signed-off-by David Lin <[email protected]>Co-developed-by Mac Chiang <[email protected]>Signed-off-by Mac Chiang <[email protected]>---
1. removehdac_hdmirelevant codes support
2. remove duplicatedmax_98360a_dai_linkcalls. Instead of checking
no_ampcondition
Quoted 8 lines
Quoted 4 lines
3. alter module license name to "GPL"
4. due to rt1019 non-i2c mode, so change toSND_SOC_RT1015Pin
KConfig
---Looks good to me, thanks.
Add Mark for comments, CC: Mark Brown <[email protected]>
Or I need to RESEND V2 with Acked-by:... in comment messages for your applying?
Mark Brown
maintainerQuoted 2 lines · Mac
Add Mark for comments, CC: Mark Brown <[email protected]>
Or I need to RESEND V2 with Acked-by:... in comment messages for your applying?
As documented in submitting-patches.rst please send patches to the maintainers for the code you would like to change. The normal kernel workflow is that people apply patches from their inboxes, if they aren't copied they are likely to not see the patch at all and it is much more difficult to apply patches.