aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra/tegra_wm8903.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/tegra/tegra_wm8903.c')
-rw-r--r--sound/soc/tegra/tegra_wm8903.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
index b12b1fd1cb6e..988ff504dd59 100644
--- a/sound/soc/tegra/tegra_wm8903.c
+++ b/sound/soc/tegra/tegra_wm8903.c
@@ -72,7 +72,7 @@ static int tegra_wm8903_hw_params(struct snd_pcm_substream *substream,
72 struct snd_soc_codec *codec = rtd->codec; 72 struct snd_soc_codec *codec = rtd->codec;
73 struct snd_soc_card *card = codec->card; 73 struct snd_soc_card *card = codec->card;
74 struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); 74 struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card);
75 int srate, mclk, mclk_change; 75 int srate, mclk;
76 int err; 76 int err;
77 77
78 srate = params_rate(params); 78 srate = params_rate(params);
@@ -90,8 +90,7 @@ static int tegra_wm8903_hw_params(struct snd_pcm_substream *substream,
90 while (mclk < 6000000) 90 while (mclk < 6000000)
91 mclk *= 2; 91 mclk *= 2;
92 92
93 err = tegra_asoc_utils_set_rate(&machine->util_data, srate, mclk, 93 err = tegra_asoc_utils_set_rate(&machine->util_data, srate, mclk);
94 &mclk_change);
95 if (err < 0) { 94 if (err < 0) {
96 dev_err(card->dev, "Can't configure clocks\n"); 95 dev_err(card->dev, "Can't configure clocks\n");
97 return err; 96 return err;
@@ -115,13 +114,11 @@ static int tegra_wm8903_hw_params(struct snd_pcm_substream *substream,
115 return err; 114 return err;
116 } 115 }
117 116
118 if (mclk_change) { 117 err = snd_soc_dai_set_sysclk(codec_dai, 0, mclk,
119 err = snd_soc_dai_set_sysclk(codec_dai, 0, mclk, 118 SND_SOC_CLOCK_IN);
120 SND_SOC_CLOCK_IN); 119 if (err < 0) {
121 if (err < 0) { 120 dev_err(card->dev, "codec_dai clock not set\n");
122 dev_err(card->dev, "codec_dai clock not set\n"); 121 return err;
123 return err;
124 }
125 } 122 }
126 123
127 return 0; 124 return 0;