1
0
Fork 0

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
wifi-calibration
Mark Brown 2014-06-01 14:02:07 +01:00
commit 287d414eac
5 changed files with 70 additions and 32 deletions

View File

@ -1,31 +1,78 @@
menu "SoC Audio for Freescale CPUs"
comment "Common SoC Audio options for Freescale CPUs:"
config SND_SOC_FSL_SAI config SND_SOC_FSL_SAI
tristate tristate "Synchronous Audio Interface (SAI) module support"
select REGMAP_MMIO select REGMAP_MMIO
select SND_SOC_GENERIC_DMAENGINE_PCM select SND_SOC_GENERIC_DMAENGINE_PCM
help
Say Y if you want to add Synchronous Audio Interface (SAI)
support for the Freescale CPUs.
This option is only useful for out-of-tree drivers since
in-tree drivers select it automatically.
config SND_SOC_FSL_SSI config SND_SOC_FSL_SSI
tristate "Synchronous Serial Interface module support"
select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n
select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && ARCH_MXC
select REGMAP_MMIO select REGMAP_MMIO
tristate help
Say Y if you want to add Synchronous Serial Interface (SSI)
support for the Freescale CPUs.
This option is only useful for out-of-tree drivers since
in-tree drivers select it automatically.
config SND_SOC_FSL_SPDIF config SND_SOC_FSL_SPDIF
tristate tristate "Sony/Philips Digital Interface module support"
select REGMAP_MMIO select REGMAP_MMIO
select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n
select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && ARCH_MXC
help
Say Y if you want to add Sony/Philips Digital Interface (SPDIF)
support for the Freescale CPUs.
This option is only useful for out-of-tree drivers since
in-tree drivers select it automatically.
config SND_SOC_FSL_ESAI config SND_SOC_FSL_ESAI
tristate tristate "Enhanced Serial Audio Interface (ESAI) module support"
select REGMAP_MMIO select REGMAP_MMIO
select SND_SOC_FSL_UTILS select SND_SOC_FSL_UTILS
help
Say Y if you want to add Enhanced Synchronous Audio Interface
(ESAI) support for the Freescale CPUs.
This option is only useful for out-of-tree drivers since
in-tree drivers select it automatically.
config SND_SOC_FSL_UTILS config SND_SOC_FSL_UTILS
tristate tristate
menuconfig SND_POWERPC_SOC config SND_SOC_IMX_PCM_DMA
tristate
select SND_SOC_GENERIC_DMAENGINE_PCM
config SND_SOC_IMX_AUDMUX
tristate "Digital Audio Mux module support"
help
Say Y if you want to add Digital Audio Mux (AUDMUX) support
for the ARM i.MX CPUs.
This option is only useful for out-of-tree drivers since
in-tree drivers select it automatically.
config SND_POWERPC_SOC
tristate "SoC Audio for Freescale PowerPC CPUs" tristate "SoC Audio for Freescale PowerPC CPUs"
depends on FSL_SOC || PPC_MPC52xx depends on FSL_SOC || PPC_MPC52xx
help help
Say Y or M if you want to add support for codecs attached to Say Y or M if you want to add support for codecs attached to
the PowerPC CPUs. the PowerPC CPUs.
config SND_IMX_SOC
tristate "SoC Audio for Freescale i.MX CPUs"
depends on ARCH_MXC || COMPILE_TEST
help
Say Y or M if you want to add support for codecs attached to
the i.MX CPUs.
if SND_POWERPC_SOC if SND_POWERPC_SOC
config SND_MPC52xx_DMA config SND_MPC52xx_DMA
@ -34,6 +81,8 @@ config SND_MPC52xx_DMA
config SND_SOC_POWERPC_DMA config SND_SOC_POWERPC_DMA
tristate tristate
comment "SoC Audio support for Freescale PPC boards:"
config SND_SOC_MPC8610_HPCD config SND_SOC_MPC8610_HPCD
tristate "ALSA SoC support for the Freescale MPC8610 HPCD board" tristate "ALSA SoC support for the Freescale MPC8610 HPCD board"
# I2C is necessary for the CS4270 driver # I2C is necessary for the CS4270 driver
@ -111,13 +160,6 @@ config SND_MPC52xx_SOC_EFIKA
endif # SND_POWERPC_SOC endif # SND_POWERPC_SOC
menuconfig SND_IMX_SOC
tristate "SoC Audio for Freescale i.MX CPUs"
depends on ARCH_MXC || COMPILE_TEST
help
Say Y or M if you want to add support for codecs attached to
the i.MX CPUs.
if SND_IMX_SOC if SND_IMX_SOC
config SND_SOC_IMX_SSI config SND_SOC_IMX_SSI
@ -128,12 +170,7 @@ config SND_SOC_IMX_PCM_FIQ
tristate tristate
select FIQ select FIQ
config SND_SOC_IMX_PCM_DMA comment "SoC Audio support for Freescale i.MX boards:"
tristate
select SND_SOC_GENERIC_DMAENGINE_PCM
config SND_SOC_IMX_AUDMUX
tristate
config SND_MXC_SOC_WM1133_EV1 config SND_MXC_SOC_WM1133_EV1
tristate "Audio on the i.MX31ADS with WM1133-EV1 fitted" tristate "Audio on the i.MX31ADS with WM1133-EV1 fitted"
@ -171,12 +208,7 @@ config SND_SOC_PHYCORE_AC97
config SND_SOC_EUKREA_TLV320 config SND_SOC_EUKREA_TLV320
tristate "Eukrea TLV320" tristate "Eukrea TLV320"
depends on MACH_EUKREA_MBIMX27_BASEBOARD \ depends on ARCH_MXC && I2C
|| MACH_EUKREA_MBIMXSD25_BASEBOARD \
|| MACH_EUKREA_MBIMXSD35_BASEBOARD \
|| MACH_EUKREA_MBIMXSD51_BASEBOARD \
|| (OF && ARM)
depends on I2C
select SND_SOC_TLV320AIC23_I2C select SND_SOC_TLV320AIC23_I2C
select SND_SOC_IMX_AUDMUX select SND_SOC_IMX_AUDMUX
select SND_SOC_IMX_SSI select SND_SOC_IMX_SSI
@ -226,3 +258,5 @@ config SND_SOC_IMX_MC13783
select SND_SOC_IMX_PCM_DMA select SND_SOC_IMX_PCM_DMA
endif # SND_IMX_SOC endif # SND_IMX_SOC
endmenu

View File

@ -209,8 +209,9 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
struct clk *clksrc = esai_priv->extalclk; struct clk *clksrc = esai_priv->extalclk;
bool tx = clk_id <= ESAI_HCKT_EXTAL; bool tx = clk_id <= ESAI_HCKT_EXTAL;
bool in = dir == SND_SOC_CLOCK_IN; bool in = dir == SND_SOC_CLOCK_IN;
u32 ret, ratio, ecr = 0; u32 ratio, ecr = 0;
unsigned long clk_rate; unsigned long clk_rate;
int ret;
/* sck_div can be only bypassed if ETO/ERO=0 and SNC_SOC_CLOCK_OUT */ /* sck_div can be only bypassed if ETO/ERO=0 and SNC_SOC_CLOCK_OUT */
esai_priv->sck_div[tx] = true; 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)
static int fsl_esai_startup(struct snd_pcm_substream *substream, static int fsl_esai_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) struct snd_soc_dai *dai)
{ {
int ret;
struct fsl_esai *esai_priv = snd_soc_dai_get_drvdata(dai); struct fsl_esai *esai_priv = snd_soc_dai_get_drvdata(dai);
int ret;
/* /*
* Some platforms might use the same bit to gate all three or two of * 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,
bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
u32 width = snd_pcm_format_width(params_format(params)); u32 width = snd_pcm_format_width(params_format(params));
u32 channels = params_channels(params); u32 channels = params_channels(params);
u32 bclk, mask, val, ret; u32 bclk, mask, val;
int ret;
bclk = params_rate(params) * esai_priv->slot_width * 2; bclk = params_rate(params) * esai_priv->slot_width * 2;
@ -816,6 +818,7 @@ static int fsl_esai_probe(struct platform_device *pdev)
static const struct of_device_id fsl_esai_dt_ids[] = { static const struct of_device_id fsl_esai_dt_ids[] = {
{ .compatible = "fsl,imx35-esai", }, { .compatible = "fsl,imx35-esai", },
{ .compatible = "fsl,vf610-esai", },
{} {}
}; };
MODULE_DEVICE_TABLE(of, fsl_esai_dt_ids); MODULE_DEVICE_TABLE(of, fsl_esai_dt_ids);

View File

@ -13,18 +13,18 @@
* kind, whether express or implied. * kind, whether express or implied.
*/ */
#include <linux/module.h> #include <linux/bitrev.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/clk-private.h> #include <linux/clk-private.h>
#include <linux/bitrev.h> #include <linux/module.h>
#include <linux/regmap.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/of_irq.h> #include <linux/of_irq.h>
#include <linux/regmap.h>
#include <sound/asoundef.h> #include <sound/asoundef.h>
#include <sound/soc.h>
#include <sound/dmaengine_pcm.h> #include <sound/dmaengine_pcm.h>
#include <sound/soc.h>
#include "fsl_spdif.h" #include "fsl_spdif.h"
#include "imx-pcm.h" #include "imx-pcm.h"
@ -1186,6 +1186,7 @@ static int fsl_spdif_probe(struct platform_device *pdev)
static const struct of_device_id fsl_spdif_dt_ids[] = { static const struct of_device_id fsl_spdif_dt_ids[] = {
{ .compatible = "fsl,imx35-spdif", }, { .compatible = "fsl,imx35-spdif", },
{ .compatible = "fsl,vf610-spdif", },
{} {}
}; };
MODULE_DEVICE_TABLE(of, fsl_spdif_dt_ids); MODULE_DEVICE_TABLE(of, fsl_spdif_dt_ids);

View File

@ -39,6 +39,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_irq.h> #include <linux/of_irq.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>

View File

@ -40,7 +40,6 @@ static const struct snd_pcm_hardware imx_pcm_hardware = {
SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_PAUSE |
SNDRV_PCM_INFO_RESUME, SNDRV_PCM_INFO_RESUME,
.formats = SNDRV_PCM_FMTBIT_S16_LE,
.buffer_bytes_max = IMX_SSI_DMABUF_SIZE, .buffer_bytes_max = IMX_SSI_DMABUF_SIZE,
.period_bytes_min = 128, .period_bytes_min = 128,
.period_bytes_max = 65535, /* Limited by SDMA engine */ .period_bytes_max = 65535, /* Limited by SDMA engine */