Unverified Commit 1bd775da authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: add symmetric_ prefix for dai->rate/channels/sample_bits



snd_soc_dai has rate/channels/sample_bits parameter, but it is only valid
if symmetry is being enforced by symmetric_xxx flag on driver.

It is very difficult to know about it from current naming, and easy to
misunderstand it. add symmetric_ prefix for it.

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87zfmd8bnf.wl-kuninori.morimoto.gx@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 725570f9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -449,9 +449,9 @@ struct snd_soc_dai {
	struct snd_soc_dai_stream stream[SNDRV_PCM_STREAM_LAST + 1];

	/* Symmetry data - only valid if symmetry is being enforced */
	unsigned int rate;
	unsigned int channels;
	unsigned int sample_bits;
	unsigned int symmetric_rate;
	unsigned int symmetric_channels;
	unsigned int symmetric_sample_bits;

	/* parent platform/codec */
	struct snd_soc_component *component;
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ static int mtk_dai_pcm_configure(struct snd_pcm_substream *substream,
	unsigned int lrck_inv;
	unsigned int bck_inv;
	unsigned int fmt;
	unsigned int bit_width = dai->sample_bits;
	unsigned int bit_width = dai->symmetric_sample_bits;
	unsigned int val = 0;
	unsigned int mask = 0;
	int fs = 0;
+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ static int mtk_dai_pcm_configure(struct snd_pcm_substream *substream,
	unsigned int lrck_inv;
	unsigned int bck_inv;
	unsigned int fmt;
	unsigned int bit_width = dai->sample_bits;
	unsigned int bit_width = dai->symmetric_sample_bits;
	unsigned int val = 0;
	unsigned int mask = 0;
	int fs = 0;
+3 −3
Original line number Diff line number Diff line
@@ -118,13 +118,13 @@ static int mt8365_dai_configure_dmic(struct mtk_base_afe *afe,
	unsigned int clk_phase_sel_ch1 = dmic_data->clk_phase_sel_ch1;
	unsigned int clk_phase_sel_ch2 = dmic_data->clk_phase_sel_ch2;
	unsigned int val = 0;
	unsigned int rate = dai->rate;
	int reg = get_chan_reg(dai->channels);
	unsigned int rate = dai->symmetric_rate;
	int reg = get_chan_reg(dai->symmetric_channels);

	if (reg < 0)
		return -EINVAL;

	dmic_data->dmic_channel = dai->channels;
	dmic_data->dmic_channel = dai->symmetric_channels;

	val |= DMIC_TOP_CON_SDM3_LEVEL_MODE;

+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ static int mt8365_dai_configure_pcm1(struct snd_pcm_substream *substream,
	bool lrck_inv = pcm_priv->lrck_inv;
	bool bck_inv = pcm_priv->bck_inv;
	unsigned int fmt = pcm_priv->format;
	unsigned int bit_width = dai->sample_bits;
	unsigned int bit_width = dai->symmetric_sample_bits;
	unsigned int val = 0;

	if (!slave_mode) {
Loading