aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-06-01 09:02:07 -0400
committerMark Brown <broonie@linaro.org>2014-06-01 09:02:07 -0400
commit287d414eacaa681413ea89adfa5b3a0d12d2ab1a (patch)
treea4ef6c55bc2b2177f8a4144663c68e6e345b64cc /sound/soc
parent432481220101166a0b33dc6f951b38a8af3d281c (diff)
parent7b8751abdd34a2f924c37c29ad61d598f5d29e7b (diff)
Merge branch 'topic/fsl' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fsl-ssi
Conflicts: sound/soc/fsl/Kconfig
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/fsl/Kconfig82
-rw-r--r--sound/soc/fsl/fsl_esai.c9
-rw-r--r--sound/soc/fsl/fsl_spdif.c9
-rw-r--r--sound/soc/fsl/fsl_ssi.c1
-rw-r--r--sound/soc/fsl/imx-pcm-dma.c1
5 files changed, 70 insertions, 32 deletions
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 2d6281f1e1f4..e218df9aa638 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -1,31 +1,78 @@
1menu "SoC Audio for Freescale CPUs"
2
3comment "Common SoC Audio options for Freescale CPUs:"
4
1config SND_SOC_FSL_SAI 5config SND_SOC_FSL_SAI
2 tristate 6 tristate "Synchronous Audio Interface (SAI) module support"
3 select REGMAP_MMIO 7 select REGMAP_MMIO
4 select SND_SOC_GENERIC_DMAENGINE_PCM 8 select SND_SOC_GENERIC_DMAENGINE_PCM
9 help
10 Say Y if you want to add Synchronous Audio Interface (SAI)
11 support for the Freescale CPUs.
12 This option is only useful for out-of-tree drivers since
13 in-tree drivers select it automatically.
5 14
6config SND_SOC_FSL_SSI 15config SND_SOC_FSL_SSI
16 tristate "Synchronous Serial Interface module support"
17 select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n
18 select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && ARCH_MXC
7 select REGMAP_MMIO 19 select REGMAP_MMIO
8 tristate 20 help
21 Say Y if you want to add Synchronous Serial Interface (SSI)
22 support for the Freescale CPUs.
23 This option is only useful for out-of-tree drivers since
24 in-tree drivers select it automatically.
9 25
10config SND_SOC_FSL_SPDIF 26config SND_SOC_FSL_SPDIF
11 tristate 27 tristate "Sony/Philips Digital Interface module support"
12 select REGMAP_MMIO 28 select REGMAP_MMIO
29 select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n
30 select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && ARCH_MXC
31 help
32 Say Y if you want to add Sony/Philips Digital Interface (SPDIF)
33 support for the Freescale CPUs.
34 This option is only useful for out-of-tree drivers since
35 in-tree drivers select it automatically.
13 36
14config SND_SOC_FSL_ESAI 37config SND_SOC_FSL_ESAI
15 tristate 38 tristate "Enhanced Serial Audio Interface (ESAI) module support"
16 select REGMAP_MMIO 39 select REGMAP_MMIO
17 select SND_SOC_FSL_UTILS 40 select SND_SOC_FSL_UTILS
41 help
42 Say Y if you want to add Enhanced Synchronous Audio Interface
43 (ESAI) support for the Freescale CPUs.
44 This option is only useful for out-of-tree drivers since
45 in-tree drivers select it automatically.
18 46
19config SND_SOC_FSL_UTILS 47config SND_SOC_FSL_UTILS
20 tristate 48 tristate
21 49
22menuconfig SND_POWERPC_SOC 50config SND_SOC_IMX_PCM_DMA
51 tristate
52 select SND_SOC_GENERIC_DMAENGINE_PCM
53
54config SND_SOC_IMX_AUDMUX
55 tristate "Digital Audio Mux module support"
56 help
57 Say Y if you want to add Digital Audio Mux (AUDMUX) support
58 for the ARM i.MX CPUs.
59 This option is only useful for out-of-tree drivers since
60 in-tree drivers select it automatically.
61
62config SND_POWERPC_SOC
23 tristate "SoC Audio for Freescale PowerPC CPUs" 63 tristate "SoC Audio for Freescale PowerPC CPUs"
24 depends on FSL_SOC || PPC_MPC52xx 64 depends on FSL_SOC || PPC_MPC52xx
25 help 65 help
26 Say Y or M if you want to add support for codecs attached to 66 Say Y or M if you want to add support for codecs attached to
27 the PowerPC CPUs. 67 the PowerPC CPUs.
28 68
69config SND_IMX_SOC
70 tristate "SoC Audio for Freescale i.MX CPUs"
71 depends on ARCH_MXC || COMPILE_TEST
72 help
73 Say Y or M if you want to add support for codecs attached to
74 the i.MX CPUs.
75
29if SND_POWERPC_SOC 76if SND_POWERPC_SOC
30 77
31config SND_MPC52xx_DMA 78config SND_MPC52xx_DMA
@@ -34,6 +81,8 @@ config SND_MPC52xx_DMA
34config SND_SOC_POWERPC_DMA 81config SND_SOC_POWERPC_DMA
35 tristate 82 tristate
36 83
84comment "SoC Audio support for Freescale PPC boards:"
85
37config SND_SOC_MPC8610_HPCD 86config SND_SOC_MPC8610_HPCD
38 tristate "ALSA SoC support for the Freescale MPC8610 HPCD board" 87 tristate "ALSA SoC support for the Freescale MPC8610 HPCD board"
39 # I2C is necessary for the CS4270 driver 88 # I2C is necessary for the CS4270 driver
@@ -111,13 +160,6 @@ config SND_MPC52xx_SOC_EFIKA
111 160
112endif # SND_POWERPC_SOC 161endif # SND_POWERPC_SOC
113 162
114menuconfig SND_IMX_SOC
115 tristate "SoC Audio for Freescale i.MX CPUs"
116 depends on ARCH_MXC || COMPILE_TEST
117 help
118 Say Y or M if you want to add support for codecs attached to
119 the i.MX CPUs.
120
121if SND_IMX_SOC 163if SND_IMX_SOC
122 164
123config SND_SOC_IMX_SSI 165config SND_SOC_IMX_SSI
@@ -128,12 +170,7 @@ config SND_SOC_IMX_PCM_FIQ
128 tristate 170 tristate
129 select FIQ 171 select FIQ
130 172
131config SND_SOC_IMX_PCM_DMA 173comment "SoC Audio support for Freescale i.MX boards:"
132 tristate
133 select SND_SOC_GENERIC_DMAENGINE_PCM
134
135config SND_SOC_IMX_AUDMUX
136 tristate
137 174
138config SND_MXC_SOC_WM1133_EV1 175config SND_MXC_SOC_WM1133_EV1
139 tristate "Audio on the i.MX31ADS with WM1133-EV1 fitted" 176 tristate "Audio on the i.MX31ADS with WM1133-EV1 fitted"
@@ -171,12 +208,7 @@ config SND_SOC_PHYCORE_AC97
171 208
172config SND_SOC_EUKREA_TLV320 209config SND_SOC_EUKREA_TLV320
173 tristate "Eukrea TLV320" 210 tristate "Eukrea TLV320"
174 depends on MACH_EUKREA_MBIMX27_BASEBOARD \ 211 depends on ARCH_MXC && I2C
175 || MACH_EUKREA_MBIMXSD25_BASEBOARD \
176 || MACH_EUKREA_MBIMXSD35_BASEBOARD \
177 || MACH_EUKREA_MBIMXSD51_BASEBOARD \
178 || (OF && ARM)
179 depends on I2C
180 select SND_SOC_TLV320AIC23_I2C 212 select SND_SOC_TLV320AIC23_I2C
181 select SND_SOC_IMX_AUDMUX 213 select SND_SOC_IMX_AUDMUX
182 select SND_SOC_IMX_SSI 214 select SND_SOC_IMX_SSI
@@ -226,3 +258,5 @@ config SND_SOC_IMX_MC13783
226 select SND_SOC_IMX_PCM_DMA 258 select SND_SOC_IMX_PCM_DMA
227 259
228endif # SND_IMX_SOC 260endif # SND_IMX_SOC
261
262endmenu
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index c8e5db1414d7..b49b78df2f5b 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -209,8 +209,9 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
209 struct clk *clksrc = esai_priv->extalclk; 209 struct clk *clksrc = esai_priv->extalclk;
210 bool tx = clk_id <= ESAI_HCKT_EXTAL; 210 bool tx = clk_id <= ESAI_HCKT_EXTAL;
211 bool in = dir == SND_SOC_CLOCK_IN; 211 bool in = dir == SND_SOC_CLOCK_IN;
212 u32 ret, ratio, ecr = 0; 212 u32 ratio, ecr = 0;
213 unsigned long clk_rate; 213 unsigned long clk_rate;
214 int ret;
214 215
215 /* sck_div can be only bypassed if ETO/ERO=0 and SNC_SOC_CLOCK_OUT */ 216 /* sck_div can be only bypassed if ETO/ERO=0 and SNC_SOC_CLOCK_OUT */
216 esai_priv->sck_div[tx] = true; 217 esai_priv->sck_div[tx] = true;
@@ -432,8 +433,8 @@ static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
432static int fsl_esai_startup(struct snd_pcm_substream *substream, 433static int fsl_esai_startup(struct snd_pcm_substream *substream,
433 struct snd_soc_dai *dai) 434 struct snd_soc_dai *dai)
434{ 435{
435 int ret;
436 struct fsl_esai *esai_priv = snd_soc_dai_get_drvdata(dai); 436 struct fsl_esai *esai_priv = snd_soc_dai_get_drvdata(dai);
437 int ret;
437 438
438 /* 439 /*
439 * Some platforms might use the same bit to gate all three or two of 440 * Some platforms might use the same bit to gate all three or two of
@@ -491,7 +492,8 @@ static int fsl_esai_hw_params(struct snd_pcm_substream *substream,
491 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 492 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
492 u32 width = snd_pcm_format_width(params_format(params)); 493 u32 width = snd_pcm_format_width(params_format(params));
493 u32 channels = params_channels(params); 494 u32 channels = params_channels(params);
494 u32 bclk, mask, val, ret; 495 u32 bclk, mask, val;
496 int ret;
495 497
496 bclk = params_rate(params) * esai_priv->slot_width * 2; 498 bclk = params_rate(params) * esai_priv->slot_width * 2;
497 499
@@ -816,6 +818,7 @@ static int fsl_esai_probe(struct platform_device *pdev)
816 818
817static const struct of_device_id fsl_esai_dt_ids[] = { 819static const struct of_device_id fsl_esai_dt_ids[] = {
818 { .compatible = "fsl,imx35-esai", }, 820 { .compatible = "fsl,imx35-esai", },
821 { .compatible = "fsl,vf610-esai", },
819 {} 822 {}
820}; 823};
821MODULE_DEVICE_TABLE(of, fsl_esai_dt_ids); 824MODULE_DEVICE_TABLE(of, fsl_esai_dt_ids);
diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index 6452ca83d889..daa6198ae41f 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -13,18 +13,18 @@
13 * kind, whether express or implied. 13 * kind, whether express or implied.
14 */ 14 */
15 15
16#include <linux/module.h> 16#include <linux/bitrev.h>
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/clk-private.h> 18#include <linux/clk-private.h>
19#include <linux/bitrev.h> 19#include <linux/module.h>
20#include <linux/regmap.h>
21#include <linux/of_address.h> 20#include <linux/of_address.h>
22#include <linux/of_device.h> 21#include <linux/of_device.h>
23#include <linux/of_irq.h> 22#include <linux/of_irq.h>
23#include <linux/regmap.h>
24 24
25#include <sound/asoundef.h> 25#include <sound/asoundef.h>
26#include <sound/soc.h>
27#include <sound/dmaengine_pcm.h> 26#include <sound/dmaengine_pcm.h>
27#include <sound/soc.h>
28 28
29#include "fsl_spdif.h" 29#include "fsl_spdif.h"
30#include "imx-pcm.h" 30#include "imx-pcm.h"
@@ -1186,6 +1186,7 @@ static int fsl_spdif_probe(struct platform_device *pdev)
1186 1186
1187static const struct of_device_id fsl_spdif_dt_ids[] = { 1187static const struct of_device_id fsl_spdif_dt_ids[] = {
1188 { .compatible = "fsl,imx35-spdif", }, 1188 { .compatible = "fsl,imx35-spdif", },
1189 { .compatible = "fsl,vf610-spdif", },
1189 {} 1190 {}
1190}; 1191};
1191MODULE_DEVICE_TABLE(of, fsl_spdif_dt_ids); 1192MODULE_DEVICE_TABLE(of, fsl_spdif_dt_ids);
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 8d58b50bfbee..9bfef55d77d1 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -39,6 +39,7 @@
39#include <linux/delay.h> 39#include <linux/delay.h>
40#include <linux/slab.h> 40#include <linux/slab.h>
41#include <linux/spinlock.h> 41#include <linux/spinlock.h>
42#include <linux/of.h>
42#include <linux/of_address.h> 43#include <linux/of_address.h>
43#include <linux/of_irq.h> 44#include <linux/of_irq.h>
44#include <linux/of_platform.h> 45#include <linux/of_platform.h>
diff --git a/sound/soc/fsl/imx-pcm-dma.c b/sound/soc/fsl/imx-pcm-dma.c
index 2585ae44e634..0849b7b83f0a 100644
--- a/sound/soc/fsl/imx-pcm-dma.c
+++ b/sound/soc/fsl/imx-pcm-dma.c
@@ -40,7 +40,6 @@ static const struct snd_pcm_hardware imx_pcm_hardware = {
40 SNDRV_PCM_INFO_MMAP_VALID | 40 SNDRV_PCM_INFO_MMAP_VALID |
41 SNDRV_PCM_INFO_PAUSE | 41 SNDRV_PCM_INFO_PAUSE |
42 SNDRV_PCM_INFO_RESUME, 42 SNDRV_PCM_INFO_RESUME,
43 .formats = SNDRV_PCM_FMTBIT_S16_LE,
44 .buffer_bytes_max = IMX_SSI_DMABUF_SIZE, 43 .buffer_bytes_max = IMX_SSI_DMABUF_SIZE,
45 .period_bytes_min = 128, 44 .period_bytes_min = 128,
46 .period_bytes_max = 65535, /* Limited by SDMA engine */ 45 .period_bytes_max = 65535, /* Limited by SDMA engine */