aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci/davinci-mcasp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/davinci/davinci-mcasp.c')
-rw-r--r--sound/soc/davinci/davinci-mcasp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index add6bb99661d..7d45d98a861f 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -663,7 +663,7 @@ static int mcasp_common_hw_param(struct davinci_mcasp *mcasp, int stream,
663 u8 rx_ser = 0; 663 u8 rx_ser = 0;
664 u8 slots = mcasp->tdm_slots; 664 u8 slots = mcasp->tdm_slots;
665 u8 max_active_serializers = (channels + slots - 1) / slots; 665 u8 max_active_serializers = (channels + slots - 1) / slots;
666 int active_serializers, numevt, n; 666 int active_serializers, numevt;
667 u32 reg; 667 u32 reg;
668 /* Default configuration */ 668 /* Default configuration */
669 if (mcasp->version < MCASP_VERSION_3) 669 if (mcasp->version < MCASP_VERSION_3)
@@ -745,9 +745,8 @@ static int mcasp_common_hw_param(struct davinci_mcasp *mcasp, int stream,
745 * The number of words for numevt need to be in steps of active 745 * The number of words for numevt need to be in steps of active
746 * serializers. 746 * serializers.
747 */ 747 */
748 n = numevt % active_serializers; 748 numevt = (numevt / active_serializers) * active_serializers;
749 if (n) 749
750 numevt += (active_serializers - n);
751 while (period_words % numevt && numevt > 0) 750 while (period_words % numevt && numevt > 0)
752 numevt -= active_serializers; 751 numevt -= active_serializers;
753 if (numevt <= 0) 752 if (numevt <= 0)
@@ -1299,6 +1298,7 @@ static struct snd_soc_dai_driver davinci_mcasp_dai[] = {
1299 .ops = &davinci_mcasp_dai_ops, 1298 .ops = &davinci_mcasp_dai_ops,
1300 1299
1301 .symmetric_samplebits = 1, 1300 .symmetric_samplebits = 1,
1301 .symmetric_rates = 1,
1302 }, 1302 },
1303 { 1303 {
1304 .name = "davinci-mcasp.1", 1304 .name = "davinci-mcasp.1",
@@ -1685,7 +1685,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1685 1685
1686 irq = platform_get_irq_byname(pdev, "common"); 1686 irq = platform_get_irq_byname(pdev, "common");
1687 if (irq >= 0) { 1687 if (irq >= 0) {
1688 irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_common\n", 1688 irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_common",
1689 dev_name(&pdev->dev)); 1689 dev_name(&pdev->dev));
1690 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, 1690 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
1691 davinci_mcasp_common_irq_handler, 1691 davinci_mcasp_common_irq_handler,
@@ -1702,7 +1702,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1702 1702
1703 irq = platform_get_irq_byname(pdev, "rx"); 1703 irq = platform_get_irq_byname(pdev, "rx");
1704 if (irq >= 0) { 1704 if (irq >= 0) {
1705 irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_rx\n", 1705 irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_rx",
1706 dev_name(&pdev->dev)); 1706 dev_name(&pdev->dev));
1707 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, 1707 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
1708 davinci_mcasp_rx_irq_handler, 1708 davinci_mcasp_rx_irq_handler,
@@ -1717,7 +1717,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1717 1717
1718 irq = platform_get_irq_byname(pdev, "tx"); 1718 irq = platform_get_irq_byname(pdev, "tx");
1719 if (irq >= 0) { 1719 if (irq >= 0) {
1720 irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_tx\n", 1720 irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_tx",
1721 dev_name(&pdev->dev)); 1721 dev_name(&pdev->dev));
1722 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, 1722 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
1723 davinci_mcasp_tx_irq_handler, 1723 davinci_mcasp_tx_irq_handler,