aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/mcbsp.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-08-23 08:12:22 -0400
committerTakashi Iwai <tiwai@suse.de>2013-08-23 08:12:22 -0400
commit68538bf2bce557c3b5fe8c59b034d45352500db1 (patch)
treea84b68990cadcbfc277acc7b7f2b75716750e203 /sound/soc/omap/mcbsp.c
parenta8cc20999799a94929a56393ff39b32245e33d64 (diff)
parent43bcb402f84fe459102120b4e2d28d7117f16cd0 (diff)
Merge tag 'asoc-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.12 - DAPM is now mandatory for CODEC drivers in order to avoid the repeated regressions in the special cases for non-DAPM CODECs and make it easier to integrate with other components on boards. All existing drivers have had some level of DAPM support added. - A lot of cleanups in DAPM plus support for maintaining controls in a specific state while a DAPM widget all contributed by Lars-Peter Clausen. - Core helpers for bitbanged AC'97 reset from Markus Pargmann. - New drivers and support for Analog Devices ADAU1702 and ADAU1401(a), Asahi Kasei Microdevices AK4554, Atmel AT91ASM9x5 and WM8904 based machines, Freescale S/PDIF and SSI AC'97, Renesas R-Car SoCs, Samsung Exynos5420 SoCs, Texas Instruments PCM1681 and PCM1792A and Wolfson Microelectronics WM8997. - Support for building drivers that can support it cross-platform for compile test.
Diffstat (limited to 'sound/soc/omap/mcbsp.c')
-rw-r--r--sound/soc/omap/mcbsp.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index e4980c5d7609..83433fdea32a 100644
--- a/sound/soc/omap/mcbsp.c
+++ b/sound/soc/omap/mcbsp.c
@@ -1012,28 +1012,33 @@ int omap_mcbsp_init(struct platform_device *pdev)
1012 } 1012 }
1013 } 1013 }
1014 1014
1015 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); 1015 if (!pdev->dev.of_node) {
1016 if (!res) { 1016 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
1017 dev_err(&pdev->dev, "invalid rx DMA channel\n"); 1017 if (!res) {
1018 return -ENODEV; 1018 dev_err(&pdev->dev, "invalid tx DMA channel\n");
1019 } 1019 return -ENODEV;
1020 /* RX DMA request number, and port address configuration */ 1020 }
1021 mcbsp->dma_req[1] = res->start; 1021 mcbsp->dma_req[0] = res->start;
1022 mcbsp->dma_data[1].filter_data = &mcbsp->dma_req[1]; 1022 mcbsp->dma_data[0].filter_data = &mcbsp->dma_req[0];
1023 mcbsp->dma_data[1].addr = omap_mcbsp_dma_reg_params(mcbsp, 1);
1024 mcbsp->dma_data[1].maxburst = 4;
1025 1023
1026 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); 1024 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
1027 if (!res) { 1025 if (!res) {
1028 dev_err(&pdev->dev, "invalid tx DMA channel\n"); 1026 dev_err(&pdev->dev, "invalid rx DMA channel\n");
1029 return -ENODEV; 1027 return -ENODEV;
1028 }
1029 mcbsp->dma_req[1] = res->start;
1030 mcbsp->dma_data[1].filter_data = &mcbsp->dma_req[1];
1031 } else {
1032 mcbsp->dma_data[0].filter_data = "tx";
1033 mcbsp->dma_data[1].filter_data = "rx";
1030 } 1034 }
1031 /* TX DMA request number, and port address configuration */ 1035
1032 mcbsp->dma_req[0] = res->start;
1033 mcbsp->dma_data[0].filter_data = &mcbsp->dma_req[0];
1034 mcbsp->dma_data[0].addr = omap_mcbsp_dma_reg_params(mcbsp, 0); 1036 mcbsp->dma_data[0].addr = omap_mcbsp_dma_reg_params(mcbsp, 0);
1035 mcbsp->dma_data[0].maxburst = 4; 1037 mcbsp->dma_data[0].maxburst = 4;
1036 1038
1039 mcbsp->dma_data[1].addr = omap_mcbsp_dma_reg_params(mcbsp, 1);
1040 mcbsp->dma_data[1].maxburst = 4;
1041
1037 mcbsp->fclk = clk_get(&pdev->dev, "fck"); 1042 mcbsp->fclk = clk_get(&pdev->dev, "fck");
1038 if (IS_ERR(mcbsp->fclk)) { 1043 if (IS_ERR(mcbsp->fclk)) {
1039 ret = PTR_ERR(mcbsp->fclk); 1044 ret = PTR_ERR(mcbsp->fclk);