Commit 0e2d95aa authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: wm2200: don't use snd_soc_dai::symmetric_rates

wm2200 is the only user of snd_soc_dai::symmetric_rates.
Now, wm2200 is using single DAI on Component.
Thus, wm2200_priv : snd_soc_dai : snd_soc_component are 1 : 1 : 1.
We can replace snd_soc_dai::symmetric_rates on wm2200_priv.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent ac769ab1
...@@ -98,6 +98,8 @@ struct wm2200_priv { ...@@ -98,6 +98,8 @@ struct wm2200_priv {
int rev; int rev;
int sysclk; int sysclk;
unsigned int symmetric_rates:1;
}; };
#define WM2200_DSP_RANGE_BASE (WM2200_MAX_REGISTER + 1) #define WM2200_DSP_RANGE_BASE (WM2200_MAX_REGISTER + 1)
...@@ -1758,7 +1760,7 @@ static int wm2200_hw_params(struct snd_pcm_substream *substream, ...@@ -1758,7 +1760,7 @@ static int wm2200_hw_params(struct snd_pcm_substream *substream,
lrclk = bclk_rates[bclk] / params_rate(params); lrclk = bclk_rates[bclk] / params_rate(params);
dev_dbg(codec->dev, "Setting %dHz LRCLK\n", bclk_rates[bclk] / lrclk); dev_dbg(codec->dev, "Setting %dHz LRCLK\n", bclk_rates[bclk] / lrclk);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK || if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK ||
dai->symmetric_rates) wm2200->symmetric_rates)
snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_7, snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_7,
WM2200_AIF1RX_BCPF_MASK, lrclk); WM2200_AIF1RX_BCPF_MASK, lrclk);
else else
...@@ -2059,13 +2061,14 @@ static int wm2200_set_fll(struct snd_soc_codec *codec, int fll_id, int source, ...@@ -2059,13 +2061,14 @@ static int wm2200_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
static int wm2200_dai_probe(struct snd_soc_dai *dai) static int wm2200_dai_probe(struct snd_soc_dai *dai)
{ {
struct snd_soc_codec *codec = dai->codec; struct snd_soc_codec *codec = dai->codec;
struct wm2200_priv *wm2200 = snd_soc_codec_get_drvdata(codec);
unsigned int val = 0; unsigned int val = 0;
int ret; int ret;
ret = snd_soc_read(codec, WM2200_GPIO_CTRL_1); ret = snd_soc_read(codec, WM2200_GPIO_CTRL_1);
if (ret >= 0) { if (ret >= 0) {
if ((ret & WM2200_GP1_FN_MASK) != 0) { if ((ret & WM2200_GP1_FN_MASK) != 0) {
dai->symmetric_rates = true; wm2200->symmetric_rates = true;
val = WM2200_AIF1TX_LRCLK_SRC; val = WM2200_AIF1TX_LRCLK_SRC;
} }
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment