[PATCH v2 2/5] ASoC: samsung: i2s: add support for FSD I2S

Padmanabhan Rajanbabu p.rajanbabu at samsung.com
Mon Jan 9 05:05:58 CET 2023



> -----Original Message-----
> From: Mark Brown [mailto:broonie at kernel.org]
> Sent: 03 January 2023 11:39 PM
> To: Padmanabhan Rajanbabu <p.rajanbabu at samsung.com>
> Cc: lgirdwood at gmail.com; robh+dt at kernel.org;
> krzysztof.kozlowski+dt at linaro.org; s.nawrocki at samsung.com;
> perex at perex.cz; tiwai at suse.com; pankaj.dubey at samsung.com;
> alim.akhtar at samsung.com; rcsekar at samsung.com;
> aswani.reddy at samsung.com; alsa-devel at alsa-project.org;
> devicetree at vger.kernel.org; linux-kernel at vger.kernel.org; linux-samsung-
> soc at vger.kernel.org
> Subject: Re: [PATCH v2 2/5] ASoC: samsung: i2s: add support for FSD I2S
> 
> On Tue, Jan 03, 2023 at 10:26:10AM +0530, Padmanabhan Rajanbabu wrote:
> 
> > +void fsd_i2s_fixup_early(struct snd_pcm_substream *substream,
> > +		struct snd_soc_dai *dai)
> > +{
> > +	struct snd_soc_pcm_runtime *rtd =
> asoc_substream_to_rtd(substream);
> > +	struct i2s_dai *i2s = to_info(asoc_rtd_to_cpu(rtd, 0));
> > +	struct i2s_dai *other = get_other_dai(i2s);
> > +
> > +	if (!is_opened(other)) {
> > +		i2s_set_sysclk(dai, SAMSUNG_I2S_CDCLK, 192,
> SND_SOC_CLOCK_OUT);
> > +		i2s_set_sysclk(dai, SAMSUNG_I2S_OPCLK, 0,
> MOD_OPCLK_PCLK);
> > +	}
> > +}
> 
> This looks like we're just hard coding to 192kHz?

Not actually. The value 192 being passed is for the RFS divider
based on which the Root clock source is divided to generate bit-clock
and frame-clock in master mode.

But, FSD SoC is utilizing the Exynos7-I2S controller in slave
mode, where bit-clock and frame-clock is sourced by the codec.
Therefore the sampling of data happens with codec clock source and
not based on the clock source from RCLK. However, we still need RFS and
BFS configured to default value for the proper operation of the controller.

The current operation being performed above is to change the Codec
clock direction to "out", so that codec will use this clock source to
generate bit clock and frame clock from its own PLL.

I'll make the changes in the next patch set to pass 0 instead of 192 here,
so that RFS and BFS will be configured to default value in config_setup
function.

Thanks,
Padmanabhan R.



More information about the Alsa-devel mailing list