diff options
| -rw-r--r-- | sound/soc/bcm/bcm2835-i2s.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c index d2663e79ece1..a0026e2d2f0a 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c | |||
| @@ -276,8 +276,15 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, | |||
| 276 | /* otherwise calculate a fitting block ratio */ | 276 | /* otherwise calculate a fitting block ratio */ |
| 277 | bclk_ratio = 2 * data_length; | 277 | bclk_ratio = 2 * data_length; |
| 278 | 278 | ||
| 279 | /* set target clock rate*/ | 279 | /* Clock should only be set up here if CPU is clock master */ |
| 280 | clk_set_rate(dev->clk, sampling_rate * bclk_ratio); | 280 | switch (dev->fmt & SND_SOC_DAIFMT_MASTER_MASK) { |
| 281 | case SND_SOC_DAIFMT_CBS_CFS: | ||
| 282 | case SND_SOC_DAIFMT_CBS_CFM: | ||
| 283 | clk_set_rate(dev->clk, sampling_rate * bclk_ratio); | ||
| 284 | break; | ||
| 285 | default: | ||
| 286 | break; | ||
| 287 | } | ||
| 281 | 288 | ||
| 282 | /* Setup the frame format */ | 289 | /* Setup the frame format */ |
| 283 | format = BCM2835_I2S_CHEN; | 290 | format = BCM2835_I2S_CHEN; |
