aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2017-12-19 20:37:54 -0500
committerMark Brown <broonie@kernel.org>2017-12-22 10:57:40 -0500
commit0e2d95aadd5c3bddfa4145b964527df12d89ec6a (patch)
treeb59884ac1eb78cdd021061854a83af223713dcd6
parentac769ab17282e4ca1b95fdc22c58975cba8f3619 (diff)
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: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/wm2200.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c
index 2d03db6efb79..5c2f5727244d 100644
--- a/sound/soc/codecs/wm2200.c
+++ b/sound/soc/codecs/wm2200.c
@@ -98,6 +98,8 @@ struct wm2200_priv {
98 98
99 int rev; 99 int rev;
100 int sysclk; 100 int sysclk;
101
102 unsigned int symmetric_rates:1;
101}; 103};
102 104
103#define WM2200_DSP_RANGE_BASE (WM2200_MAX_REGISTER + 1) 105#define WM2200_DSP_RANGE_BASE (WM2200_MAX_REGISTER + 1)
@@ -1758,7 +1760,7 @@ static int wm2200_hw_params(struct snd_pcm_substream *substream,
1758 lrclk = bclk_rates[bclk] / params_rate(params); 1760 lrclk = bclk_rates[bclk] / params_rate(params);
1759 dev_dbg(codec->dev, "Setting %dHz LRCLK\n", bclk_rates[bclk] / lrclk); 1761 dev_dbg(codec->dev, "Setting %dHz LRCLK\n", bclk_rates[bclk] / lrclk);
1760 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK || 1762 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK ||
1761 dai->symmetric_rates) 1763 wm2200->symmetric_rates)
1762 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_7, 1764 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_7,
1763 WM2200_AIF1RX_BCPF_MASK, lrclk); 1765 WM2200_AIF1RX_BCPF_MASK, lrclk);
1764 else 1766 else
@@ -2059,13 +2061,14 @@ static int wm2200_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
2059static int wm2200_dai_probe(struct snd_soc_dai *dai) 2061static int wm2200_dai_probe(struct snd_soc_dai *dai)
2060{ 2062{
2061 struct snd_soc_codec *codec = dai->codec; 2063 struct snd_soc_codec *codec = dai->codec;
2064 struct wm2200_priv *wm2200 = snd_soc_codec_get_drvdata(codec);
2062 unsigned int val = 0; 2065 unsigned int val = 0;
2063 int ret; 2066 int ret;
2064 2067
2065 ret = snd_soc_read(codec, WM2200_GPIO_CTRL_1); 2068 ret = snd_soc_read(codec, WM2200_GPIO_CTRL_1);
2066 if (ret >= 0) { 2069 if (ret >= 0) {
2067 if ((ret & WM2200_GP1_FN_MASK) != 0) { 2070 if ((ret & WM2200_GP1_FN_MASK) != 0) {
2068 dai->symmetric_rates = true; 2071 wm2200->symmetric_rates = true;
2069 val = WM2200_AIF1TX_LRCLK_SRC; 2072 val = WM2200_AIF1TX_LRCLK_SRC;
2070 } 2073 }
2071 } else { 2074 } else {