ASoC: Intel: sof_rt5682: Add ALC1015Q-VB speaker amp support
Subsystems (3)
PATCH v3 1/1 ASoC: Intel: sof_rt5682: Add ALC1015Q-VB speaker amp support
This patch adds jsl_rt5682_rt1015p which supports the RT5682 headset codec and ALC1015Q-VB speaker amplifier combination on JasperLake platform.
This driver also supports ALC1015Q-CG if running in auto-mode. Following table shows the audio interface support of the two amplifiers.
| ALC1015Q-CG | ALC1015Q-VB
=====================================
I2C | Yes | No
Auto-mode | 48K, 64fs | 16k, 32fs
| 48k, 32fs
| 48k, 64fs--- sound/soc/intel/boards/Kconfig | 1 + sound/soc/intel/boards/sof_realtek_common.c | 105 ++++++++++++++++++ sound/soc/intel/boards/sof_realtek_common.h | 7 ++ sound/soc/intel/boards/sof_rt5682.c | 19 +++- .../intel/common/soc-acpi-intel-jsl-match.c | 13 +++ 5 files changed, 143 insertions(+), 2 deletions(-)
sound/soc/intel/boards/Kconfig +1 -0
@@ -457,6 +457,7 @@ config SND_SOC_INTEL_SOF_RT5682_MACH select SND_SOC_MAX98373_I2C select SND_SOC_RT1011 select SND_SOC_RT1015 + select SND_SOC_RT1015P select SND_SOC_RT5682_I2C select SND_SOC_DMIC select SND_SOC_HDAC_HDMI
sound/soc/intel/boards/sof_realtek_common.c +105 -0
114 lines not on this page · raw message
sound/soc/intel/boards/sof_realtek_common.h +7 -0
@@ -21,4 +21,11 @@void sof_rt1011_dai_link (struct snd_soc_dai_link *link);void sof_rt1011_codec_conf (struct snd_soc_card *card); +#define RT1015P_CODEC_DAI "HiFi" +#define RT1015P_DEV0_NAME "RTL1015:00" +#define RT1015P_DEV1_NAME "RTL1015:01" + +void sof_rt1015p_dai_link (struct snd_soc_dai_link *link); +void sof_rt1015p_codec_conf (struct snd_soc_card *card); +#endif /* __SOF_REALTEK_COMMON_H */
sound/soc/intel/boards/sof_rt5682.c +17 -2
@@ -45,8 +45,9 @@#define SOF_RT1011_SPEAKER_AMP_PRESENT BIT(13)#define SOF_RT1015_SPEAKER_AMP_PRESENT BIT(14)#define SOF_RT1015_SPEAKER_AMP_100FS BIT(15) -#define SOF_MAX98373_SPEAKER_AMP_PRESENT BIT(16) -#define SOF_MAX98360A_SPEAKER_AMP_PRESENT BIT(17) +#define SOF_RT1015P_SPEAKER_AMP_PRESENT BIT(16) +#define SOF_MAX98373_SPEAKER_AMP_PRESENT BIT(17) +#define SOF_MAX98360A_SPEAKER_AMP_PRESENT BIT(18)/* Default: MCLK on, MCLK 19.2M, SSP0 */ static unsigned long sof_rt5682_quirk = SOF_RT5682_MCLK_EN |
@@ -723,6 +724,8 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].num_codecs =ARRAY_SIZE (rt1015_components); links[id].init = speaker_codec_init_lr; links[id].ops = &sof_rt1015_ops; + }else if (sof_rt5682_quirk &SOF_RT1015P_SPEAKER_AMP_PRESENT ) { +sof_rt1015p_dai_link (&links[id]); }else if (sof_rt5682_quirk &SOF_MAX98373_SPEAKER_AMP_PRESENT ) { links[id].codecs = max_98373_components;
@@ -851,6 +854,8 @@ static int sof_audio_probe(struct platform_device *pdev)sof_max98373_codec_conf (&sof_audio_card_rt5682); else if (sof_rt5682_quirk & SOF_RT1011_SPEAKER_AMP_PRESENT) sof_rt1011_codec_conf(&sof_audio_card_rt5682); + else if (sof_rt5682_quirk & SOF_RT1015P_SPEAKER_AMP_PRESENT) + sof_rt1015p_codec_conf(&sof_audio_card_rt5682); dai_links = sof_card_dai_links_create(&pdev->dev, ssp_codec, ssp_amp, dmic_be_num, hdmi_num);
@@ -940,6 +945,15 @@ static const struct platform_device_id board_ids[] = {SOF_RT5682_SSP_AMP (1 ) | SOF_RT5682_NUM_HDMIDEV(4)), }, + { + .name = "jsl_rt5682_rt1015p", + .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | +SOF_RT5682_MCLK_24MHZ | +SOF_RT5682_SSP_CODEC (0 ) | +SOF_SPEAKER_AMP_PRESENT | +SOF_RT1015P_SPEAKER_AMP_PRESENT | + SOF_RT5682_SSP_AMP(1)), + }, { } };
@@ -966,3 +980,4 @@ MODULE_ALIAS("platform:tgl_max98373_rt5682");MODULE_ALIAS ("platform:jsl_rt5682_max98360a" );MODULE_ALIAS ("platform:cml_rt1015_rt5682" );MODULE_ALIAS ("platform:tgl_rt1011_rt5682" ); +MODULE_ALIAS ("platform:jsl_rt5682_rt1015p" );
sound/soc/intel/common/soc-acpi-intel-jsl-match.c +13 -0
@@ -19,6 +19,11 @@ static struct snd_soc_acpi_codecs rt1015_spk = { .codecs = {"10EC1015"} }; +static struct snd_soc_acpi_codecs rt1015p_spk = { + .num_codecs =1 , + .codecs = {"RTL1015" } +}; +static struct snd_soc_acpi_codecs mx98360a_spk = { .num_codecs =1 , .codecs = {"MX98360A" }
@@ -52,6 +57,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { .quirk_data = &rt1015_spk, .sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg", }, + { + .id = "10EC5682", + .drv_name = "jsl_rt5682_rt1015p", + .sof_fw_filename = "sof-jsl.ri", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &rt1015p_spk, + .sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg", + }, { .id = "10EC5682", .drv_name = "jsl_rt5682_max98360a",
Signature · 1 line
2.17.1
Quoted 8 lines · Brent Lu
This patch adds
jsl_rt5682_rt1015pwhich supports the RT5682 headset codec and ALC1015Q-VB speaker amplifier combination on JasperLake platform.This driver also supports ALC1015Q-CG if running in auto-mode. Following table shows the audio interface support of the two amplifiers.
Quoted 8 lines
| ALC1015Q-CG | ALC1015Q-VB ===================================== I2C | Yes | No Auto-mode | 48K, 64fs | 16k, 32fs | 48k, 32fs | 48k, 64fsSigned-off-by Brent Lu <[email protected]>
The code is looks fine, but Jack Yu added a separate patch that makes RTL1019 equivalent to RTL1015, so should this patch also handle the RTL1019 case?
Quoted 4 lines
The code is looks fine, but Jack Yu added a separate patch that makes RTL1019 equivalent to RTL1015, so should this patch also handle the RTL1019 case?
The topology used by this machine driver is using 48k, 64fs I2S format. RT1019 needs to support this configuration. Not sure if RT1019 could support that.
Regards,
Brent
Quoted 8 lines
Quoted 3 lines
The code is looks fine, but Jack Yu added a separate patch that makes RTL1019 equivalent to RTL1015, so should this patch also handle the RTL1019 case?
The topology used by this machine driver is using 48k, 64fs I2S format. RT1019 needs to support this configuration. Not sure if RT1019 could support that.
Yes, RT1019 supports 48k, 64fs I2S format.
Update more ALC1019 sample rate
16K/44.1K/48K/96K
32fs/64fs
I2S format
-----Original Message-----
From: Jack Yu <[email protected]>
Sent: Thursday, March 18, 2021 9:22 AM
To: Lu, Brent <[email protected]>; Pierre-Louis Bossart <[email protected]>; [email protected]; [email protected] [陳建宏] <[email protected]>
Cc: Oder Chiou <[email protected]>; Liam Girdwood <[email protected]>; Mark Brown <[email protected]>; Jaroslav Kysela <[email protected]>; Takashi Iwai <[email protected]>; Rojewski, Cezary <[email protected]>; Jie Yang <[email protected]>; Kai Vehmanen <[email protected]>; Guennadi Liakhovetski <[email protected]>; Rander Wang <[email protected]>; Zhi, Yong <[email protected]>; Libin Yang <[email protected]>; Ranjani Sridharan <[email protected]>; Nujella, Sathyanarayana <[email protected]>; R, Dharageswari <[email protected]>; Kuninori Morimoto <[email protected]>; Fred Oh <[email protected]>; Tzung-Bi Shih <[email protected]>; [email protected]
Subject: RE: [PATCH v3] ASoC: Intel: sof_rt5682: Add ALC1015Q-VB speaker amp support
Quoted 9 lines
Quoted 4 lines
The code is looks fine, but Jack Yu added a separate patch that makes
RTL1019 equivalent to RTL1015, so should this patch also handle the RTL1019 case?The topology used by this machine driver is using 48k, 64fs I2S format. RT1019 needs to support this configuration. Not sure if RT1019 could support that.
Yes, RT1019 supports 48k, 64fs I2S format.
Quoted 15 lines
Quoted 15 lines
This patch adds
jsl_rt5682_rt1015pwhich supports the RT5682 headset codec and ALC1015Q-VB speaker amplifier combination on JasperLake platform.This driver also supports ALC1015Q-CG if running in auto-mode. Following table shows the audio interface support of the two amplifiers.
| ALC1015Q-CG | ALC1015Q-VB ===================================== I2C | Yes | No Auto-mode | 48K, 64fs | 16k, 32fs | 48k, 32fs | 48k, 64fs
Quoted 6 lines
Quoted 1 line
Signed-off-by Brent Lu <[email protected]>The code is looks fine, but Jack Yu added a separate patch that makes RTL1019 equivalent to RTL1015, so should this patch also handle the RTL1019 case?
For rt1019 non-i2c mode (auto mode), it uses the sdb pin to enable amp, the same as rt1015 non-i2c mode, therefore we propose rt1019(auto mode) to use rt1015p instead of adding a new driver for it.
Pierre-Louis Bossart
Acked-byQuoted 15 lines · Jack Yu
Quoted 15 lines
Quoted 15 lines
This patch adds
jsl_rt5682_rt1015pwhich supports the RT5682 headset codec and ALC1015Q-VB speaker amplifier combination on JasperLake platform.This driver also supports ALC1015Q-CG if running in auto-mode. Following table shows the audio interface support of the two amplifiers.
| ALC1015Q-CG | ALC1015Q-VB ===================================== I2C | Yes | No Auto-mode | 48K, 64fs | 16k, 32fs | 48k, 32fs | 48k, 64fs
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Signed-off-by Brent Lu <[email protected]>The code is looks fine, but Jack Yu added a separate patch that makes RTL1019 equivalent to RTL1015, so should this patch also handle the RTL1019 case?
For rt1019 non-i2c mode (auto mode), it uses the sdb pin to enable amp, the same as rt1015 non-i2c mode, therefore we propose rt1019(auto mode) to use rt1015p instead of adding a new driver for it.
ok, that's fine.
Mark Brown
maintainerQuoted 9 lines · Brent Lu
This patch adds
jsl_rt5682_rt1015pwhich supports the RT5682 headset codec and ALC1015Q-VB speaker amplifier combination on JasperLake platform.This driver also supports ALC1015Q-CG if running in auto-mode. Following table shows the audio interface support of the two amplifiers.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: Intel: sof_rt5682: Add ALC1015Q-VB speaker amp support
commit: ad83b1adc58d6693036fd330d6af95a33564eaae
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark