diff options
author | Mark Brown <broonie@kernel.org> | 2014-11-17 11:40:27 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-17 11:40:27 -0500 |
commit | c117b4a39ba3940db937c6e46aed3bc49b6f9c4c (patch) | |
tree | 1da27d3abe63be94b76ca29f4892e090263ad94a /sound/soc | |
parent | a7a3324a602cd7ebabfb7f5990006ec4f3d6449f (diff) | |
parent | d742b925244ce91f16d380befdca473e4536359b (diff) |
Merge branch 'fix/davinci' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-davinci
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index e460f97c514e..0dab382ba147 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c | |||
@@ -582,8 +582,17 @@ static int davinci_config_channel_size(struct davinci_mcasp *mcasp, | |||
582 | * both left and right channels), so it has to be divided by number of | 582 | * both left and right channels), so it has to be divided by number of |
583 | * tdm-slots (for I2S - divided by 2). | 583 | * tdm-slots (for I2S - divided by 2). |
584 | */ | 584 | */ |
585 | if (mcasp->bclk_lrclk_ratio) | 585 | if (mcasp->bclk_lrclk_ratio) { |
586 | word_length = mcasp->bclk_lrclk_ratio / mcasp->tdm_slots; | 586 | u32 slot_length = mcasp->bclk_lrclk_ratio / mcasp->tdm_slots; |
587 | |||
588 | /* | ||
589 | * When we have more bclk then it is needed for the data, we | ||
590 | * need to use the rotation to move the received samples to have | ||
591 | * correct alignment. | ||
592 | */ | ||
593 | rx_rotate = (slot_length - word_length) / 4; | ||
594 | word_length = slot_length; | ||
595 | } | ||
587 | 596 | ||
588 | /* mapping of the XSSZ bit-field as described in the datasheet */ | 597 | /* mapping of the XSSZ bit-field as described in the datasheet */ |
589 | fmt = (word_length >> 1) - 1; | 598 | fmt = (word_length >> 1) - 1; |
@@ -1125,6 +1134,7 @@ static struct snd_soc_dai_driver davinci_mcasp_dai[] = { | |||
1125 | }, | 1134 | }, |
1126 | .ops = &davinci_mcasp_dai_ops, | 1135 | .ops = &davinci_mcasp_dai_ops, |
1127 | 1136 | ||
1137 | .symmetric_samplebits = 1, | ||
1128 | }, | 1138 | }, |
1129 | { | 1139 | { |
1130 | .name = "davinci-mcasp.1", | 1140 | .name = "davinci-mcasp.1", |
@@ -1391,6 +1401,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev) | |||
1391 | ret = pm_runtime_get_sync(&pdev->dev); | 1401 | ret = pm_runtime_get_sync(&pdev->dev); |
1392 | if (IS_ERR_VALUE(ret)) { | 1402 | if (IS_ERR_VALUE(ret)) { |
1393 | dev_err(&pdev->dev, "pm_runtime_get_sync() failed\n"); | 1403 | dev_err(&pdev->dev, "pm_runtime_get_sync() failed\n"); |
1404 | pm_runtime_disable(&pdev->dev); | ||
1394 | return ret; | 1405 | return ret; |
1395 | } | 1406 | } |
1396 | 1407 | ||