diff options
author | Mark Brown <broonie@kernel.org> | 2016-03-13 04:16:36 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-03-13 04:16:36 -0400 |
commit | 95d7ff56d49057a21f9afbd2e1c5bd005057de7d (patch) | |
tree | e8177fbfaf50943856a4c603016918f868921990 | |
parent | 19142ae6711478f3d858024eeccbf7959de290ce (diff) | |
parent | e7a508f2b137092500fbad09d9713d3a1c5d4826 (diff) |
Merge remote-tracking branch 'asoc/topic/pcm3168a' into asoc-next
-rw-r--r-- | sound/soc/codecs/pcm3168a.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c index 44b268aa4dd8..992a77edcd5d 100644 --- a/sound/soc/codecs/pcm3168a.c +++ b/sound/soc/codecs/pcm3168a.c | |||
@@ -299,10 +299,15 @@ static int pcm3168a_set_dai_sysclk(struct snd_soc_dai *dai, | |||
299 | int clk_id, unsigned int freq, int dir) | 299 | int clk_id, unsigned int freq, int dir) |
300 | { | 300 | { |
301 | struct pcm3168a_priv *pcm3168a = snd_soc_codec_get_drvdata(dai->codec); | 301 | struct pcm3168a_priv *pcm3168a = snd_soc_codec_get_drvdata(dai->codec); |
302 | int ret; | ||
302 | 303 | ||
303 | if (freq > PCM1368A_MAX_SYSCLK) | 304 | if (freq > PCM1368A_MAX_SYSCLK) |
304 | return -EINVAL; | 305 | return -EINVAL; |
305 | 306 | ||
307 | ret = clk_set_rate(pcm3168a->scki, freq); | ||
308 | if (ret) | ||
309 | return ret; | ||
310 | |||
306 | pcm3168a->sysclk = freq; | 311 | pcm3168a->sysclk = freq; |
307 | 312 | ||
308 | return 0; | 313 | return 0; |
@@ -395,13 +400,12 @@ static int pcm3168a_hw_params(struct snd_pcm_substream *substream, | |||
395 | struct pcm3168a_priv *pcm3168a = snd_soc_codec_get_drvdata(codec); | 400 | struct pcm3168a_priv *pcm3168a = snd_soc_codec_get_drvdata(codec); |
396 | bool tx, master_mode; | 401 | bool tx, master_mode; |
397 | u32 val, mask, shift, reg; | 402 | u32 val, mask, shift, reg; |
398 | unsigned int rate, channels, fmt, ratio, max_ratio; | 403 | unsigned int rate, fmt, ratio, max_ratio; |
399 | int i, min_frame_size; | 404 | int i, min_frame_size; |
400 | snd_pcm_format_t format; | 405 | snd_pcm_format_t format; |
401 | 406 | ||
402 | rate = params_rate(params); | 407 | rate = params_rate(params); |
403 | format = params_format(params); | 408 | format = params_format(params); |
404 | channels = params_channels(params); | ||
405 | 409 | ||
406 | ratio = pcm3168a->sysclk / rate; | 410 | ratio = pcm3168a->sysclk / rate; |
407 | 411 | ||