Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d664db6 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next

parents 5ec393bc 8de2ae2a
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
Freescale i.MX audio complex with WM8962 codec

Required properties:
- compatible : "fsl,imx-audio-wm8962"
- model : The user-visible name of this sound complex
- ssi-controller : The phandle of the i.MX SSI controller
- audio-codec : The phandle of the WM8962 audio codec
- audio-routing : A list of the connections between audio components.
  Each entry is a pair of strings, the first being the connection's sink,
  the second being the connection's source. Valid names could be power
  supplies, WM8962 pins, and the jacks on the board:

  Power supplies:
   * Mic Bias

  Board connectors:
   * Mic Jack
   * Headphone Jack
   * Ext Spk

- mux-int-port : The internal port of the i.MX audio muxer (AUDMUX)
- mux-ext-port : The external port of the i.MX audio muxer

Note: The AUDMUX port numbering should start at 1, which is consistent with
hardware manual.

Example:

sound {
	compatible = "fsl,imx6q-sabresd-wm8962",
		     "fsl,imx-audio-wm8962";
	model = "wm8962-audio";
	ssi-controller = <&ssi2>;
	audio-codec = <&codec>;
		audio-routing =
		"Headphone Jack", "HPOUTL",
		"Headphone Jack", "HPOUTR",
		"Ext Spk", "SPKOUTL",
		"Ext Spk", "SPKOUTR",
		"MICBIAS", "AMIC",
		"IN3R", "MICBIAS",
		"DMIC", "MICBIAS",
		"DMICDAT", "DMIC";
	mux-int-port = <2>;
	mux-ext-port = <3>;
};
+12 −5
Original line number Diff line number Diff line
@@ -108,18 +108,13 @@ if SND_IMX_SOC
config SND_SOC_IMX_SSI
	tristate

config SND_SOC_IMX_PCM
	tristate

config SND_SOC_IMX_PCM_FIQ
	bool
	select FIQ
	select SND_SOC_IMX_PCM

config SND_SOC_IMX_PCM_DMA
	bool
	select SND_SOC_GENERIC_DMAENGINE_PCM
	select SND_SOC_IMX_PCM

config SND_SOC_IMX_AUDMUX
	tristate
@@ -173,6 +168,18 @@ config SND_SOC_EUKREA_TLV320
	  Enable I2S based access to the TLV320AIC23B codec attached
	  to the SSI interface

config SND_SOC_IMX_WM8962
	tristate "SoC Audio support for i.MX boards with wm8962"
	depends on OF && I2C
	select SND_SOC_WM8962
	select SND_SOC_IMX_PCM_DMA
	select SND_SOC_IMX_AUDMUX
	select SND_SOC_FSL_SSI
	select SND_SOC_FSL_UTILS
	help
	  Say Y if you want to add support for SoC audio on an i.MX board with
	  a wm8962 codec.

config SND_SOC_IMX_SGTL5000
	tristate "SoC Audio support for i.MX boards with sgtl5000"
	depends on OF && I2C
+4 −9
Original line number Diff line number Diff line
@@ -30,18 +30,11 @@ obj-$(CONFIG_SND_MPC52xx_SOC_EFIKA) += efika-audio-fabric.o
# i.MX Platform Support
snd-soc-imx-ssi-objs := imx-ssi.o
snd-soc-imx-audmux-objs := imx-audmux.o
snd-soc-imx-pcm-objs := imx-pcm.o
ifneq ($(CONFIG_SND_SOC_IMX_PCM_FIQ),)
	snd-soc-imx-pcm-objs += imx-pcm-fiq.o
endif
ifneq ($(CONFIG_SND_SOC_IMX_PCM_DMA),)
	snd-soc-imx-pcm-objs += imx-pcm-dma.o
endif

obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o
obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o

obj-$(CONFIG_SND_SOC_IMX_PCM) += snd-soc-imx-pcm.o
obj-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += imx-pcm-fiq.o
obj-$(CONFIG_SND_SOC_IMX_PCM_DMA) += imx-pcm-dma.o

# i.MX Machine Support
snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o
@@ -49,6 +42,7 @@ snd-soc-phycore-ac97-objs := phycore-ac97.o
snd-soc-mx27vis-aic32x4-objs := mx27vis-aic32x4.o
snd-soc-wm1133-ev1-objs := wm1133-ev1.o
snd-soc-imx-sgtl5000-objs := imx-sgtl5000.o
snd-soc-imx-wm8962-objs := imx-wm8962.o
snd-soc-imx-mc13783-objs := imx-mc13783.o

obj-$(CONFIG_SND_SOC_EUKREA_TLV320) += snd-soc-eukrea-tlv320.o
@@ -56,4 +50,5 @@ obj-$(CONFIG_SND_SOC_PHYCORE_AC97) += snd-soc-phycore-ac97.o
obj-$(CONFIG_SND_SOC_MX27VIS_AIC32X4) += snd-soc-mx27vis-aic32x4.o
obj-$(CONFIG_SND_MXC_SOC_WM1133_EV1) += snd-soc-wm1133-ev1.o
obj-$(CONFIG_SND_SOC_IMX_SGTL5000) += snd-soc-imx-sgtl5000.o
obj-$(CONFIG_SND_SOC_IMX_WM8962) += snd-soc-imx-wm8962.o
obj-$(CONFIG_SND_SOC_IMX_MC13783) += snd-soc-imx-mc13783.o
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ static struct snd_soc_dai_link eukrea_tlv320_dai = {
	.name		= "tlv320aic23",
	.stream_name	= "TLV320AIC23",
	.codec_dai_name	= "tlv320aic23-hifi",
	.platform_name	= "imx-fiq-pcm-audio.0",
	.platform_name	= "imx-ssi.0",
	.codec_name	= "tlv320aic23-codec.0-001a",
	.cpu_dai_name	= "imx-ssi.0",
	.ops		= &eukrea_tlv320_snd_ops,
+4 −9
Original line number Diff line number Diff line
@@ -122,7 +122,6 @@ struct fsl_ssi_private {
	bool new_binding;
	bool ssi_on_imx;
	struct clk *clk;
	struct platform_device *imx_pcm_pdev;
	struct snd_dmaengine_dai_dma_data dma_params_tx;
	struct snd_dmaengine_dai_dma_data dma_params_rx;
	struct imx_dma_data filter_data_tx;
@@ -809,14 +808,10 @@ static int fsl_ssi_probe(struct platform_device *pdev)
	}

	if (ssi_private->ssi_on_imx) {
		ssi_private->imx_pcm_pdev =
			platform_device_register_simple("imx-pcm-audio",
							-1, NULL, 0);
		if (IS_ERR(ssi_private->imx_pcm_pdev)) {
			ret = PTR_ERR(ssi_private->imx_pcm_pdev);
		ret = imx_pcm_dma_init(pdev);
		if (ret)
			goto error_dev;
	}
	}

	/*
	 * If codec-handle property is missing from SSI node, we assume
@@ -854,7 +849,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)

error_dai:
	if (ssi_private->ssi_on_imx)
		platform_device_unregister(ssi_private->imx_pcm_pdev);
		imx_pcm_dma_exit(pdev);
	snd_soc_unregister_component(&pdev->dev);

error_dev:
@@ -889,7 +884,7 @@ static int fsl_ssi_remove(struct platform_device *pdev)
	if (!ssi_private->new_binding)
		platform_device_unregister(ssi_private->pdev);
	if (ssi_private->ssi_on_imx) {
		platform_device_unregister(ssi_private->imx_pcm_pdev);
		imx_pcm_dma_exit(pdev);
		clk_disable_unprepare(ssi_private->clk);
		clk_put(ssi_private->clk);
	}
Loading