* [PATCH v2] ASoC: Intel: sof_rt5682: Add support for jsl_rt5682_rt1019 @ 2022-08-16 7:54 Sean Hong 2022-08-16 9:55 ` Pierre-Louis Bossart 0 siblings, 1 reply; 4+ messages in thread From: Sean Hong @ 2022-08-16 7:54 UTC (permalink / raw) To: pierre-louis.bossart, perex, tiwai, brent.lu Cc: cezary.rojewski, liam.r.girdwood, peter.ujfalusi, yung-chuan.liao, ranjani.sridharan, kai.vehmanen, broonie, alsa-devel, linux-kernel, Sean Hong This patch adds the driver data for rt5682 support jsl_rt5682_rt1019. Signed-off-by: Sean Hong <sean.hong@quanta.corp-partner.google.com> --- sound/soc/intel/boards/sof_rt5682.c | 9 +++++++++ sound/soc/intel/common/soc-acpi-intel-jsl-match.c | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c index 045965312..3a840f3a9 100644 --- a/sound/soc/intel/boards/sof_rt5682.c +++ b/sound/soc/intel/boards/sof_rt5682.c @@ -1100,6 +1100,15 @@ static const struct platform_device_id board_ids[] = { SOF_RT5682_SSP_AMP(1) | SOF_RT5682_NUM_HDMIDEV(4)), }, + { + .name = "jsl_rt5682_rt1019", + .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | + SOF_RT5682_MCLK_24MHZ | + SOF_RT5682_SSP_CODEC(0) | + SOF_SPEAKER_AMP_PRESENT | + SOF_RT1019_SPEAKER_AMP_PRESENT | + SOF_RT5682_SSP_AMP(1)), + }, { } }; MODULE_DEVICE_TABLE(platform, board_ids); diff --git a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c index b95c4b2cd..e374bf163 100644 --- a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c @@ -29,6 +29,11 @@ static const struct snd_soc_acpi_codecs rt1015p_spk = { .codecs = {"RTL1015"} }; +static struct snd_soc_acpi_codecs rt1019p_spk = { + .num_codecs = 1, + .codecs = {"RTL1019"} +}; + static const struct snd_soc_acpi_codecs mx98360a_spk = { .num_codecs = 1, .codecs = {"MX98360A"} @@ -78,6 +83,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { .quirk_data = &mx98360a_spk, .sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg", }, + { + .comp_ids = &rt5682_rt5682s_hp, + .drv_name = "jsl_rt5682_rt1019", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &rt1019p_spk, + .sof_tplg_filename = "sof-jsl-rt5682-rt1019.tplg", + }, { .id = "10134242", .drv_name = "jsl_cs4242_mx98360a", -- 2.25.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ASoC: Intel: sof_rt5682: Add support for jsl_rt5682_rt1019 2022-08-16 7:54 [PATCH v2] ASoC: Intel: sof_rt5682: Add support for jsl_rt5682_rt1019 Sean Hong @ 2022-08-16 9:55 ` Pierre-Louis Bossart 2022-09-05 8:07 ` Lu, Brent 0 siblings, 1 reply; 4+ messages in thread From: Pierre-Louis Bossart @ 2022-08-16 9:55 UTC (permalink / raw) To: Sean Hong, perex, tiwai, brent.lu Cc: cezary.rojewski, kai.vehmanen, peter.ujfalusi, ranjani.sridharan, linux-kernel, liam.r.girdwood, broonie, alsa-devel, yung-chuan.liao On 8/16/22 09:54, Sean Hong wrote: > This patch adds the driver data for rt5682 support jsl_rt5682_rt1019. > > Signed-off-by: Sean Hong <sean.hong@quanta.corp-partner.google.com> > --- > sound/soc/intel/boards/sof_rt5682.c | 9 +++++++++ > sound/soc/intel/common/soc-acpi-intel-jsl-match.c | 12 ++++++++++++ > 2 files changed, 21 insertions(+) > > diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c > index 045965312..3a840f3a9 100644 > --- a/sound/soc/intel/boards/sof_rt5682.c > +++ b/sound/soc/intel/boards/sof_rt5682.c > @@ -1100,6 +1100,15 @@ static const struct platform_device_id board_ids[] = { > SOF_RT5682_SSP_AMP(1) | > SOF_RT5682_NUM_HDMIDEV(4)), > }, > + { > + .name = "jsl_rt5682_rt1019", > + .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | > + SOF_RT5682_MCLK_24MHZ | I see it's the same setting for all JSL devices but I am having doubts on this MCLK. Is this 24MHz value correct for JSL? It's derived from ICL so in theory the MCLK should be a multiple of 19.2MHz if the root frequency was the oscillator. Is this intentional? > + SOF_RT5682_SSP_CODEC(0) | > + SOF_SPEAKER_AMP_PRESENT | > + SOF_RT1019_SPEAKER_AMP_PRESENT | > + SOF_RT5682_SSP_AMP(1)), > + }, > { } > }; > MODULE_DEVICE_TABLE(platform, board_ids); > diff --git a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c > index b95c4b2cd..e374bf163 100644 > --- a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c > +++ b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c > @@ -29,6 +29,11 @@ static const struct snd_soc_acpi_codecs rt1015p_spk = { > .codecs = {"RTL1015"} > }; > > +static struct snd_soc_acpi_codecs rt1019p_spk = { > + .num_codecs = 1, > + .codecs = {"RTL1019"} > +}; > + > static const struct snd_soc_acpi_codecs mx98360a_spk = { > .num_codecs = 1, > .codecs = {"MX98360A"} > @@ -78,6 +83,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { > .quirk_data = &mx98360a_spk, > .sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg", > }, > + { > + .comp_ids = &rt5682_rt5682s_hp, > + .drv_name = "jsl_rt5682_rt1019", > + .machine_quirk = snd_soc_acpi_codec_list, > + .quirk_data = &rt1019p_spk, > + .sof_tplg_filename = "sof-jsl-rt5682-rt1019.tplg", > + }, > { > .id = "10134242", > .drv_name = "jsl_cs4242_mx98360a", ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v2] ASoC: Intel: sof_rt5682: Add support for jsl_rt5682_rt1019 2022-08-16 9:55 ` Pierre-Louis Bossart @ 2022-09-05 8:07 ` Lu, Brent 2022-09-12 11:49 ` Pierre-Louis Bossart 0 siblings, 1 reply; 4+ messages in thread From: Lu, Brent @ 2022-09-05 8:07 UTC (permalink / raw) To: Pierre-Louis Bossart, Sean Hong, perex@perex.cz, tiwai@suse.com Cc: Rojewski, Cezary, kai.vehmanen@linux.intel.com, peter.ujfalusi@linux.intel.com, ranjani.sridharan@linux.intel.com, linux-kernel@vger.kernel.org, liam.r.girdwood@linux.intel.com, broonie@kernel.org, alsa-devel@alsa-project.org, yung-chuan.liao@linux.intel.com > On 8/16/22 09:54, Sean Hong wrote: > > This patch adds the driver data for rt5682 support jsl_rt5682_rt1019. > > > > Signed-off-by: Sean Hong <sean.hong@quanta.corp-partner.google.com> > > --- > > sound/soc/intel/boards/sof_rt5682.c | 9 +++++++++ > > sound/soc/intel/common/soc-acpi-intel-jsl-match.c | 12 ++++++++++++ > > 2 files changed, 21 insertions(+) > > > > diff --git a/sound/soc/intel/boards/sof_rt5682.c > > b/sound/soc/intel/boards/sof_rt5682.c > > index 045965312..3a840f3a9 100644 > > --- a/sound/soc/intel/boards/sof_rt5682.c > > +++ b/sound/soc/intel/boards/sof_rt5682.c > > @@ -1100,6 +1100,15 @@ static const struct platform_device_id > board_ids[] = { > > SOF_RT5682_SSP_AMP(1) | > > SOF_RT5682_NUM_HDMIDEV(4)), > > }, > > + { > > + .name = "jsl_rt5682_rt1019", > > + .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | > > + SOF_RT5682_MCLK_24MHZ | > > I see it's the same setting for all JSL devices but I am having doubts on this > MCLK. Is this 24MHz value correct for JSL? It's derived from ICL so in theory > the MCLK should be a multiple of 19.2MHz if the root frequency was the > oscillator. > > Is this intentional? > I've checked some internal wiki page and sof git log. It seems the first amp enabled on JSL is max98373 running in TDM 4 slot 100fs so 24MHz MCLK seems to be a reasonable choice. The commis is 5340225a7 ("topology: Add JSL da7219+max98373 support") +# SSP 1 (ID: 0) +DAI_CONFIG(SSP, SPK_INDEX, 0, SPK_NAME, + SSP_CONFIG(DSP_B, SSP_CLOCK(mclk, 24000000, codec_mclk_in), + SSP_CLOCK(bclk, 4800000, codec_slave), + SSP_CLOCK(fsync, 48000, codec_slave), + SSP_TDM(4, 25, 3, 240), + SSP_CONFIG_DATA(SSP, SPK_INDEX, 16))) I've also tested 19.2MHz on JSL boards and it also works. 1K sinetone playback sounds ok. Since JSL boards are using 2.304 MHz bclk for max98360a and 3.072 MHz bclk for alc1015 now, changing to 19.2 MHz mclk seems no benefit. Regards, Brent > > + SOF_RT5682_SSP_CODEC(0) | > > + SOF_SPEAKER_AMP_PRESENT | > > + > SOF_RT1019_SPEAKER_AMP_PRESENT | > > + SOF_RT5682_SSP_AMP(1)), > > + }, > > { } > > }; > > MODULE_DEVICE_TABLE(platform, board_ids); diff --git > > a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c > > b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c > > index b95c4b2cd..e374bf163 100644 > > --- a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c > > +++ b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c > > @@ -29,6 +29,11 @@ static const struct snd_soc_acpi_codecs rt1015p_spk > = { > > .codecs = {"RTL1015"} > > }; > > > > +static struct snd_soc_acpi_codecs rt1019p_spk = { > > + .num_codecs = 1, > > + .codecs = {"RTL1019"} > > +}; > > + > > static const struct snd_soc_acpi_codecs mx98360a_spk = { > > .num_codecs = 1, > > .codecs = {"MX98360A"} > > @@ -78,6 +83,13 @@ struct snd_soc_acpi_mach > snd_soc_acpi_intel_jsl_machines[] = { > > .quirk_data = &mx98360a_spk, > > .sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg", > > }, > > + { > > + .comp_ids = &rt5682_rt5682s_hp, > > + .drv_name = "jsl_rt5682_rt1019", > > + .machine_quirk = snd_soc_acpi_codec_list, > > + .quirk_data = &rt1019p_spk, > > + .sof_tplg_filename = "sof-jsl-rt5682-rt1019.tplg", > > + }, > > { > > .id = "10134242", > > .drv_name = "jsl_cs4242_mx98360a", ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ASoC: Intel: sof_rt5682: Add support for jsl_rt5682_rt1019 2022-09-05 8:07 ` Lu, Brent @ 2022-09-12 11:49 ` Pierre-Louis Bossart 0 siblings, 0 replies; 4+ messages in thread From: Pierre-Louis Bossart @ 2022-09-12 11:49 UTC (permalink / raw) To: Lu, Brent, Sean Hong, perex@perex.cz, tiwai@suse.com Cc: Rojewski, Cezary, kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, ranjani.sridharan@linux.intel.com, linux-kernel@vger.kernel.org, liam.r.girdwood@linux.intel.com, broonie@kernel.org, alsa-devel@alsa-project.org, peter.ujfalusi@linux.intel.com On 9/5/22 10:07, Lu, Brent wrote: > >> On 8/16/22 09:54, Sean Hong wrote: >>> This patch adds the driver data for rt5682 support jsl_rt5682_rt1019. >>> >>> Signed-off-by: Sean Hong <sean.hong@quanta.corp-partner.google.com> >>> --- >>> sound/soc/intel/boards/sof_rt5682.c | 9 +++++++++ >>> sound/soc/intel/common/soc-acpi-intel-jsl-match.c | 12 ++++++++++++ >>> 2 files changed, 21 insertions(+) >>> >>> diff --git a/sound/soc/intel/boards/sof_rt5682.c >>> b/sound/soc/intel/boards/sof_rt5682.c >>> index 045965312..3a840f3a9 100644 >>> --- a/sound/soc/intel/boards/sof_rt5682.c >>> +++ b/sound/soc/intel/boards/sof_rt5682.c >>> @@ -1100,6 +1100,15 @@ static const struct platform_device_id >> board_ids[] = { >>> SOF_RT5682_SSP_AMP(1) | >>> SOF_RT5682_NUM_HDMIDEV(4)), >>> }, >>> + { >>> + .name = "jsl_rt5682_rt1019", >>> + .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | >>> + SOF_RT5682_MCLK_24MHZ | >> >> I see it's the same setting for all JSL devices but I am having doubts on this >> MCLK. Is this 24MHz value correct for JSL? It's derived from ICL so in theory >> the MCLK should be a multiple of 19.2MHz if the root frequency was the >> oscillator. >> >> Is this intentional? >> > > I've checked some internal wiki page and sof git log. It seems the first amp enabled > on JSL is max98373 running in TDM 4 slot 100fs so 24MHz MCLK seems to be a > reasonable choice. The commis is 5340225a7 ("topology: Add JSL da7219+max98373 support") > > +# SSP 1 (ID: 0) > +DAI_CONFIG(SSP, SPK_INDEX, 0, SPK_NAME, > + SSP_CONFIG(DSP_B, SSP_CLOCK(mclk, 24000000, codec_mclk_in), > + SSP_CLOCK(bclk, 4800000, codec_slave), > + SSP_CLOCK(fsync, 48000, codec_slave), > + SSP_TDM(4, 25, 3, 240), > + SSP_CONFIG_DATA(SSP, SPK_INDEX, 16))) > > I've also tested 19.2MHz on JSL boards and it also works. 1K sinetone playback sounds ok. > Since JSL boards are using 2.304 MHz bclk for max98360a and 3.072 MHz bclk for alc1015 now, > changing to 19.2 MHz mclk seems no benefit. Functionally there should be no difference, but the 24 MHz MCLK can only be created on JSL from the 96 MHz HDaudio PLL while the 19.2 MHz can be divided from the oscillator. I guess it's too late to optimize now that the topology files are in use so here is my Ack: Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> but that's a clear miss in the topology reviews. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-12 12:01 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-08-16 7:54 [PATCH v2] ASoC: Intel: sof_rt5682: Add support for jsl_rt5682_rt1019 Sean Hong 2022-08-16 9:55 ` Pierre-Louis Bossart 2022-09-05 8:07 ` Lu, Brent 2022-09-12 11:49 ` Pierre-Louis Bossart
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox