Loading sound/soc/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ source "sound/soc/pxa/Kconfig" source "sound/soc/samsung/Kconfig" source "sound/soc/s6000/Kconfig" source "sound/soc/sh/Kconfig" source "sound/soc/spear/Kconfig" source "sound/soc/tegra/Kconfig" source "sound/soc/txx9/Kconfig" source "sound/soc/ux500/Kconfig" Loading sound/soc/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ obj-$(CONFIG_SND_SOC) += pxa/ obj-$(CONFIG_SND_SOC) += samsung/ obj-$(CONFIG_SND_SOC) += s6000/ obj-$(CONFIG_SND_SOC) += sh/ obj-$(CONFIG_SND_SOC) += spear/ obj-$(CONFIG_SND_SOC) += tegra/ obj-$(CONFIG_SND_SOC) += txx9/ obj-$(CONFIG_SND_SOC) += ux500/ sound/soc/spear/Kconfig 0 → 100644 +9 −0 Original line number Diff line number Diff line config SND_SPEAR_SOC tristate select SND_SOC_DMAENGINE_PCM config SND_SPEAR_SPDIF_OUT tristate config SND_SPEAR_SPDIF_IN tristate sound/soc/spear/Makefile 0 → 100644 +8 −0 Original line number Diff line number Diff line # SPEAR Platform Support snd-soc-spear-pcm-objs := spear_pcm.o snd-soc-spear-spdif-in-objs := spdif_in.o snd-soc-spear-spdif-out-objs := spdif_out.o obj-$(CONFIG_SND_SPEAR_SOC) += snd-soc-spear-pcm.o obj-$(CONFIG_SND_SPEAR_SPDIF_IN) += snd-soc-spear-spdif-in.o obj-$(CONFIG_SND_SPEAR_SPDIF_OUT) += snd-soc-spear-spdif-out.o sound/soc/spear/spdif_in.c +7 −24 Original line number Diff line number Diff line Loading @@ -49,15 +49,12 @@ static void spdif_in_configure(struct spdif_in_dev *host) writel(0xF, host->io_base + SPDIF_IN_IRQ_MASK); } static int spdif_in_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) static int spdif_in_dai_probe(struct snd_soc_dai *dai) { struct spdif_in_dev *host = snd_soc_dai_get_drvdata(cpu_dai); struct spdif_in_dev *host = snd_soc_dai_get_drvdata(dai); if (substream->stream != SNDRV_PCM_STREAM_CAPTURE) return -EINVAL; dai->capture_dma_data = &host->dma_params; snd_soc_dai_set_dma_data(cpu_dai, substream, (void *)&host->dma_params); return 0; } Loading @@ -70,7 +67,6 @@ static void spdif_in_shutdown(struct snd_pcm_substream *substream, return; writel(0x0, host->io_base + SPDIF_IN_IRQ_MASK); snd_soc_dai_set_dma_data(dai, substream, NULL); } static void spdif_in_format(struct spdif_in_dev *host, u32 format) Loading Loading @@ -151,13 +147,13 @@ static int spdif_in_trigger(struct snd_pcm_substream *substream, int cmd, } static struct snd_soc_dai_ops spdif_in_dai_ops = { .startup = spdif_in_startup, .shutdown = spdif_in_shutdown, .trigger = spdif_in_trigger, .hw_params = spdif_in_hw_params, }; struct snd_soc_dai_driver spdif_in_dai = { static struct snd_soc_dai_driver spdif_in_dai = { .probe = spdif_in_dai_probe, .capture = { .channels_min = 2, .channels_max = 2, Loading Loading @@ -235,7 +231,7 @@ static int spdif_in_probe(struct platform_device *pdev) if (host->irq < 0) return -EINVAL; host->clk = clk_get(&pdev->dev, NULL); host->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(host->clk)) return PTR_ERR(host->clk); Loading @@ -257,34 +253,21 @@ static int spdif_in_probe(struct platform_device *pdev) ret = devm_request_irq(&pdev->dev, host->irq, spdif_in_irq, 0, "spdif-in", host); if (ret) { clk_put(host->clk); dev_warn(&pdev->dev, "request_irq failed\n"); return ret; } ret = snd_soc_register_component(&pdev->dev, &spdif_in_component, return snd_soc_register_component(&pdev->dev, &spdif_in_component, &spdif_in_dai, 1); if (ret != 0) { clk_put(host->clk); return ret; } return 0; } static int spdif_in_remove(struct platform_device *pdev) { struct spdif_in_dev *host = dev_get_drvdata(&pdev->dev); snd_soc_unregister_component(&pdev->dev); dev_set_drvdata(&pdev->dev, NULL); clk_put(host->clk); return 0; } static struct platform_driver spdif_in_driver = { .probe = spdif_in_probe, .remove = spdif_in_remove, Loading Loading
sound/soc/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ source "sound/soc/pxa/Kconfig" source "sound/soc/samsung/Kconfig" source "sound/soc/s6000/Kconfig" source "sound/soc/sh/Kconfig" source "sound/soc/spear/Kconfig" source "sound/soc/tegra/Kconfig" source "sound/soc/txx9/Kconfig" source "sound/soc/ux500/Kconfig" Loading
sound/soc/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ obj-$(CONFIG_SND_SOC) += pxa/ obj-$(CONFIG_SND_SOC) += samsung/ obj-$(CONFIG_SND_SOC) += s6000/ obj-$(CONFIG_SND_SOC) += sh/ obj-$(CONFIG_SND_SOC) += spear/ obj-$(CONFIG_SND_SOC) += tegra/ obj-$(CONFIG_SND_SOC) += txx9/ obj-$(CONFIG_SND_SOC) += ux500/
sound/soc/spear/Kconfig 0 → 100644 +9 −0 Original line number Diff line number Diff line config SND_SPEAR_SOC tristate select SND_SOC_DMAENGINE_PCM config SND_SPEAR_SPDIF_OUT tristate config SND_SPEAR_SPDIF_IN tristate
sound/soc/spear/Makefile 0 → 100644 +8 −0 Original line number Diff line number Diff line # SPEAR Platform Support snd-soc-spear-pcm-objs := spear_pcm.o snd-soc-spear-spdif-in-objs := spdif_in.o snd-soc-spear-spdif-out-objs := spdif_out.o obj-$(CONFIG_SND_SPEAR_SOC) += snd-soc-spear-pcm.o obj-$(CONFIG_SND_SPEAR_SPDIF_IN) += snd-soc-spear-spdif-in.o obj-$(CONFIG_SND_SPEAR_SPDIF_OUT) += snd-soc-spear-spdif-out.o
sound/soc/spear/spdif_in.c +7 −24 Original line number Diff line number Diff line Loading @@ -49,15 +49,12 @@ static void spdif_in_configure(struct spdif_in_dev *host) writel(0xF, host->io_base + SPDIF_IN_IRQ_MASK); } static int spdif_in_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) static int spdif_in_dai_probe(struct snd_soc_dai *dai) { struct spdif_in_dev *host = snd_soc_dai_get_drvdata(cpu_dai); struct spdif_in_dev *host = snd_soc_dai_get_drvdata(dai); if (substream->stream != SNDRV_PCM_STREAM_CAPTURE) return -EINVAL; dai->capture_dma_data = &host->dma_params; snd_soc_dai_set_dma_data(cpu_dai, substream, (void *)&host->dma_params); return 0; } Loading @@ -70,7 +67,6 @@ static void spdif_in_shutdown(struct snd_pcm_substream *substream, return; writel(0x0, host->io_base + SPDIF_IN_IRQ_MASK); snd_soc_dai_set_dma_data(dai, substream, NULL); } static void spdif_in_format(struct spdif_in_dev *host, u32 format) Loading Loading @@ -151,13 +147,13 @@ static int spdif_in_trigger(struct snd_pcm_substream *substream, int cmd, } static struct snd_soc_dai_ops spdif_in_dai_ops = { .startup = spdif_in_startup, .shutdown = spdif_in_shutdown, .trigger = spdif_in_trigger, .hw_params = spdif_in_hw_params, }; struct snd_soc_dai_driver spdif_in_dai = { static struct snd_soc_dai_driver spdif_in_dai = { .probe = spdif_in_dai_probe, .capture = { .channels_min = 2, .channels_max = 2, Loading Loading @@ -235,7 +231,7 @@ static int spdif_in_probe(struct platform_device *pdev) if (host->irq < 0) return -EINVAL; host->clk = clk_get(&pdev->dev, NULL); host->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(host->clk)) return PTR_ERR(host->clk); Loading @@ -257,34 +253,21 @@ static int spdif_in_probe(struct platform_device *pdev) ret = devm_request_irq(&pdev->dev, host->irq, spdif_in_irq, 0, "spdif-in", host); if (ret) { clk_put(host->clk); dev_warn(&pdev->dev, "request_irq failed\n"); return ret; } ret = snd_soc_register_component(&pdev->dev, &spdif_in_component, return snd_soc_register_component(&pdev->dev, &spdif_in_component, &spdif_in_dai, 1); if (ret != 0) { clk_put(host->clk); return ret; } return 0; } static int spdif_in_remove(struct platform_device *pdev) { struct spdif_in_dev *host = dev_get_drvdata(&pdev->dev); snd_soc_unregister_component(&pdev->dev); dev_set_drvdata(&pdev->dev, NULL); clk_put(host->clk); return 0; } static struct platform_driver spdif_in_driver = { .probe = spdif_in_probe, .remove = spdif_in_remove, Loading