Skip to contentSkip to conversation

ASoC: fsl-ssi: ac97-slave support

PATCH Applied Markus Pargmann 2 participants 20 messages Jul 27, 2013 – Aug 11, 2013

Subsystems (6)

v10 of 11 Applied Latest is v11 →

lore
Share & tools
lore
#0 lore raw

v10 cover ASoC: fsl-ssi: ac97-slave support

Hi,

this series implements ac97-slave support for fsl-ssi and phycore ac97 DT support.

Since v9 there were a lot of changes. I dropped the board specific ac97-link reset functions and added generic functions to soc-core. It uses devicetree parsed pinctrl and gpios. The audmux setup was removed from phycore-ac97-dt. The initial setup can now be defined in DT.

Regards,

Markus

Markus Pargmann (7):
ASoC: core: Generic ac97 link reset functions
ASoC: codec: wm9712 simple DT bindings
ASoC: imx-audmux: Read default configuration from devicetree
ASoC: fsl-ssi: Add support for imx-pcm-fiq
ASoC: fsl-ssi: Use generic DMA bindings if possible
ASoC: fsl-ssi: ac97-slave support
ASoC: Add phycore-ac97-dt driver

 .../devicetree/bindings/sound/fsl,ssi.txt          |  12 +
 .../devicetree/bindings/sound/imx-audmux.txt       |   9 +
 .../bindings/sound/phytec,phycore-ac97.txt         |  16 +
 .../devicetree/bindings/sound/soc-ac97link.txt     |  28 ++
 Documentation/devicetree/bindings/sound/wm9712.txt |  10 +
 include/sound/soc.h                                |   2 +
 sound/soc/codecs/wm9712.c                          |   9 +
 sound/soc/fsl/Kconfig                              |  15 +-
 sound/soc/fsl/Makefile                             |   2 +
 sound/soc/fsl/fsl_ssi.c                            | 431 +++++++++++++++++----
 sound/soc/fsl/imx-audmux.c                         |  62 +++
 sound/soc/fsl/phycore-ac97-dt.c                    | 124 ++++++
 sound/soc/fsl/phycore-ac97.c                       |  13 +-
 sound/soc/soc-core.c                               | 153 ++++++++
 14 files changed, 789 insertions(+), 97 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/phytec,phycore-ac97.txt
 create mode 100644 Documentation/devicetree/bindings/sound/soc-ac97link.txt
 create mode 100644 Documentation/devicetree/bindings/sound/wm9712.txt
 create mode 100644 sound/soc/fsl/phycore-ac97-dt.c
#1 lore raw

PATCH v10 1/7 ASoC: core: Generic ac97 link reset functions

This patch adds generic ac97 reset functions using pincontrol and gpio parsed from devicetree.

---
 .../devicetree/bindings/sound/soc-ac97link.txt     |  28 ++++
 include/sound/soc.h                                |   2 +
 sound/soc/soc-core.c                               | 153 +++++++++++++++++++++
 3 files changed, 183 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/soc-ac97link.txt
Documentation/devicetree/bindings/sound/soc-ac97link.txt new file +28 -0
new file mode 100644
index 0000000..80152a8
@@ -0,0 +1,28 @@
+AC97 link bindings
+
+These bindings can be included within any other device node.
+
+Required properties:
+ - pinctrl-names: Has to contain following states to setup the correct
+   pinmuxing for the used gpios:
+	"ac97-running": AC97-link is active
+	"ac97-reset": AC97-link reset state
+	"ac97-warm-reset": AC97-link warm reset state
+ - ac97-gpios: List of gpio phandles with args in the order ac97-sync,
+   ac97-sdata, ac97-reset
+
+
+Example:
+
+ssi {
+	...
+
+	pinctrl-names = "default", "ac97-running", "ac97-reset", "ac97-warm-reset";
+	pinctrl-0 = <&ac97link_running>;
+	pinctrl-1 = <&ac97link_running>;
+	pinctrl-2 = <&ac97link_reset>;
+	pinctrl-3 = <&ac97link_warm_reset>;
+	ac97-gpios = <&gpio3 20 0 &gpio3 22 0 &gpio3 28 0>;
+
+	...
+};
include/sound/soc.h +2 -0
index 6eabee7..c0ac3bc 100644
@@ -468,6 +468,8 @@ int snd_soc_new_ac97_codec(struct snd_soc_codec *codec,
 void snd_soc_free_ac97_codec(struct snd_soc_codec *codec);
 
 int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops);
+int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
+		struct platform_device *pdev);
 
 /*
  *Controls
sound/soc/soc-core.c +153 -0

180 lines not on this page · raw message

Signature · 1 line
1.8.3.2
maintainer
#2 lore raw

Re: [PATCH v10 1/7] ASoC: core: Generic ac97 link reset functions

On Sat, Jul 27, 2013 at 01:31:50PM +0200, Markus Pargmann wrote:

This is a really nice approach to the problem, just one thing I'd like to see changed in the bindings:

Documentation/devicetree/bindings/sound/soc-ac97link.txt line 20

Quoted 4 lines
Documentation/devicetree/bindings/sound/soc-ac97link.txt new file +4 -0
+ssi {
+	...
+
+	pinctrl-names = "default", "ac97-running", "ac97-reset", "ac97-warm-reset";

I'd like to see some documentation of this "default" state - I'd expect this corresponds to the bus being idle and waiting for a wakeup from the CODEC which is definitely a useful state to have for power optimisation so it'd be good to bake it into the bindings.

Alternatively it could be the bus being totally idle with no possibility of wakeup in which case it'd be good to say that too then someone can add the waiting for wakeup state later.

Please also note the new list [email protected].

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

Re: [PATCH v10 1/7] ASoC: core: Generic ac97 link reset functions

Quoted 15 lines · Mark Brown

On Sat, Jul 27, 2013 at 01:31:50PM +0200, Markus Pargmann wrote:

This is a really nice approach to the problem, just one thing I'd like to see changed in the bindings:

Documentation/devicetree/bindings/sound/soc-ac97link.txt line 20

Quoted 4 lines
Documentation/devicetree/bindings/sound/soc-ac97link.txt new file +4 -0
+ssi {
+	...
+
+	pinctrl-names = "default", "ac97-running", "ac97-reset", "ac97-warm-reset";

I'd like to see some documentation of this "default" state - I'd expect this corresponds to the bus being idle and waiting for a wakeup from the CODEC which is definitely a useful state to have for power optimisation so it'd be good to bake it into the bindings.

Quoted 3 lines

Alternatively it could be the bus being totally idle with no possibility of wakeup in which case it'd be good to say that too then someone can add the waiting for wakeup state later.

The "default" state is actually just the default pin state that is set before the driver is probed. I will remove it from the example. I didn't add a low power state although it might be usefull and is defined by the standard.

Quoted 2 lines

Please also note the new list devicetree at vger.kernel.org.

Yes thanks.

Regards,

Markus

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#4 lore raw

PATCH v10 2/7 ASoC: codec: wm9712 simple DT bindings

In reply to Markus Pargmann
---
 Documentation/devicetree/bindings/sound/wm9712.txt | 10 ++++++++++
 sound/soc/codecs/wm9712.c                          |  9 +++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/wm9712.txt
Documentation/devicetree/bindings/sound/wm9712.txt new file +10 -0
new file mode 100644
index 0000000..d29f673
@@ -0,0 +1,10 @@
+WM9712 audio CODEC
+
+Required properties:
+  - compatible : "wlf,wm9712"
+
+Example:
+
+wm9712: codec {
+	compatible = "wlf,wm9712";
+};
sound/soc/codecs/wm9712.c +9 -0
index c5eb746..d619cdc 100644
@@ -697,10 +697,19 @@ static int wm9712_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id wm9712_codec_of_dev_id[] = {
+	{
+		.compatible = "wlf,wm9712",
+	}, {
+		/* sentinel */
+	}
+};
+
 static struct platform_driver wm9712_codec_driver = {
 	.driver = {
 		.name = "wm9712-codec",
 		.owner = THIS_MODULE,
+		.of_match_table = wm9712_codec_of_dev_id,
 	},
 
 	.probe = wm9712_probe,
Signature · 1 line
1.8.3.2
maintainer
#5 lore raw

Re: [PATCH v10 2/7] ASoC: codec: wm9712 simple DT bindings

Quoted 6 lines · Markus Pargmann
sound/soc/codecs/wm9712.c +6 -0
+static const struct of_device_id wm9712_codec_of_dev_id[] = {
+	{
+		.compatible = "wlf,wm9712",
+	}, {
+		/* sentinel */
+	}

sound/soc/codecs/wm9712.c static int wm9712_remove(struct platform_device *pdev) · line 715

Quoted 10 lines
sound/soc/codecs/wm9712.c +3 -0
+};
+
 static struct platform_driver wm9712_codec_driver = {
 	.driver = {
 		.name = "wm9712-codec",
 		.owner = THIS_MODULE,
+		.of_match_table = wm9712_codec_of_dev_id,
 	},
 
 	.probe = wm9712_probe,

AC'97 is an enumerable bus, we shouldn't need this...

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#6 lore raw

Re: [PATCH v10 2/7] ASoC: codec: wm9712 simple DT bindings

Quoted 17 lines · Mark Brown
Quoted 15 lines · Markus Pargmann
sound/soc/codecs/wm9712.c +9 -0
+static const struct of_device_id wm9712_codec_of_dev_id[] = {
+	{
+		.compatible = "wlf,wm9712",
+	}, {
+		/* sentinel */
+	}
+};
+
 static struct platform_driver wm9712_codec_driver = {
 	.driver = {
 		.name = "wm9712-codec",
 		.owner = THIS_MODULE,
+		.of_match_table = wm9712_codec_of_dev_id,
 	},
Quoted 3 lines
Quoted 1 line

.probe = wm9712_probe,

AC'97 is an enumerable bus, we shouldn't need this...

What do you mean exactly? Is there a way to automaticaly discover connected codecs and register them?

Regards,

Markus

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
maintainer
#7 lore raw

Re: [PATCH v10 2/7] ASoC: codec: wm9712 simple DT bindings

Quoted 6 lines · Markus Pargmann
Quoted 1 line · Mark Brown

AC'97 is an enumerable bus, we shouldn't need this...

What do you mean exactly? Is there a way to automaticaly discover connected codecs and register them?

Yes, of coure - just read the ID registers. Look at how the non-ASoC
AC'97 code works.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130727/e7bfe6d5/attachment.sig>

#8 lore raw

PATCH v10 3/7 ASoC: imx-audmux: Read default configuration from devicetree

In reply to Markus Pargmann

Adds a function to parse a default port configuration from devicetree.

---
 .../devicetree/bindings/sound/imx-audmux.txt       |  9 ++++
 sound/soc/fsl/imx-audmux.c                         | 62 ++++++++++++++++++++++
 2 files changed, 71 insertions(+)
Documentation/devicetree/bindings/sound/imx-audmux.txt +9 -0
index 215aa98..f88a00e 100644
@@ -5,6 +5,15 @@ Required properties:
   or "fsl,imx31-audmux" for the version firstly used on i.MX31.
 - reg : Should contain AUDMUX registers location and length
 
+An initial configuration can be setup using child nodes.
+
+Required properties of optional child nodes:
+- fsl,audmux-port : Integer of the audmux port that is configured by this
+  child node.
+- fsl,port-config : List of configuration options for the specific port. For
+  imx31-audmux and above, it is a list of tuples <ptcr pdcr>. For
+  imx21-audmux it is a list of pcr values.
+
 Example:
 
 audmux@021d8000 {
sound/soc/fsl/imx-audmux.c +62 -0

74 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#10 lore raw

Re: [PATCH v10 3/7] ASoC: imx-audmux: Read default configuration from devicetree

Quoted 4 lines · Mark Brown
Quoted 1 line · Markus Pargmann

Adds a function to parse a default port configuration from devicetree.

Applied, thanks - this is a really nice improvement.

Sorry, but I noticed two bugs in this patch, I will send a fixup.

Regards,

Markus

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#11 lore raw

PATCH 1/1 ASoC: imx-audmux: default configuration parser fixups

---
 sound/soc/fsl/imx-audmux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/fsl/imx-audmux.c +2 -2
index f37cd9c..b21b85f 100644
@@ -270,7 +270,7 @@ static int imx_audmux_parse_dt_defaults(struct platform_device *pdev,
 		}
 
 		for (i = 0; (ret = of_property_read_u32_index(child,
-					"fsl,port-config\n", i, &val)) == 0;
+					"fsl,port-config", i, &val)) == 0;
 				++i) {
 			if (audmux_type == IMX31_AUDMUX) {
 				if (i % 2)
@@ -282,7 +282,7 @@ static int imx_audmux_parse_dt_defaults(struct platform_device *pdev,
 			}
 		}
 
-		if (ret != -ENODATA) {
+		if (ret != -EOVERFLOW) {
 			dev_err(&pdev->dev, "Failed to read u32 at index %d of child %s\n",
 					i, child->full_name);
 			continue;
Signature · 1 line
1.8.3.2
#13 lore raw

PATCH v10 4/7 ASoC: fsl-ssi: Add support for imx-pcm-fiq

In reply to Markus Pargmann

Add support for non-dma pcm for imx platforms with imx-pcm-fiq support. Instead of imx-pcm-audio, in this case imx-pcm-fiq-audio device is added and the SIER flags are set differently.

We need imx-pcm-fiq for some boards that use an incompatible codec. imx-pcm-fiq handles those codecs differently and allows to operate with them. DMA is not possible because some data sent by the codecs, e.g. wm9712, is not in the datastream. Also some data is mixed up in the fifos, so that we need to sort them out manually.

---
 .../devicetree/bindings/sound/fsl,ssi.txt          |  4 ++
 sound/soc/fsl/fsl_ssi.c                            | 79 ++++++++++++++++++----
 2 files changed, 71 insertions(+), 12 deletions(-)
Documentation/devicetree/bindings/sound/fsl,ssi.txt +4 -0
index 5ff76c9..e45cbce 100644
@@ -47,6 +47,10 @@ Optional properties:
 - codec-handle:     Phandle to a 'codec' node that defines an audio
                     codec connected to this SSI.  This node is typically
                     a child of an I2C or other control node.
+- fsl,fiq-stream-filter: Bool property. Disabled DMA and use FIQ instead to
+		    filter the codec stream. This is necessary for some boards
+		    where an incompatible codec is connected to this SSI, e.g.
+		    on pca100 and pcm043.
 
 Child 'codec' node required properties:
 - compatible:       Compatible list, contains the name of the codec
sound/soc/fsl/fsl_ssi.c +67 -12

132 lines not on this page · raw message

Signature · 1 line
1.8.3.2
maintainer Applied
#14 lore raw

Re: [PATCH v10 4/7] ASoC: fsl-ssi: Add support for imx-pcm-fiq

Quoted 3 lines · Markus Pargmann

Add support for non-dma pcm for imx platforms with imx-pcm-fiq support. Instead of imx-pcm-audio, in this case imx-pcm-fiq-audio device is added and the SIER flags are set differently.

Applied, thanks. Ideally we'd have a quirk infrastructure to figure out if this is required but it really doesn't seem worth it.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#15 lore raw

PATCH v10 5/7 ASoC: fsl-ssi: Use generic DMA bindings if possible

In reply to Markus Pargmann

There may be some platforms using fsl-ssi that do not have a DMA driver with generic DMA bindings. So this patch adds support for the generic DMA bindings, while still accepting the old "fsl,dma-events" property if "dmas" is not found.

---
 Documentation/devicetree/bindings/sound/fsl,ssi.txt |  4 ++++
 sound/soc/fsl/fsl_ssi.c                             | 20 ++++++++++++--------
 2 files changed, 16 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/sound/fsl,ssi.txt +4 -0
index e45cbce..088a2c0 100644
@@ -51,6 +51,10 @@ Optional properties:
 		    filter the codec stream. This is necessary for some boards
 		    where an incompatible codec is connected to this SSI, e.g.
 		    on pca100 and pcm043.
+- dmas:		    Generic dma devicetree binding as described in
+		    Documentation/devicetree/bindings/dma/dma.txt.
+- dma-names:	    Two dmas have to be defined, "tx" and "rx", if fsl,imx-fiq
+		    is not defined.
 
 Child 'codec' node required properties:
 - compatible:       Compatible list, contains the name of the codec
sound/soc/fsl/fsl_ssi.c +12 -8
index 8b075ef..0c072ff 100644
@@ -794,15 +794,19 @@ static int fsl_ssi_probe(struct platform_device *pdev)
 			&ssi_private->filter_data_tx;
 		ssi_private->dma_params_rx.filter_data =
 			&ssi_private->filter_data_rx;
-		/*
-		 * TODO: This is a temporary solution and should be changed
-		 * to use generic DMA binding later when the helplers get in.
-		 */
-		ret = of_property_read_u32_array(pdev->dev.of_node,
+		if (!of_property_read_bool(pdev->dev.of_node, "dmas") &&
+				ssi_private->use_dma) {
+			/*
+			 * FIXME: This is a temporary solution until all
+			 * necessary dma drivers support the generic dma
+			 * bindings.
+			 */
+			ret = of_property_read_u32_array(pdev->dev.of_node,
 					"fsl,ssi-dma-events", dma_events, 2);
-		if (ret && !ssi_private->use_dma) {
-			dev_err(&pdev->dev, "could not get dma events\n");
-			goto error_clk;
+			if (ret && ssi_private->use_dma) {
+				dev_err(&pdev->dev, "could not get dma events but fsl-ssi is configured to use DMA\n");
+				goto error_clk;
+			}
 		}
 
 		shared = of_device_is_compatible(of_get_parent(np),
Signature · 1 line
1.8.3.2
maintainer
#16 lore raw

Re: [PATCH v10 5/7] ASoC: fsl-ssi: Use generic DMA bindings if possible

Quoted 4 lines · Markus Pargmann

There may be some platforms using fsl-ssi that do not have a DMA driver with generic DMA bindings. So this patch adds support for the generic DMA bindings, while still accepting the old "fsl,dma-events" property if "dmas" is not found.

Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130806/80ee4959/attachment.sig>

#17 lore raw

PATCH v10 6/7 ASoC: fsl-ssi: ac97-slave support

In reply to Markus Pargmann

This patch adds ac97-slave support.

For ac97, the registers have to be setup earlier than for other ssi modes because there is some communication with the external device before streaming. So this patch introduces a fsl_ssi_setup function to setup the registers for different ssi operation modes seperately.

This patch was tested with imx27-pca100.

---
 .../devicetree/bindings/sound/fsl,ssi.txt          |   4 +
 sound/soc/fsl/fsl_ssi.c                            | 346 ++++++++++++++++-----
 2 files changed, 280 insertions(+), 70 deletions(-)
Documentation/devicetree/bindings/sound/fsl,ssi.txt +4 -0
index 088a2c0..4303b6a 100644
@@ -43,6 +43,10 @@ Required properties:
                     together.  This would still allow different sample sizes,
                     but not different sample rates.
 
+Required are also ac97 link bindings if ac97 is used. See
+Documentation/devicetree/bindings/sound/soc-ac97link.txt for the necessary
+bindings.
+
 Optional properties:
 - codec-handle:     Phandle to a 'codec' node that defines an audio
                     codec connected to this SSI.  This node is typically
sound/soc/fsl/fsl_ssi.c +276 -70

404 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#19 lore raw

PATCH v10 7/7 ASoC: Add phycore-ac97-dt driver

In reply to Markus Pargmann

Add devicetree support for phycore-ac97 driver in a seperated driver for DT loading. The seperation reduces the confusion with the old style initialization of this driver via late_initcall. Also this driver is using fsl-ssi instead of imx-ssi.

platform_of_node and cpu_of_node are set according to the fsl,audmux phandle.

This patch adds handling of ac97 reset functions according to fsl ac97 support. They are setup from here to avoid board specific code in the generic fsl-ssi driver.

---
 .../bindings/sound/phytec,phycore-ac97.txt         |  16 +++
 sound/soc/fsl/Kconfig                              |  15 ++-
 sound/soc/fsl/Makefile                             |   2 +
 sound/soc/fsl/phycore-ac97-dt.c                    | 124 +++++++++++++++++++++
 sound/soc/fsl/phycore-ac97.c                       |  13 +--
 5 files changed, 156 insertions(+), 14 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/phytec,phycore-ac97.txt
 create mode 100644 sound/soc/fsl/phycore-ac97-dt.c
Documentation/devicetree/bindings/sound/phytec,phycore-ac97.txt new file +16 -0
new file mode 100644
index 0000000..b3ce9cb
@@ -0,0 +1,16 @@
+Phytec phycore AC97
+
+Required properties:
+- compatible: "phytec,phycore-ac97"
+- phytec,ssi: A phandle to the ssi device that is connected to ac97.
+- phytec,audmux: A phandle to the audmux device.
+- audio-codec: phandle to the codec device node.
+
+Example:
+
+sound {
+	compatible = "phytec,phycore-ac97";
+	phytec,ssi = <&ssi1>;
+	phytec,audmux = <&audmux>;
+	audio-codec = <&codec>;
+};
sound/soc/fsl/Kconfig +13 -2
index 3a79d01..5f992b3 100644
@@ -142,8 +142,8 @@ config SND_SOC_MX27VIS_AIC32X4
 	  board with TLV320AIC32X4 codec.
 
 config SND_SOC_PHYCORE_AC97
-	tristate "SoC Audio support for Phytec phyCORE (and phyCARD) boards"
-	depends on MACH_PCM043 || MACH_PCA100
+	tristate "SoC Audio support for Phytec phyCORE boards"
+	depends on MACH_PCM043
 	select SND_SOC_AC97_BUS
 	select SND_SOC_WM9712
 	select SND_SOC_IMX_PCM_FIQ
@@ -153,6 +153,17 @@ config SND_SOC_PHYCORE_AC97
 	  Say Y if you want to add support for SoC audio on Phytec phyCORE
 	  and phyCARD boards in AC97 mode
 
+config SND_SOC_PHYCORE_AC97_DT
+	tristate "SoC Audio support for Phytec phyCORE (and phyCARD) boards (devicetree only)"
+	select SND_SOC_AC97_BUS
+	select SND_SOC_WM9712
+	select SND_SOC_IMX_PCM_FIQ
+	select SND_SOC_IMX_AUDMUX
+	select SND_SOC_FSL_SSI
+	help
+	  Say Y if you want to add support for SoC audio on Phytec phyCORE
+	  and phyCARD boards in AC97 mode when using devicetree.
+
 config SND_SOC_EUKREA_TLV320
 	tristate "Eukrea TLV320"
 	depends on MACH_EUKREA_MBIMX27_BASEBOARD \
sound/soc/fsl/Makefile +2 -0
index d4b4aa8..31bdd69 100644
@@ -39,6 +39,7 @@ obj-$(CONFIG_SND_SOC_IMX_PCM_DMA) += imx-pcm-dma.o
 # i.MX Machine Support
 snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o
 snd-soc-phycore-ac97-objs := phycore-ac97.o
+snd-soc-phycore-ac97-dt-objs := phycore-ac97-dt.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
@@ -47,6 +48,7 @@ snd-soc-imx-mc13783-objs := imx-mc13783.o
 
 obj-$(CONFIG_SND_SOC_EUKREA_TLV320) += snd-soc-eukrea-tlv320.o
 obj-$(CONFIG_SND_SOC_PHYCORE_AC97) += snd-soc-phycore-ac97.o
+obj-$(CONFIG_SND_SOC_PHYCORE_AC97_DT) += snd-soc-phycore-ac97-dt.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
sound/soc/fsl/phycore-ac97-dt.c new file +124 -0

124 lines not on this page · raw message

sound/soc/fsl/phycore-ac97.c +1 -12
index ae403c2..4126edc 100644
@@ -52,18 +52,7 @@ static int __init imx_phycore_init(void)
 {
 	int ret;
 
-	if (machine_is_pca100()) {
-		imx_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0,
-			IMX_AUDMUX_V1_PCR_SYN | /* 4wire mode */
-			IMX_AUDMUX_V1_PCR_TFCSEL(3) |
-			IMX_AUDMUX_V1_PCR_TCLKDIR | /* clock is output */
-			IMX_AUDMUX_V1_PCR_RXDSEL(3));
-		imx_audmux_v1_configure_port(3,
-			IMX_AUDMUX_V1_PCR_SYN | /* 4wire mode */
-			IMX_AUDMUX_V1_PCR_TFCSEL(0) |
-			IMX_AUDMUX_V1_PCR_TFSDIR |
-			IMX_AUDMUX_V1_PCR_RXDSEL(0));
-	} else if (machine_is_pcm043()) {
+	if (machine_is_pcm043()) {
 		imx_audmux_v2_configure_port(3,
 			IMX_AUDMUX_V2_PTCR_SYN | /* 4wire mode */
 			IMX_AUDMUX_V2_PTCR_TFSEL(0) |
Signature · 1 line
1.8.3.2