Loading Documentation/devicetree/bindings/sound/samsung-i2s.txt +10 −12 Original line number Diff line number Diff line Loading @@ -2,7 +2,15 @@ Required SoC Specific Properties: - compatible : "samsung,i2s-v5" - compatible : should be one of the following. - samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. - samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with secondary fifo, s/w reset control and internal mux for root clk src. - samsung,exynos5420-i2s: for 8/16/24bit multichannel(7.1) I2S with secondary fifo, s/w reset control, internal mux for root clk src and TDM support. TDM (Time division multiplexing) is to allow transfer of multiple channel audio data on single data line. - reg: physical base address of the controller and length of memory mapped region. - dmas: list of DMA controller phandle and DMA request line ordered pairs. Loading @@ -21,13 +29,6 @@ Required SoC Specific Properties: Optional SoC Specific Properties: - samsung,supports-6ch: If the I2S Primary sound source has 5.1 Channel support, this flag is enabled. - samsung,supports-rstclr: This flag should be set if I2S software reset bit control is required. When this flag is set I2S software reset bit will be enabled or disabled based on need. - samsung,supports-secdai:If I2S block has a secondary FIFO and internal DMA, then this flag is enabled. - samsung,idma-addr: Internal DMA register base address of the audio sub system(used in secondary sound source). - pinctrl-0: Should specify pin control groups used for this controller. Loading @@ -36,7 +37,7 @@ Optional SoC Specific Properties: Example: i2s0: i2s@03830000 { compatible = "samsung,i2s-v5"; compatible = "samsung,s5pv210-i2s"; reg = <0x03830000 0x100>; dmas = <&pdma0 10 &pdma0 9 Loading @@ -46,9 +47,6 @@ i2s0: i2s@03830000 { <&clock_audss EXYNOS_I2S_BUS>, <&clock_audss EXYNOS_SCLK_I2S>; clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; samsung,supports-6ch; samsung,supports-rstclr; samsung,supports-secdai; samsung,idma-addr = <0x03000000>; pinctrl-names = "default"; pinctrl-0 = <&i2s0_bus>; Loading arch/arm/boot/dts/exynos5250.dtsi +3 −6 Original line number Diff line number Diff line Loading @@ -405,7 +405,7 @@ dwmmc_3: dwmmc3@12230000 { }; i2s0: i2s@03830000 { compatible = "samsung,i2s-v5"; compatible = "samsung,s5pv210-i2s"; reg = <0x03830000 0x100>; dmas = <&pdma0 10 &pdma0 9 Loading @@ -415,16 +415,13 @@ &pdma0 9 <&clock_audss EXYNOS_I2S_BUS>, <&clock_audss EXYNOS_SCLK_I2S>; clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; samsung,supports-6ch; samsung,supports-rstclr; samsung,supports-secdai; samsung,idma-addr = <0x03000000>; pinctrl-names = "default"; pinctrl-0 = <&i2s0_bus>; }; i2s1: i2s@12D60000 { compatible = "samsung,i2s-v5"; compatible = "samsung,s3c6410-i2s"; reg = <0x12D60000 0x100>; dmas = <&pdma1 12 &pdma1 11>; Loading @@ -436,7 +433,7 @@ i2s1: i2s@12D60000 { }; i2s2: i2s@12D70000 { compatible = "samsung,i2s-v5"; compatible = "samsung,s3c6410-i2s"; reg = <0x12D70000 0x100>; dmas = <&pdma0 12 &pdma0 11>; Loading include/linux/platform_data/asoc-s3c.h +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ struct samsung_i2s { */ #define QUIRK_NO_MUXPSR (1 << 2) #define QUIRK_NEED_RSTCLR (1 << 3) #define QUIRK_SUPPORTS_TDM (1 << 4) /* Quirks of the I2S controller */ u32 quirks; dma_addr_t idma_addr; Loading sound/soc/samsung/ac97.c +3 −8 Original line number Diff line number Diff line Loading @@ -404,18 +404,13 @@ static int s3c_ac97_probe(struct platform_device *pdev) return -ENXIO; } mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mem_res) { dev_err(&pdev->dev, "Unable to get register resource\n"); return -ENXIO; } irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!irq_res) { dev_err(&pdev->dev, "AC97 IRQ not provided!\n"); return -ENXIO; } mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); s3c_ac97.regs = devm_ioremap_resource(&pdev->dev, mem_res); if (IS_ERR(s3c_ac97.regs)) return PTR_ERR(s3c_ac97.regs); Loading Loading @@ -462,7 +457,7 @@ static int s3c_ac97_probe(struct platform_device *pdev) if (ret) goto err5; ret = asoc_dma_platform_register(&pdev->dev); ret = samsung_asoc_dma_platform_register(&pdev->dev); if (ret) { dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret); goto err6; Loading @@ -485,7 +480,7 @@ static int s3c_ac97_remove(struct platform_device *pdev) { struct resource *irq_res; asoc_dma_platform_unregister(&pdev->dev); samsung_asoc_dma_platform_unregister(&pdev->dev); snd_soc_unregister_component(&pdev->dev); irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); Loading sound/soc/samsung/dma.c +8 −4 Original line number Diff line number Diff line Loading @@ -176,6 +176,10 @@ static int dma_hw_params(struct snd_pcm_substream *substream, prtd->params->ch = prtd->params->ops->request( prtd->params->channel, &req, rtd->cpu_dai->dev, prtd->params->ch_name); if (!prtd->params->ch) { pr_err("Failed to allocate DMA channel\n"); return -ENXIO; } prtd->params->ops->config(prtd->params->ch, &config); } Loading Loading @@ -433,17 +437,17 @@ static struct snd_soc_platform_driver samsung_asoc_platform = { .pcm_free = dma_free_dma_buffers, }; int asoc_dma_platform_register(struct device *dev) int samsung_asoc_dma_platform_register(struct device *dev) { return snd_soc_register_platform(dev, &samsung_asoc_platform); } EXPORT_SYMBOL_GPL(asoc_dma_platform_register); EXPORT_SYMBOL_GPL(samsung_asoc_dma_platform_register); void asoc_dma_platform_unregister(struct device *dev) void samsung_asoc_dma_platform_unregister(struct device *dev) { snd_soc_unregister_platform(dev); } EXPORT_SYMBOL_GPL(asoc_dma_platform_unregister); EXPORT_SYMBOL_GPL(samsung_asoc_dma_platform_unregister); MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); MODULE_DESCRIPTION("Samsung ASoC DMA Driver"); Loading Loading
Documentation/devicetree/bindings/sound/samsung-i2s.txt +10 −12 Original line number Diff line number Diff line Loading @@ -2,7 +2,15 @@ Required SoC Specific Properties: - compatible : "samsung,i2s-v5" - compatible : should be one of the following. - samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. - samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with secondary fifo, s/w reset control and internal mux for root clk src. - samsung,exynos5420-i2s: for 8/16/24bit multichannel(7.1) I2S with secondary fifo, s/w reset control, internal mux for root clk src and TDM support. TDM (Time division multiplexing) is to allow transfer of multiple channel audio data on single data line. - reg: physical base address of the controller and length of memory mapped region. - dmas: list of DMA controller phandle and DMA request line ordered pairs. Loading @@ -21,13 +29,6 @@ Required SoC Specific Properties: Optional SoC Specific Properties: - samsung,supports-6ch: If the I2S Primary sound source has 5.1 Channel support, this flag is enabled. - samsung,supports-rstclr: This flag should be set if I2S software reset bit control is required. When this flag is set I2S software reset bit will be enabled or disabled based on need. - samsung,supports-secdai:If I2S block has a secondary FIFO and internal DMA, then this flag is enabled. - samsung,idma-addr: Internal DMA register base address of the audio sub system(used in secondary sound source). - pinctrl-0: Should specify pin control groups used for this controller. Loading @@ -36,7 +37,7 @@ Optional SoC Specific Properties: Example: i2s0: i2s@03830000 { compatible = "samsung,i2s-v5"; compatible = "samsung,s5pv210-i2s"; reg = <0x03830000 0x100>; dmas = <&pdma0 10 &pdma0 9 Loading @@ -46,9 +47,6 @@ i2s0: i2s@03830000 { <&clock_audss EXYNOS_I2S_BUS>, <&clock_audss EXYNOS_SCLK_I2S>; clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; samsung,supports-6ch; samsung,supports-rstclr; samsung,supports-secdai; samsung,idma-addr = <0x03000000>; pinctrl-names = "default"; pinctrl-0 = <&i2s0_bus>; Loading
arch/arm/boot/dts/exynos5250.dtsi +3 −6 Original line number Diff line number Diff line Loading @@ -405,7 +405,7 @@ dwmmc_3: dwmmc3@12230000 { }; i2s0: i2s@03830000 { compatible = "samsung,i2s-v5"; compatible = "samsung,s5pv210-i2s"; reg = <0x03830000 0x100>; dmas = <&pdma0 10 &pdma0 9 Loading @@ -415,16 +415,13 @@ &pdma0 9 <&clock_audss EXYNOS_I2S_BUS>, <&clock_audss EXYNOS_SCLK_I2S>; clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; samsung,supports-6ch; samsung,supports-rstclr; samsung,supports-secdai; samsung,idma-addr = <0x03000000>; pinctrl-names = "default"; pinctrl-0 = <&i2s0_bus>; }; i2s1: i2s@12D60000 { compatible = "samsung,i2s-v5"; compatible = "samsung,s3c6410-i2s"; reg = <0x12D60000 0x100>; dmas = <&pdma1 12 &pdma1 11>; Loading @@ -436,7 +433,7 @@ i2s1: i2s@12D60000 { }; i2s2: i2s@12D70000 { compatible = "samsung,i2s-v5"; compatible = "samsung,s3c6410-i2s"; reg = <0x12D70000 0x100>; dmas = <&pdma0 12 &pdma0 11>; Loading
include/linux/platform_data/asoc-s3c.h +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ struct samsung_i2s { */ #define QUIRK_NO_MUXPSR (1 << 2) #define QUIRK_NEED_RSTCLR (1 << 3) #define QUIRK_SUPPORTS_TDM (1 << 4) /* Quirks of the I2S controller */ u32 quirks; dma_addr_t idma_addr; Loading
sound/soc/samsung/ac97.c +3 −8 Original line number Diff line number Diff line Loading @@ -404,18 +404,13 @@ static int s3c_ac97_probe(struct platform_device *pdev) return -ENXIO; } mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mem_res) { dev_err(&pdev->dev, "Unable to get register resource\n"); return -ENXIO; } irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!irq_res) { dev_err(&pdev->dev, "AC97 IRQ not provided!\n"); return -ENXIO; } mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); s3c_ac97.regs = devm_ioremap_resource(&pdev->dev, mem_res); if (IS_ERR(s3c_ac97.regs)) return PTR_ERR(s3c_ac97.regs); Loading Loading @@ -462,7 +457,7 @@ static int s3c_ac97_probe(struct platform_device *pdev) if (ret) goto err5; ret = asoc_dma_platform_register(&pdev->dev); ret = samsung_asoc_dma_platform_register(&pdev->dev); if (ret) { dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret); goto err6; Loading @@ -485,7 +480,7 @@ static int s3c_ac97_remove(struct platform_device *pdev) { struct resource *irq_res; asoc_dma_platform_unregister(&pdev->dev); samsung_asoc_dma_platform_unregister(&pdev->dev); snd_soc_unregister_component(&pdev->dev); irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); Loading
sound/soc/samsung/dma.c +8 −4 Original line number Diff line number Diff line Loading @@ -176,6 +176,10 @@ static int dma_hw_params(struct snd_pcm_substream *substream, prtd->params->ch = prtd->params->ops->request( prtd->params->channel, &req, rtd->cpu_dai->dev, prtd->params->ch_name); if (!prtd->params->ch) { pr_err("Failed to allocate DMA channel\n"); return -ENXIO; } prtd->params->ops->config(prtd->params->ch, &config); } Loading Loading @@ -433,17 +437,17 @@ static struct snd_soc_platform_driver samsung_asoc_platform = { .pcm_free = dma_free_dma_buffers, }; int asoc_dma_platform_register(struct device *dev) int samsung_asoc_dma_platform_register(struct device *dev) { return snd_soc_register_platform(dev, &samsung_asoc_platform); } EXPORT_SYMBOL_GPL(asoc_dma_platform_register); EXPORT_SYMBOL_GPL(samsung_asoc_dma_platform_register); void asoc_dma_platform_unregister(struct device *dev) void samsung_asoc_dma_platform_unregister(struct device *dev) { snd_soc_unregister_platform(dev); } EXPORT_SYMBOL_GPL(asoc_dma_platform_unregister); EXPORT_SYMBOL_GPL(samsung_asoc_dma_platform_unregister); MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); MODULE_DESCRIPTION("Samsung ASoC DMA Driver"); Loading