All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/9] DT instantiation of sound on T5325
@ 2014-05-03 18:30 ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: Jason Cooper, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn

This patchset uses DT to instantiate sound on the T5325. It adds a DT
binding to the codec, then removes the platform device for the codec
and adds a DT node. simple-card is extended to support mlck_fs. The
platform device for the audio device is then replaced with a DT node.
Lastly, two _defconfig's are updated to build the needed modules.

Andrew Lunn (9):
  ASoC: alc5623: Add device tree binding
  ARM: Kirkwood: Remove platform driver for codec
  ARM: Kirkwood: Add node for audio codec
  ARM: Kirkwood: DT: Add missing #sound-dai-cells property
  ASoC: simple-card: Support setting mclk via a fixed factor
  ARM: Kirkwood: t5325: Remove platform device to instantiate audio
  ARM: Kirkwood: t5325: Use simple card to instantiate audio
  ARM: mvebu_v5_defconfig: Enable sound modules needed for t5325
  ARM: multi_v5_defconfig: Enable sound modules needed for t5325

 .../devicetree/bindings/sound/alc5623.txt          | 25 +++++++++++++
 .../devicetree/bindings/sound/simple-card.txt      |  2 ++
 arch/arm/boot/dts/kirkwood-t5325.dts               | 33 +++++++++++++++++
 arch/arm/boot/dts/kirkwood.dtsi                    |  1 +
 arch/arm/configs/multi_v5_defconfig                |  3 +-
 arch/arm/configs/mvebu_v5_defconfig                |  3 +-
 arch/arm/mach-mvebu/Kconfig                        |  7 ----
 arch/arm/mach-mvebu/Makefile                       |  1 -
 arch/arm/mach-mvebu/board-t5325.c                  | 41 ----------------------
 arch/arm/mach-mvebu/board.h                        |  6 ----
 arch/arm/mach-mvebu/kirkwood.c                     |  3 --
 sound/soc/codecs/Kconfig                           |  2 +-
 sound/soc/codecs/alc5623.c                         | 20 +++++++++++
 sound/soc/generic/simple-card.c                    | 28 +++++++++++++++
 14 files changed, 114 insertions(+), 61 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/alc5623.txt
 delete mode 100644 arch/arm/mach-mvebu/board-t5325.c

-- 
2.0.0.rc0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v2 0/9] DT instantiation of sound on T5325
@ 2014-05-03 18:30 ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

This patchset uses DT to instantiate sound on the T5325. It adds a DT
binding to the codec, then removes the platform device for the codec
and adds a DT node. simple-card is extended to support mlck_fs. The
platform device for the audio device is then replaced with a DT node.
Lastly, two _defconfig's are updated to build the needed modules.

Andrew Lunn (9):
  ASoC: alc5623: Add device tree binding
  ARM: Kirkwood: Remove platform driver for codec
  ARM: Kirkwood: Add node for audio codec
  ARM: Kirkwood: DT: Add missing #sound-dai-cells property
  ASoC: simple-card: Support setting mclk via a fixed factor
  ARM: Kirkwood: t5325: Remove platform device to instantiate audio
  ARM: Kirkwood: t5325: Use simple card to instantiate audio
  ARM: mvebu_v5_defconfig: Enable sound modules needed for t5325
  ARM: multi_v5_defconfig: Enable sound modules needed for t5325

 .../devicetree/bindings/sound/alc5623.txt          | 25 +++++++++++++
 .../devicetree/bindings/sound/simple-card.txt      |  2 ++
 arch/arm/boot/dts/kirkwood-t5325.dts               | 33 +++++++++++++++++
 arch/arm/boot/dts/kirkwood.dtsi                    |  1 +
 arch/arm/configs/multi_v5_defconfig                |  3 +-
 arch/arm/configs/mvebu_v5_defconfig                |  3 +-
 arch/arm/mach-mvebu/Kconfig                        |  7 ----
 arch/arm/mach-mvebu/Makefile                       |  1 -
 arch/arm/mach-mvebu/board-t5325.c                  | 41 ----------------------
 arch/arm/mach-mvebu/board.h                        |  6 ----
 arch/arm/mach-mvebu/kirkwood.c                     |  3 --
 sound/soc/codecs/Kconfig                           |  2 +-
 sound/soc/codecs/alc5623.c                         | 20 +++++++++++
 sound/soc/generic/simple-card.c                    | 28 +++++++++++++++
 14 files changed, 114 insertions(+), 61 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/alc5623.txt
 delete mode 100644 arch/arm/mach-mvebu/board-t5325.c

-- 
2.0.0.rc0

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v2 1/9] ASoC: alc5623: Add device tree binding
  2014-05-03 18:30 ` Andrew Lunn
@ 2014-05-03 18:30     ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: Jason Cooper, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn

Let the ALC5623 codec be instantiated from DT. Add a simple binding
for the additional control register and the jack detect register.

Also, add a prompt to the Kconfig entry for this CODEC, so that it can
be selected. Since kirkwood-t5325.c will no longer be used, we need to
be able to enable the CODEC in the mvebu_v5_defconfig etc.

Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
---
I followed the example of the WM8903 binding which allows register
values to be placed into DT.

v1->v2:

Add redundant OF ID table.
Fix binding documentation.
Fix check of return code from of_property_read_u32().
Add Kconfig prompt
---
 .../devicetree/bindings/sound/alc5623.txt          | 25 ++++++++++++++++++++++
 sound/soc/codecs/Kconfig                           |  2 +-
 sound/soc/codecs/alc5623.c                         | 20 +++++++++++++++++
 3 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/sound/alc5623.txt

diff --git a/Documentation/devicetree/bindings/sound/alc5623.txt b/Documentation/devicetree/bindings/sound/alc5623.txt
new file mode 100644
index 000000000000..26c86c98d671
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/alc5623.txt
@@ -0,0 +1,25 @@
+ALC5621/ALC5622/ALC5623 audio Codec
+
+Required properties:
+
+ - compatible:	"realtek,alc5623"
+ - reg:		the I2C address of the device.
+
+Optional properties:
+
+ - add-ctrl:	  Default register value for Reg-40h, Additional Control
+		  Register. If absent or has the value of 0, the
+		  register is untouched.
+
+ - jack-det-ctrl: Default register value for Reg-5Ah, Jack Detect
+		  Control Register. If absent or has value 0, the
+		  register is untouched.
+
+Example:
+
+	alc5621: alc5621@1a {
+		compatible = "alc5621";
+		reg = <0x1a>;
+		add-ctrl = <0x3700>;
+		jack-det-ctrl = <0x4810>;
+	};
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index f0e840137887..5fefaa8c50ef 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -269,7 +269,7 @@ config SND_SOC_AK5386
 	tristate "AKM AK5638 CODEC"
 
 config SND_SOC_ALC5623
-       tristate
+       tristate "Realtek ALC5623 CODEC"
 
 config SND_SOC_ALC5632
 	tristate
diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c
index 2acf82f4a08a..9d0755aa1d16 100644
--- a/sound/soc/codecs/alc5623.c
+++ b/sound/soc/codecs/alc5623.c
@@ -23,6 +23,7 @@
 #include <linux/i2c.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
+#include <linux/of.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
@@ -998,8 +999,10 @@ static int alc5623_i2c_probe(struct i2c_client *client,
 {
 	struct alc5623_platform_data *pdata;
 	struct alc5623_priv *alc5623;
+	struct device_node *np;
 	unsigned int vid1, vid2;
 	int ret;
+	u32 val32;
 
 	alc5623 = devm_kzalloc(&client->dev, sizeof(struct alc5623_priv),
 			       GFP_KERNEL);
@@ -1040,6 +1043,16 @@ static int alc5623_i2c_probe(struct i2c_client *client,
 	if (pdata) {
 		alc5623->add_ctrl = pdata->add_ctrl;
 		alc5623->jack_det_ctrl = pdata->jack_det_ctrl;
+	} else {
+		if (client->dev.of_node) {
+			np = client->dev.of_node;
+			ret = of_property_read_u32(np, "add-ctrl", &val32);
+			if (!ret)
+				alc5623->add_ctrl = val32;
+			ret = of_property_read_u32(np, "jack-det-ctrl", &val32);
+			if (!ret)
+				alc5623->jack_det_ctrl = val32;
+		}
 	}
 
 	alc5623->id = vid2;
@@ -1081,11 +1094,18 @@ static const struct i2c_device_id alc5623_i2c_table[] = {
 };
 MODULE_DEVICE_TABLE(i2c, alc5623_i2c_table);
 
+static const struct of_device_id alc5623_of_match[] = {
+	{ .compatible = "realtek,alc5623", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, alc5623_of_match);
+
 /*  i2c codec control layer */
 static struct i2c_driver alc5623_i2c_driver = {
 	.driver = {
 		.name = "alc562x-codec",
 		.owner = THIS_MODULE,
+		.of_match_table = of_match_ptr(alc5623_of_match),
 	},
 	.probe = alc5623_i2c_probe,
 	.remove =  alc5623_i2c_remove,
-- 
2.0.0.rc0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 1/9] ASoC: alc5623: Add device tree binding
@ 2014-05-03 18:30     ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

Let the ALC5623 codec be instantiated from DT. Add a simple binding
for the additional control register and the jack detect register.

Also, add a prompt to the Kconfig entry for this CODEC, so that it can
be selected. Since kirkwood-t5325.c will no longer be used, we need to
be able to enable the CODEC in the mvebu_v5_defconfig etc.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
I followed the example of the WM8903 binding which allows register
values to be placed into DT.

v1->v2:

Add redundant OF ID table.
Fix binding documentation.
Fix check of return code from of_property_read_u32().
Add Kconfig prompt
---
 .../devicetree/bindings/sound/alc5623.txt          | 25 ++++++++++++++++++++++
 sound/soc/codecs/Kconfig                           |  2 +-
 sound/soc/codecs/alc5623.c                         | 20 +++++++++++++++++
 3 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/sound/alc5623.txt

diff --git a/Documentation/devicetree/bindings/sound/alc5623.txt b/Documentation/devicetree/bindings/sound/alc5623.txt
new file mode 100644
index 000000000000..26c86c98d671
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/alc5623.txt
@@ -0,0 +1,25 @@
+ALC5621/ALC5622/ALC5623 audio Codec
+
+Required properties:
+
+ - compatible:	"realtek,alc5623"
+ - reg:		the I2C address of the device.
+
+Optional properties:
+
+ - add-ctrl:	  Default register value for Reg-40h, Additional Control
+		  Register. If absent or has the value of 0, the
+		  register is untouched.
+
+ - jack-det-ctrl: Default register value for Reg-5Ah, Jack Detect
+		  Control Register. If absent or has value 0, the
+		  register is untouched.
+
+Example:
+
+	alc5621: alc5621 at 1a {
+		compatible = "alc5621";
+		reg = <0x1a>;
+		add-ctrl = <0x3700>;
+		jack-det-ctrl = <0x4810>;
+	};
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index f0e840137887..5fefaa8c50ef 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -269,7 +269,7 @@ config SND_SOC_AK5386
 	tristate "AKM AK5638 CODEC"
 
 config SND_SOC_ALC5623
-       tristate
+       tristate "Realtek ALC5623 CODEC"
 
 config SND_SOC_ALC5632
 	tristate
diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c
index 2acf82f4a08a..9d0755aa1d16 100644
--- a/sound/soc/codecs/alc5623.c
+++ b/sound/soc/codecs/alc5623.c
@@ -23,6 +23,7 @@
 #include <linux/i2c.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
+#include <linux/of.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
@@ -998,8 +999,10 @@ static int alc5623_i2c_probe(struct i2c_client *client,
 {
 	struct alc5623_platform_data *pdata;
 	struct alc5623_priv *alc5623;
+	struct device_node *np;
 	unsigned int vid1, vid2;
 	int ret;
+	u32 val32;
 
 	alc5623 = devm_kzalloc(&client->dev, sizeof(struct alc5623_priv),
 			       GFP_KERNEL);
@@ -1040,6 +1043,16 @@ static int alc5623_i2c_probe(struct i2c_client *client,
 	if (pdata) {
 		alc5623->add_ctrl = pdata->add_ctrl;
 		alc5623->jack_det_ctrl = pdata->jack_det_ctrl;
+	} else {
+		if (client->dev.of_node) {
+			np = client->dev.of_node;
+			ret = of_property_read_u32(np, "add-ctrl", &val32);
+			if (!ret)
+				alc5623->add_ctrl = val32;
+			ret = of_property_read_u32(np, "jack-det-ctrl", &val32);
+			if (!ret)
+				alc5623->jack_det_ctrl = val32;
+		}
 	}
 
 	alc5623->id = vid2;
@@ -1081,11 +1094,18 @@ static const struct i2c_device_id alc5623_i2c_table[] = {
 };
 MODULE_DEVICE_TABLE(i2c, alc5623_i2c_table);
 
+static const struct of_device_id alc5623_of_match[] = {
+	{ .compatible = "realtek,alc5623", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, alc5623_of_match);
+
 /*  i2c codec control layer */
 static struct i2c_driver alc5623_i2c_driver = {
 	.driver = {
 		.name = "alc562x-codec",
 		.owner = THIS_MODULE,
+		.of_match_table = of_match_ptr(alc5623_of_match),
 	},
 	.probe = alc5623_i2c_probe,
 	.remove =  alc5623_i2c_remove,
-- 
2.0.0.rc0

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 2/9] ARM: Kirkwood: Remove platform driver for codec
  2014-05-03 18:30 ` Andrew Lunn
@ 2014-05-03 18:30     ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: Jason Cooper, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn

Remove the platform driver and platform data for the audio codec.
A DT node will replace it.

Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
---
 arch/arm/mach-mvebu/board-t5325.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/arch/arm/mach-mvebu/board-t5325.c b/arch/arm/mach-mvebu/board-t5325.c
index 65ace6db9f28..f2401b298218 100644
--- a/arch/arm/mach-mvebu/board-t5325.c
+++ b/arch/arm/mach-mvebu/board-t5325.c
@@ -11,10 +11,8 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
-#include <sound/alc5623.h>
 #include "board.h"
 
 static struct platform_device hp_t5325_audio_device = {
@@ -22,20 +20,7 @@ static struct platform_device hp_t5325_audio_device = {
 	.id		= -1,
 };
 
-static struct alc5623_platform_data alc5621_data = {
-	.add_ctrl = 0x3700,
-	.jack_det_ctrl = 0x4810,
-};
-
-static struct i2c_board_info i2c_board_info[] __initdata = {
-	{
-		I2C_BOARD_INFO("alc5621", 0x1a),
-		.platform_data = &alc5621_data,
-	},
-};
-
 void __init t5325_init(void)
 {
-	i2c_register_board_info(0, i2c_board_info, ARRAY_SIZE(i2c_board_info));
 	platform_device_register(&hp_t5325_audio_device);
 }
-- 
2.0.0.rc0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 2/9] ARM: Kirkwood: Remove platform driver for codec
@ 2014-05-03 18:30     ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the platform driver and platform data for the audio codec.
A DT node will replace it.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/mach-mvebu/board-t5325.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/arch/arm/mach-mvebu/board-t5325.c b/arch/arm/mach-mvebu/board-t5325.c
index 65ace6db9f28..f2401b298218 100644
--- a/arch/arm/mach-mvebu/board-t5325.c
+++ b/arch/arm/mach-mvebu/board-t5325.c
@@ -11,10 +11,8 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
-#include <sound/alc5623.h>
 #include "board.h"
 
 static struct platform_device hp_t5325_audio_device = {
@@ -22,20 +20,7 @@ static struct platform_device hp_t5325_audio_device = {
 	.id		= -1,
 };
 
-static struct alc5623_platform_data alc5621_data = {
-	.add_ctrl = 0x3700,
-	.jack_det_ctrl = 0x4810,
-};
-
-static struct i2c_board_info i2c_board_info[] __initdata = {
-	{
-		I2C_BOARD_INFO("alc5621", 0x1a),
-		.platform_data = &alc5621_data,
-	},
-};
-
 void __init t5325_init(void)
 {
-	i2c_register_board_info(0, i2c_board_info, ARRAY_SIZE(i2c_board_info));
 	platform_device_register(&hp_t5325_audio_device);
 }
-- 
2.0.0.rc0

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 3/9] ARM: Kirkwood: Add node for audio codec
  2014-05-03 18:30 ` Andrew Lunn
@ 2014-05-03 18:30     ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: Jason Cooper, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn

Instantiate the audio codec via a DT node.

Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
---
 arch/arm/boot/dts/kirkwood-t5325.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/kirkwood-t5325.dts b/arch/arm/boot/dts/kirkwood-t5325.dts
index 0bd70d928c69..dbb730642543 100644
--- a/arch/arm/boot/dts/kirkwood-t5325.dts
+++ b/arch/arm/boot/dts/kirkwood-t5325.dts
@@ -127,6 +127,14 @@
 
 		i2c@11000 {
 			status = "okay";
+
+			alc5621: alc5621@1a {
+				compatible = "realtek,alc5621";
+				reg = <0x1a>;
+				#sound-dai-cells = <0>;
+				add-ctrl = <0x3700>;
+				jack-det-ctrl = <0x4810>;
+			};
 		};
 
 		serial@12000 {
-- 
2.0.0.rc0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 3/9] ARM: Kirkwood: Add node for audio codec
@ 2014-05-03 18:30     ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

Instantiate the audio codec via a DT node.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-t5325.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/kirkwood-t5325.dts b/arch/arm/boot/dts/kirkwood-t5325.dts
index 0bd70d928c69..dbb730642543 100644
--- a/arch/arm/boot/dts/kirkwood-t5325.dts
+++ b/arch/arm/boot/dts/kirkwood-t5325.dts
@@ -127,6 +127,14 @@
 
 		i2c at 11000 {
 			status = "okay";
+
+			alc5621: alc5621 at 1a {
+				compatible = "realtek,alc5621";
+				reg = <0x1a>;
+				#sound-dai-cells = <0>;
+				add-ctrl = <0x3700>;
+				jack-det-ctrl = <0x4810>;
+			};
 		};
 
 		serial at 12000 {
-- 
2.0.0.rc0

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 4/9] ARM: Kirkwood: DT: Add missing #sound-dai-cells property
  2014-05-03 18:30 ` Andrew Lunn
@ 2014-05-03 18:30     ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: Jason Cooper, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn

The sound node is missing a #sound-dai-cells property. Add it, so that
the sounds node can be used in combination with the simple-audio-card
binding.

Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
---
 arch/arm/boot/dts/kirkwood.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index 90384587c278..919d1f7f2eef 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -314,6 +314,7 @@
 
 		audio0: audio-controller@a0000 {
 			compatible = "marvell,kirkwood-audio";
+			#sound-dai-cells = <0>;
 			reg = <0xa0000 0x2210>;
 			interrupts = <24>;
 			clocks = <&gate_clk 9>;
-- 
2.0.0.rc0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 4/9] ARM: Kirkwood: DT: Add missing #sound-dai-cells property
@ 2014-05-03 18:30     ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

The sound node is missing a #sound-dai-cells property. Add it, so that
the sounds node can be used in combination with the simple-audio-card
binding.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index 90384587c278..919d1f7f2eef 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -314,6 +314,7 @@
 
 		audio0: audio-controller at a0000 {
 			compatible = "marvell,kirkwood-audio";
+			#sound-dai-cells = <0>;
 			reg = <0xa0000 0x2210>;
 			interrupts = <24>;
 			clocks = <&gate_clk 9>;
-- 
2.0.0.rc0

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
  2014-05-03 18:30 ` Andrew Lunn
@ 2014-05-03 18:30     ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: Jason Cooper, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn

Some platforms require that the codecs mclk is a fixed multiplication
factor of the audio stream rate. Add a optional property to the
binding to hold this factor and implement a hw_params() function to
make use of it.

Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
---
v1->v2:
s/factor/fs/g
---
 .../devicetree/bindings/sound/simple-card.txt      |  2 ++
 sound/soc/generic/simple-card.c                    | 28 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
index 131aa2ad7f1a..34d1b845edcc 100644
--- a/Documentation/devicetree/bindings/sound/simple-card.txt
+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
@@ -18,6 +18,8 @@ Optional properties:
 					  Each entry is a pair of strings, the first being the
 					  connection's sink, the second being the connection's
 					  source.
+- simple-audio-card,mclk-fs		: Multiplication factor between stream rate and codec
+					  mclk.
 - dai-tdm-slot-num			: Please refer to tdm-slot.txt.
 - dai-tdm-slot-width			: Please refer to tdm-slot.txt.
 
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 21f1ccbdf582..e5a3be97096c 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -24,6 +24,7 @@ struct simple_card_data {
 		struct asoc_simple_dai cpu_dai;
 		struct asoc_simple_dai codec_dai;
 	} *dai_props;
+	unsigned int mclk_fs;
 	struct snd_soc_dai_link dai_link[];	/* dynamically allocated */
 };
 
@@ -151,6 +152,28 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
 	return 0;
 }
 
+static int simple_card_hw_params(struct snd_pcm_substream *substream,
+				 struct snd_pcm_hw_params *params)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
+	unsigned int mclk;
+	int ret = 0;
+
+	if (priv->mclk_fs) {
+		mclk = params_rate(params) * priv->mclk_fs;
+		ret = snd_soc_dai_set_sysclk(codec_dai, 0, mclk,
+					     SND_SOC_CLOCK_IN);
+	}
+
+	return ret;
+}
+
+static struct snd_soc_ops simple_card_ops = {
+	.hw_params = simple_card_hw_params,
+};
+
 static int simple_card_cpu_codec_of(struct device_node *node,
 				int daifmt,
 				struct snd_soc_dai_link *dai_link,
@@ -255,6 +278,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
 		sprintf(name, "%s-%s", dai_link->cpu_dai_name,
 					dai_link->codec_dai_name);
 		dai_link->name = dai_link->stream_name = name;
+		dai_link->ops = &simple_card_ops;
 
 		if (!multi)
 			break;
@@ -263,6 +287,10 @@ static int asoc_simple_card_parse_of(struct device_node *node,
 		dai_props++;
 	}
 
+	/* Factor to mclk, used in hw_params() */
+	of_property_read_u32(node, "simple-audio-card,mclk-fs",
+			     &priv->mclk_fs);
+
 	/* card name is created from CPU/CODEC dai name */
 	dai_link = priv->snd_card.dai_link;
 	if (!priv->snd_card.name)
-- 
2.0.0.rc0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
@ 2014-05-03 18:30     ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

Some platforms require that the codecs mclk is a fixed multiplication
factor of the audio stream rate. Add a optional property to the
binding to hold this factor and implement a hw_params() function to
make use of it.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
v1->v2:
s/factor/fs/g
---
 .../devicetree/bindings/sound/simple-card.txt      |  2 ++
 sound/soc/generic/simple-card.c                    | 28 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
index 131aa2ad7f1a..34d1b845edcc 100644
--- a/Documentation/devicetree/bindings/sound/simple-card.txt
+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
@@ -18,6 +18,8 @@ Optional properties:
 					  Each entry is a pair of strings, the first being the
 					  connection's sink, the second being the connection's
 					  source.
+- simple-audio-card,mclk-fs		: Multiplication factor between stream rate and codec
+					  mclk.
 - dai-tdm-slot-num			: Please refer to tdm-slot.txt.
 - dai-tdm-slot-width			: Please refer to tdm-slot.txt.
 
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 21f1ccbdf582..e5a3be97096c 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -24,6 +24,7 @@ struct simple_card_data {
 		struct asoc_simple_dai cpu_dai;
 		struct asoc_simple_dai codec_dai;
 	} *dai_props;
+	unsigned int mclk_fs;
 	struct snd_soc_dai_link dai_link[];	/* dynamically allocated */
 };
 
@@ -151,6 +152,28 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
 	return 0;
 }
 
+static int simple_card_hw_params(struct snd_pcm_substream *substream,
+				 struct snd_pcm_hw_params *params)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
+	unsigned int mclk;
+	int ret = 0;
+
+	if (priv->mclk_fs) {
+		mclk = params_rate(params) * priv->mclk_fs;
+		ret = snd_soc_dai_set_sysclk(codec_dai, 0, mclk,
+					     SND_SOC_CLOCK_IN);
+	}
+
+	return ret;
+}
+
+static struct snd_soc_ops simple_card_ops = {
+	.hw_params = simple_card_hw_params,
+};
+
 static int simple_card_cpu_codec_of(struct device_node *node,
 				int daifmt,
 				struct snd_soc_dai_link *dai_link,
@@ -255,6 +278,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
 		sprintf(name, "%s-%s", dai_link->cpu_dai_name,
 					dai_link->codec_dai_name);
 		dai_link->name = dai_link->stream_name = name;
+		dai_link->ops = &simple_card_ops;
 
 		if (!multi)
 			break;
@@ -263,6 +287,10 @@ static int asoc_simple_card_parse_of(struct device_node *node,
 		dai_props++;
 	}
 
+	/* Factor to mclk, used in hw_params() */
+	of_property_read_u32(node, "simple-audio-card,mclk-fs",
+			     &priv->mclk_fs);
+
 	/* card name is created from CPU/CODEC dai name */
 	dai_link = priv->snd_card.dai_link;
 	if (!priv->snd_card.name)
-- 
2.0.0.rc0

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 6/9] ARM: Kirkwood: t5325: Remove platform device to instantiate audio
  2014-05-03 18:30 ` Andrew Lunn
@ 2014-05-03 18:30     ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: Jason Cooper, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn

Remove platform device instantiating of the audio, which results in
board-t5325.c being removed. A DT node will be added to take its
place.

Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
---
 arch/arm/mach-mvebu/Kconfig       |  7 -------
 arch/arm/mach-mvebu/Makefile      |  1 -
 arch/arm/mach-mvebu/board-t5325.c | 26 --------------------------
 arch/arm/mach-mvebu/board.h       |  6 ------
 arch/arm/mach-mvebu/kirkwood.c    |  3 ---
 5 files changed, 43 deletions(-)
 delete mode 100644 arch/arm/mach-mvebu/board-t5325.c

diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 3f73eecbcfb0..9675f559f6fe 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -97,13 +97,6 @@ config MACH_KIRKWOOD
 	  Say 'Y' here if you want your kernel to support boards based
 	  on the Marvell Kirkwood device tree.
 
-config MACH_T5325
-	bool "HP T5325 thin client"
-	depends on MACH_KIRKWOOD
-	help
-	  Say 'Y' here if you want your kernel to support the
-	  HP T5325 Thin client
-
 endmenu
 
 endif
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index a63e43b6b451..912c0cc4cc29 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -10,4 +10,3 @@ obj-$(CONFIG_ARCH_MVEBU)	 += coherency.o coherency_ll.o pmsu.o
 obj-$(CONFIG_SMP)                += platsmp.o headsmp.o
 obj-$(CONFIG_HOTPLUG_CPU)        += hotplug.o
 obj-$(CONFIG_MACH_KIRKWOOD)	 += kirkwood.o kirkwood-pm.o
-obj-$(CONFIG_MACH_T5325)	 += board-t5325.o
diff --git a/arch/arm/mach-mvebu/board-t5325.c b/arch/arm/mach-mvebu/board-t5325.c
deleted file mode 100644
index f2401b298218..000000000000
--- a/arch/arm/mach-mvebu/board-t5325.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * HP T5325 Board Setup
- *
- * Copyright (C) 2014
- *
- * Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include "board.h"
-
-static struct platform_device hp_t5325_audio_device = {
-	.name		= "t5325-audio",
-	.id		= -1,
-};
-
-void __init t5325_init(void)
-{
-	platform_device_register(&hp_t5325_audio_device);
-}
diff --git a/arch/arm/mach-mvebu/board.h b/arch/arm/mach-mvebu/board.h
index de7f0a191394..9c7bb4386f8b 100644
--- a/arch/arm/mach-mvebu/board.h
+++ b/arch/arm/mach-mvebu/board.h
@@ -13,10 +13,4 @@
 #ifndef __ARCH_MVEBU_BOARD_H
 #define __ARCH_MVEBU_BOARD_H
 
-#ifdef CONFIG_MACH_T5325
-void t5325_init(void);
-#else
-static inline void t5325_init(void) {};
-#endif
-
 #endif
diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
index 120207fc36f1..c30bc316f40d 100644
--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -180,9 +180,6 @@ static void __init kirkwood_dt_init(void)
 	kirkwood_pm_init();
 	kirkwood_dt_eth_fixup();
 
-	if (of_machine_is_compatible("hp,t5325"))
-		t5325_init();
-
 	of_platform_populate(NULL, of_default_bus_match_table, auxdata, NULL);
 }
 
-- 
2.0.0.rc0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 6/9] ARM: Kirkwood: t5325: Remove platform device to instantiate audio
@ 2014-05-03 18:30     ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

Remove platform device instantiating of the audio, which results in
board-t5325.c being removed. A DT node will be added to take its
place.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/mach-mvebu/Kconfig       |  7 -------
 arch/arm/mach-mvebu/Makefile      |  1 -
 arch/arm/mach-mvebu/board-t5325.c | 26 --------------------------
 arch/arm/mach-mvebu/board.h       |  6 ------
 arch/arm/mach-mvebu/kirkwood.c    |  3 ---
 5 files changed, 43 deletions(-)
 delete mode 100644 arch/arm/mach-mvebu/board-t5325.c

diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 3f73eecbcfb0..9675f559f6fe 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -97,13 +97,6 @@ config MACH_KIRKWOOD
 	  Say 'Y' here if you want your kernel to support boards based
 	  on the Marvell Kirkwood device tree.
 
-config MACH_T5325
-	bool "HP T5325 thin client"
-	depends on MACH_KIRKWOOD
-	help
-	  Say 'Y' here if you want your kernel to support the
-	  HP T5325 Thin client
-
 endmenu
 
 endif
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index a63e43b6b451..912c0cc4cc29 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -10,4 +10,3 @@ obj-$(CONFIG_ARCH_MVEBU)	 += coherency.o coherency_ll.o pmsu.o
 obj-$(CONFIG_SMP)                += platsmp.o headsmp.o
 obj-$(CONFIG_HOTPLUG_CPU)        += hotplug.o
 obj-$(CONFIG_MACH_KIRKWOOD)	 += kirkwood.o kirkwood-pm.o
-obj-$(CONFIG_MACH_T5325)	 += board-t5325.o
diff --git a/arch/arm/mach-mvebu/board-t5325.c b/arch/arm/mach-mvebu/board-t5325.c
deleted file mode 100644
index f2401b298218..000000000000
--- a/arch/arm/mach-mvebu/board-t5325.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * HP T5325 Board Setup
- *
- * Copyright (C) 2014
- *
- * Andrew Lunn <andrew@lunn.ch>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include "board.h"
-
-static struct platform_device hp_t5325_audio_device = {
-	.name		= "t5325-audio",
-	.id		= -1,
-};
-
-void __init t5325_init(void)
-{
-	platform_device_register(&hp_t5325_audio_device);
-}
diff --git a/arch/arm/mach-mvebu/board.h b/arch/arm/mach-mvebu/board.h
index de7f0a191394..9c7bb4386f8b 100644
--- a/arch/arm/mach-mvebu/board.h
+++ b/arch/arm/mach-mvebu/board.h
@@ -13,10 +13,4 @@
 #ifndef __ARCH_MVEBU_BOARD_H
 #define __ARCH_MVEBU_BOARD_H
 
-#ifdef CONFIG_MACH_T5325
-void t5325_init(void);
-#else
-static inline void t5325_init(void) {};
-#endif
-
 #endif
diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
index 120207fc36f1..c30bc316f40d 100644
--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -180,9 +180,6 @@ static void __init kirkwood_dt_init(void)
 	kirkwood_pm_init();
 	kirkwood_dt_eth_fixup();
 
-	if (of_machine_is_compatible("hp,t5325"))
-		t5325_init();
-
 	of_platform_populate(NULL, of_default_bus_match_table, auxdata, NULL);
 }
 
-- 
2.0.0.rc0

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 7/9] ARM: Kirkwood: t5325: Use simple card to instantiate audio
  2014-05-03 18:30 ` Andrew Lunn
@ 2014-05-03 18:30     ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: Jason Cooper, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn

Add device tree nodes to instantiate the audio drivers on the HP T5325
device.

Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
---
 arch/arm/boot/dts/kirkwood-t5325.dts | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm/boot/dts/kirkwood-t5325.dts b/arch/arm/boot/dts/kirkwood-t5325.dts
index dbb730642543..caedc9f1e69b 100644
--- a/arch/arm/boot/dts/kirkwood-t5325.dts
+++ b/arch/arm/boot/dts/kirkwood-t5325.dts
@@ -192,6 +192,31 @@
 		gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
 	};
 
+	sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,format = "i2s";
+		simple-audio-card,routing =
+			"Headphone Jack", "HPL",
+			"Headphone Jack", "HPR",
+			"Speaker", "SPKOUT",
+			"Speaker", "SPKOUTN",
+			"MIC1", "Mic Jack",
+			"MIC2", "Mic Jack";
+		simple-audio-card,widgets =
+			"Headphone", "Headphone Jack",
+			"Speaker", "Speaker",
+			"Microphone", "Mic Jack";
+
+		simple-audio-card,mclk-fs = <256>;
+
+		simple-audio-card,cpu {
+			sound-dai = <&audio>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&alc5621>;
+		};
+	};
 };
 
 &mdio {
-- 
2.0.0.rc0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 7/9] ARM: Kirkwood: t5325: Use simple card to instantiate audio
@ 2014-05-03 18:30     ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

Add device tree nodes to instantiate the audio drivers on the HP T5325
device.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-t5325.dts | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm/boot/dts/kirkwood-t5325.dts b/arch/arm/boot/dts/kirkwood-t5325.dts
index dbb730642543..caedc9f1e69b 100644
--- a/arch/arm/boot/dts/kirkwood-t5325.dts
+++ b/arch/arm/boot/dts/kirkwood-t5325.dts
@@ -192,6 +192,31 @@
 		gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
 	};
 
+	sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,format = "i2s";
+		simple-audio-card,routing =
+			"Headphone Jack", "HPL",
+			"Headphone Jack", "HPR",
+			"Speaker", "SPKOUT",
+			"Speaker", "SPKOUTN",
+			"MIC1", "Mic Jack",
+			"MIC2", "Mic Jack";
+		simple-audio-card,widgets =
+			"Headphone", "Headphone Jack",
+			"Speaker", "Speaker",
+			"Microphone", "Mic Jack";
+
+		simple-audio-card,mclk-fs = <256>;
+
+		simple-audio-card,cpu {
+			sound-dai = <&audio>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&alc5621>;
+		};
+	};
 };
 
 &mdio {
-- 
2.0.0.rc0

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 8/9] ARM: mvebu_v5_defconfig: Enable sound modules needed for t5325
  2014-05-03 18:30 ` Andrew Lunn
@ 2014-05-03 18:30     ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: Jason Cooper, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn

Enable simple-card and the CODEC.

Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
---
 arch/arm/configs/mvebu_v5_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/configs/mvebu_v5_defconfig b/arch/arm/configs/mvebu_v5_defconfig
index 36484a37a1ca..d05fdd5a96c6 100644
--- a/arch/arm/configs/mvebu_v5_defconfig
+++ b/arch/arm/configs/mvebu_v5_defconfig
@@ -11,7 +11,6 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_MVEBU=y
 CONFIG_MACH_KIRKWOOD=y
-CONFIG_MACH_T5325=y
 # CONFIG_CPU_FEROCEON_OLD_ID is not set
 CONFIG_PCI_MVEBU=y
 CONFIG_PREEMPT=y
@@ -100,6 +99,8 @@ CONFIG_SND=y
 CONFIG_SND_SOC=y
 CONFIG_SND_KIRKWOOD_SOC=y
 CONFIG_SND_KIRKWOOD_SOC_T5325=y
+CONFIG_SND_SOC_ALC5623=y
+CONFIG_SND_SIMPLE_CARD=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_HID_DRAGONRISE=y
-- 
2.0.0.rc0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 8/9] ARM: mvebu_v5_defconfig: Enable sound modules needed for t5325
@ 2014-05-03 18:30     ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

Enable simple-card and the CODEC.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/configs/mvebu_v5_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/configs/mvebu_v5_defconfig b/arch/arm/configs/mvebu_v5_defconfig
index 36484a37a1ca..d05fdd5a96c6 100644
--- a/arch/arm/configs/mvebu_v5_defconfig
+++ b/arch/arm/configs/mvebu_v5_defconfig
@@ -11,7 +11,6 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_MVEBU=y
 CONFIG_MACH_KIRKWOOD=y
-CONFIG_MACH_T5325=y
 # CONFIG_CPU_FEROCEON_OLD_ID is not set
 CONFIG_PCI_MVEBU=y
 CONFIG_PREEMPT=y
@@ -100,6 +99,8 @@ CONFIG_SND=y
 CONFIG_SND_SOC=y
 CONFIG_SND_KIRKWOOD_SOC=y
 CONFIG_SND_KIRKWOOD_SOC_T5325=y
+CONFIG_SND_SOC_ALC5623=y
+CONFIG_SND_SIMPLE_CARD=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_HID_DRAGONRISE=y
-- 
2.0.0.rc0

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 9/9] ARM: multi_v5_defconfig: Enable sound modules needed for t5325
  2014-05-03 18:30 ` Andrew Lunn
@ 2014-05-03 18:30     ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: Jason Cooper, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn

Enable simple-card and the CODEC.

Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
---
 arch/arm/configs/multi_v5_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/configs/multi_v5_defconfig b/arch/arm/configs/multi_v5_defconfig
index aa3dfb084fed..5ebfa8bf8509 100644
--- a/arch/arm/configs/multi_v5_defconfig
+++ b/arch/arm/configs/multi_v5_defconfig
@@ -11,7 +11,6 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_MVEBU=y
 CONFIG_MACH_KIRKWOOD=y
-CONFIG_MACH_T5325=y
 CONFIG_ARCH_MXC=y
 CONFIG_MACH_IMX25_DT=y
 CONFIG_MACH_IMX27_DT=y
@@ -108,6 +107,8 @@ CONFIG_SND=y
 CONFIG_SND_SOC=y
 CONFIG_SND_KIRKWOOD_SOC=y
 CONFIG_SND_KIRKWOOD_SOC_T5325=y
+CONFIG_SND_SOC_ALC5623=y
+CONFIG_SND_SIMPLE_CARD=y
 # CONFIG_ABX500_CORE is not set
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
-- 
2.0.0.rc0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v2 9/9] ARM: multi_v5_defconfig: Enable sound modules needed for t5325
@ 2014-05-03 18:30     ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

Enable simple-card and the CODEC.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/configs/multi_v5_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/configs/multi_v5_defconfig b/arch/arm/configs/multi_v5_defconfig
index aa3dfb084fed..5ebfa8bf8509 100644
--- a/arch/arm/configs/multi_v5_defconfig
+++ b/arch/arm/configs/multi_v5_defconfig
@@ -11,7 +11,6 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_MVEBU=y
 CONFIG_MACH_KIRKWOOD=y
-CONFIG_MACH_T5325=y
 CONFIG_ARCH_MXC=y
 CONFIG_MACH_IMX25_DT=y
 CONFIG_MACH_IMX27_DT=y
@@ -108,6 +107,8 @@ CONFIG_SND=y
 CONFIG_SND_SOC=y
 CONFIG_SND_KIRKWOOD_SOC=y
 CONFIG_SND_KIRKWOOD_SOC_T5325=y
+CONFIG_SND_SOC_ALC5623=y
+CONFIG_SND_SIMPLE_CARD=y
 # CONFIG_ABX500_CORE is not set
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
-- 
2.0.0.rc0

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* Re: [PATCH v2 1/9] ASoC: alc5623: Add device tree binding
  2014-05-03 18:30     ` Andrew Lunn
@ 2014-05-04 17:49         ` Jason Cooper
  -1 siblings, 0 replies; 54+ messages in thread
From: Jason Cooper @ 2014-05-04 17:49 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A, linux ARM,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Sat, May 03, 2014 at 08:30:11PM +0200, Andrew Lunn wrote:
> Let the ALC5623 codec be instantiated from DT. Add a simple binding
> for the additional control register and the jack detect register.
> 
> Also, add a prompt to the Kconfig entry for this CODEC, so that it can
> be selected. Since kirkwood-t5325.c will no longer be used, we need to
> be able to enable the CODEC in the mvebu_v5_defconfig etc.
> 
> Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
> ---
> I followed the example of the WM8903 binding which allows register
> values to be placed into DT.
> 
> v1->v2:
> 
> Add redundant OF ID table.
> Fix binding documentation.
> Fix check of return code from of_property_read_u32().
> Add Kconfig prompt
> ---
>  .../devicetree/bindings/sound/alc5623.txt          | 25 ++++++++++++++++++++++
>  sound/soc/codecs/Kconfig                           |  2 +-
>  sound/soc/codecs/alc5623.c                         | 20 +++++++++++++++++
>  3 files changed, 46 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/devicetree/bindings/sound/alc5623.txt

I assume Mark is going to take this through his tree.

Acked-by: Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>

thx,

Jason.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v2 1/9] ASoC: alc5623: Add device tree binding
@ 2014-05-04 17:49         ` Jason Cooper
  0 siblings, 0 replies; 54+ messages in thread
From: Jason Cooper @ 2014-05-04 17:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, May 03, 2014 at 08:30:11PM +0200, Andrew Lunn wrote:
> Let the ALC5623 codec be instantiated from DT. Add a simple binding
> for the additional control register and the jack detect register.
> 
> Also, add a prompt to the Kconfig entry for this CODEC, so that it can
> be selected. Since kirkwood-t5325.c will no longer be used, we need to
> be able to enable the CODEC in the mvebu_v5_defconfig etc.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> I followed the example of the WM8903 binding which allows register
> values to be placed into DT.
> 
> v1->v2:
> 
> Add redundant OF ID table.
> Fix binding documentation.
> Fix check of return code from of_property_read_u32().
> Add Kconfig prompt
> ---
>  .../devicetree/bindings/sound/alc5623.txt          | 25 ++++++++++++++++++++++
>  sound/soc/codecs/Kconfig                           |  2 +-
>  sound/soc/codecs/alc5623.c                         | 20 +++++++++++++++++
>  3 files changed, 46 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/devicetree/bindings/sound/alc5623.txt

I assume Mark is going to take this through his tree.

Acked-by: Jason Cooper <jason@lakedaemon.net>

thx,

Jason.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v2 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
  2014-05-03 18:30     ` Andrew Lunn
@ 2014-05-04 17:50         ` Jason Cooper
  -1 siblings, 0 replies; 54+ messages in thread
From: Jason Cooper @ 2014-05-04 17:50 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A, linux ARM,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Sat, May 03, 2014 at 08:30:15PM +0200, Andrew Lunn wrote:
> Some platforms require that the codecs mclk is a fixed multiplication
> factor of the audio stream rate. Add a optional property to the
> binding to hold this factor and implement a hw_params() function to
> make use of it.
> 
> Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
> ---
> v1->v2:
> s/factor/fs/g
> ---
>  .../devicetree/bindings/sound/simple-card.txt      |  2 ++
>  sound/soc/generic/simple-card.c                    | 28 ++++++++++++++++++++++
>  2 files changed, 30 insertions(+)

Acked-by: Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>

thx,

Jason.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v2 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
@ 2014-05-04 17:50         ` Jason Cooper
  0 siblings, 0 replies; 54+ messages in thread
From: Jason Cooper @ 2014-05-04 17:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, May 03, 2014 at 08:30:15PM +0200, Andrew Lunn wrote:
> Some platforms require that the codecs mclk is a fixed multiplication
> factor of the audio stream rate. Add a optional property to the
> binding to hold this factor and implement a hw_params() function to
> make use of it.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> v1->v2:
> s/factor/fs/g
> ---
>  .../devicetree/bindings/sound/simple-card.txt      |  2 ++
>  sound/soc/generic/simple-card.c                    | 28 ++++++++++++++++++++++
>  2 files changed, 30 insertions(+)

Acked-by: Jason Cooper <jason@lakedaemon.net>

thx,

Jason.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v2 2/9] ARM: Kirkwood: Remove platform driver for codec
  2014-05-03 18:30     ` Andrew Lunn
@ 2014-05-05  1:12         ` Jason Cooper
  -1 siblings, 0 replies; 54+ messages in thread
From: Jason Cooper @ 2014-05-05  1:12 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, linux ARM

On Sat, May 03, 2014 at 08:30:12PM +0200, Andrew Lunn wrote:
> Remove the platform driver and platform data for the audio codec.
> A DT node will replace it.
> 
> Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
> ---
>  arch/arm/mach-mvebu/board-t5325.c | 15 ---------------
>  1 file changed, 15 deletions(-)

Patches 2 and 6 applied to mvebu/soc.

thx,

Jason.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v2 2/9] ARM: Kirkwood: Remove platform driver for codec
@ 2014-05-05  1:12         ` Jason Cooper
  0 siblings, 0 replies; 54+ messages in thread
From: Jason Cooper @ 2014-05-05  1:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, May 03, 2014 at 08:30:12PM +0200, Andrew Lunn wrote:
> Remove the platform driver and platform data for the audio codec.
> A DT node will replace it.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  arch/arm/mach-mvebu/board-t5325.c | 15 ---------------
>  1 file changed, 15 deletions(-)

Patches 2 and 6 applied to mvebu/soc.

thx,

Jason.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v2 3/9] ARM: Kirkwood: Add node for audio codec
  2014-05-03 18:30     ` Andrew Lunn
@ 2014-05-05  1:21         ` Jason Cooper
  -1 siblings, 0 replies; 54+ messages in thread
From: Jason Cooper @ 2014-05-05  1:21 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, linux ARM

On Sat, May 03, 2014 at 08:30:13PM +0200, Andrew Lunn wrote:
> Instantiate the audio codec via a DT node.
> 
> Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
> ---
>  arch/arm/boot/dts/kirkwood-t5325.dts | 8 ++++++++
>  1 file changed, 8 insertions(+)

Patches 3, 4, and 7 applied to mvebu/dt

thx,

Jason.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v2 3/9] ARM: Kirkwood: Add node for audio codec
@ 2014-05-05  1:21         ` Jason Cooper
  0 siblings, 0 replies; 54+ messages in thread
From: Jason Cooper @ 2014-05-05  1:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, May 03, 2014 at 08:30:13PM +0200, Andrew Lunn wrote:
> Instantiate the audio codec via a DT node.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  arch/arm/boot/dts/kirkwood-t5325.dts | 8 ++++++++
>  1 file changed, 8 insertions(+)

Patches 3, 4, and 7 applied to mvebu/dt

thx,

Jason.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v2 8/9] ARM: mvebu_v5_defconfig: Enable sound modules needed for t5325
  2014-05-03 18:30     ` Andrew Lunn
@ 2014-05-05  1:23         ` Jason Cooper
  -1 siblings, 0 replies; 54+ messages in thread
From: Jason Cooper @ 2014-05-05  1:23 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, linux ARM

On Sat, May 03, 2014 at 08:30:18PM +0200, Andrew Lunn wrote:
> Enable simple-card and the CODEC.
> 
> Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
> ---
>  arch/arm/configs/mvebu_v5_defconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Patches 8 and 9 applied to mvebu/defconfig

thx,

Jason.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v2 8/9] ARM: mvebu_v5_defconfig: Enable sound modules needed for t5325
@ 2014-05-05  1:23         ` Jason Cooper
  0 siblings, 0 replies; 54+ messages in thread
From: Jason Cooper @ 2014-05-05  1:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, May 03, 2014 at 08:30:18PM +0200, Andrew Lunn wrote:
> Enable simple-card and the CODEC.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  arch/arm/configs/mvebu_v5_defconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Patches 8 and 9 applied to mvebu/defconfig

thx,

Jason.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v2 0/9] DT instantiation of sound on T5325
  2014-05-03 18:30 ` Andrew Lunn
@ 2014-05-08 17:37     ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-08 17:37 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Jason Cooper, broonie-DgEjT+Ai2ygdnm+yROfE0A, linux ARM,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Sat, May 03, 2014 at 08:30:10PM +0200, Andrew Lunn wrote:
> This patchset uses DT to instantiate sound on the T5325. It adds a DT
> binding to the codec, then removes the platform device for the codec
> and adds a DT node. simple-card is extended to support mlck_fs. The
> platform device for the audio device is then replaced with a DT node.
> Lastly, two _defconfig's are updated to build the needed modules.

Hi Folks

The ARM mvebu maintainer is happy with these patches. Does anybody
have any comments on the sound/soc parts? Mark, will you take the
alc5623 and simple-card patches?

Thanks
	Andrew

> 
> Andrew Lunn (9):
>   ASoC: alc5623: Add device tree binding
>   ARM: Kirkwood: Remove platform driver for codec
>   ARM: Kirkwood: Add node for audio codec
>   ARM: Kirkwood: DT: Add missing #sound-dai-cells property
>   ASoC: simple-card: Support setting mclk via a fixed factor
>   ARM: Kirkwood: t5325: Remove platform device to instantiate audio
>   ARM: Kirkwood: t5325: Use simple card to instantiate audio
>   ARM: mvebu_v5_defconfig: Enable sound modules needed for t5325
>   ARM: multi_v5_defconfig: Enable sound modules needed for t5325
> 
>  .../devicetree/bindings/sound/alc5623.txt          | 25 +++++++++++++
>  .../devicetree/bindings/sound/simple-card.txt      |  2 ++
>  arch/arm/boot/dts/kirkwood-t5325.dts               | 33 +++++++++++++++++
>  arch/arm/boot/dts/kirkwood.dtsi                    |  1 +
>  arch/arm/configs/multi_v5_defconfig                |  3 +-
>  arch/arm/configs/mvebu_v5_defconfig                |  3 +-
>  arch/arm/mach-mvebu/Kconfig                        |  7 ----
>  arch/arm/mach-mvebu/Makefile                       |  1 -
>  arch/arm/mach-mvebu/board-t5325.c                  | 41 ----------------------
>  arch/arm/mach-mvebu/board.h                        |  6 ----
>  arch/arm/mach-mvebu/kirkwood.c                     |  3 --
>  sound/soc/codecs/Kconfig                           |  2 +-
>  sound/soc/codecs/alc5623.c                         | 20 +++++++++++
>  sound/soc/generic/simple-card.c                    | 28 +++++++++++++++
>  14 files changed, 114 insertions(+), 61 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/sound/alc5623.txt
>  delete mode 100644 arch/arm/mach-mvebu/board-t5325.c
> 
> -- 
> 2.0.0.rc0
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v2 0/9] DT instantiation of sound on T5325
@ 2014-05-08 17:37     ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-08 17:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, May 03, 2014 at 08:30:10PM +0200, Andrew Lunn wrote:
> This patchset uses DT to instantiate sound on the T5325. It adds a DT
> binding to the codec, then removes the platform device for the codec
> and adds a DT node. simple-card is extended to support mlck_fs. The
> platform device for the audio device is then replaced with a DT node.
> Lastly, two _defconfig's are updated to build the needed modules.

Hi Folks

The ARM mvebu maintainer is happy with these patches. Does anybody
have any comments on the sound/soc parts? Mark, will you take the
alc5623 and simple-card patches?

Thanks
	Andrew

> 
> Andrew Lunn (9):
>   ASoC: alc5623: Add device tree binding
>   ARM: Kirkwood: Remove platform driver for codec
>   ARM: Kirkwood: Add node for audio codec
>   ARM: Kirkwood: DT: Add missing #sound-dai-cells property
>   ASoC: simple-card: Support setting mclk via a fixed factor
>   ARM: Kirkwood: t5325: Remove platform device to instantiate audio
>   ARM: Kirkwood: t5325: Use simple card to instantiate audio
>   ARM: mvebu_v5_defconfig: Enable sound modules needed for t5325
>   ARM: multi_v5_defconfig: Enable sound modules needed for t5325
> 
>  .../devicetree/bindings/sound/alc5623.txt          | 25 +++++++++++++
>  .../devicetree/bindings/sound/simple-card.txt      |  2 ++
>  arch/arm/boot/dts/kirkwood-t5325.dts               | 33 +++++++++++++++++
>  arch/arm/boot/dts/kirkwood.dtsi                    |  1 +
>  arch/arm/configs/multi_v5_defconfig                |  3 +-
>  arch/arm/configs/mvebu_v5_defconfig                |  3 +-
>  arch/arm/mach-mvebu/Kconfig                        |  7 ----
>  arch/arm/mach-mvebu/Makefile                       |  1 -
>  arch/arm/mach-mvebu/board-t5325.c                  | 41 ----------------------
>  arch/arm/mach-mvebu/board.h                        |  6 ----
>  arch/arm/mach-mvebu/kirkwood.c                     |  3 --
>  sound/soc/codecs/Kconfig                           |  2 +-
>  sound/soc/codecs/alc5623.c                         | 20 +++++++++++
>  sound/soc/generic/simple-card.c                    | 28 +++++++++++++++
>  14 files changed, 114 insertions(+), 61 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/sound/alc5623.txt
>  delete mode 100644 arch/arm/mach-mvebu/board-t5325.c
> 
> -- 
> 2.0.0.rc0
> 

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v2 0/9] DT instantiation of sound on T5325
  2014-05-08 17:37     ` Andrew Lunn
@ 2014-05-20 21:47         ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-20 21:47 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Jason Cooper, linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

On Thu, May 08, 2014 at 07:37:48PM +0200, Andrew Lunn wrote:

> The ARM mvebu maintainer is happy with these patches. Does anybody
> have any comments on the sound/soc parts? Mark, will you take the
> alc5623 and simple-card patches?

Are there dependencies here?  If not then yes.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v2 0/9] DT instantiation of sound on T5325
@ 2014-05-20 21:47         ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-20 21:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 08, 2014 at 07:37:48PM +0200, Andrew Lunn wrote:

> The ARM mvebu maintainer is happy with these patches. Does anybody
> have any comments on the sound/soc parts? Mark, will you take the
> alc5623 and simple-card patches?

Are there dependencies here?  If not then yes.
-------------- 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/20140520/54ceb988/attachment.sig>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v2 0/9] DT instantiation of sound on T5325
  2014-05-20 21:47         ` Mark Brown
@ 2014-05-20 21:53             ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-20 21:53 UTC (permalink / raw)
  To: Mark Brown
  Cc: Andrew Lunn, devicetree-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Jason Cooper, linux ARM

On Tue, May 20, 2014 at 10:47:18PM +0100, Mark Brown wrote:
> On Thu, May 08, 2014 at 07:37:48PM +0200, Andrew Lunn wrote:
> 
> > The ARM mvebu maintainer is happy with these patches. Does anybody
> > have any comments on the sound/soc parts? Mark, will you take the
> > alc5623 and simple-card patches?
> 
> Are there dependencies here?  If not then yes.

Hi Mark

No compile time dependencies.

   Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v2 0/9] DT instantiation of sound on T5325
@ 2014-05-20 21:53             ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-20 21:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, May 20, 2014 at 10:47:18PM +0100, Mark Brown wrote:
> On Thu, May 08, 2014 at 07:37:48PM +0200, Andrew Lunn wrote:
> 
> > The ARM mvebu maintainer is happy with these patches. Does anybody
> > have any comments on the sound/soc parts? Mark, will you take the
> > alc5623 and simple-card patches?
> 
> Are there dependencies here?  If not then yes.

Hi Mark

No compile time dependencies.

   Andrew

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v2 1/9] ASoC: alc5623: Add device tree binding
  2014-05-03 18:30     ` Andrew Lunn
@ 2014-05-20 22:12         ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-20 22:12 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Jason Cooper, linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 217 bytes --]

On Sat, May 03, 2014 at 08:30:11PM +0200, Andrew Lunn wrote:
> Let the ALC5623 codec be instantiated from DT. Add a simple binding
> for the additional control register and the jack detect register.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v2 1/9] ASoC: alc5623: Add device tree binding
@ 2014-05-20 22:12         ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-20 22:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, May 03, 2014 at 08:30:11PM +0200, Andrew Lunn wrote:
> Let the ALC5623 codec be instantiated from DT. Add a simple binding
> for the additional control register and the jack detect register.

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/20140520/df115313/attachment.sig>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v2 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
  2014-05-03 18:30     ` Andrew Lunn
@ 2014-05-20 22:13         ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-20 22:13 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Jason Cooper, linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

On Sat, May 03, 2014 at 08:30:15PM +0200, Andrew Lunn wrote:
> Some platforms require that the codecs mclk is a fixed multiplication
> factor of the audio stream rate. Add a optional property to the
> binding to hold this factor and implement a hw_params() function to
> make use of it.

This doesn't apply against current code, can you please check and
resend?

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v2 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
@ 2014-05-20 22:13         ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-20 22:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, May 03, 2014 at 08:30:15PM +0200, Andrew Lunn wrote:
> Some platforms require that the codecs mclk is a fixed multiplication
> factor of the audio stream rate. Add a optional property to the
> binding to hold this factor and implement a hw_params() function to
> make use of it.

This doesn't apply against current code, can you please check and
resend?
-------------- 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/20140520/45dca0a0/attachment.sig>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
  2014-05-20 22:13         ` Mark Brown
@ 2014-05-22 15:31             ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-22 15:31 UTC (permalink / raw)
  To: Jason Cooper, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn

Some platforms require that the codecs mclk is a fixed multiplication
factor of the audio stream rate. Add a optional property to the
binding to hold this factor and implement a hw_params() function to
make use of it.

Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
---
v1->v2:
  s/factor/fs/g
v2->v3:
  rebase on asoc/for-next
---
 .../devicetree/bindings/sound/simple-card.txt      |  3 +++
 sound/soc/generic/simple-card.c                    | 28 ++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
index 9b9df146fd1a..c2e9841dfce4 100644
--- a/Documentation/devicetree/bindings/sound/simple-card.txt
+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
@@ -15,6 +15,9 @@ Optional properties:
 					  Each entry is a pair of strings, the first being the
 					  connection's sink, the second being the connection's
 					  source.
+- simple-audio-card,mclk-fs             : Multiplication factor between stream rate and codec
+  					  mclk.
+
 Optional subnodes:
 
 - simple-audio-card,dai-link		: Container for dai-link level
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 98f97e543c29..e97459f1424a 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -24,9 +24,32 @@ struct simple_card_data {
 		struct asoc_simple_dai cpu_dai;
 		struct asoc_simple_dai codec_dai;
 	} *dai_props;
+	unsigned int mclk_fs;
 	struct snd_soc_dai_link dai_link[];	/* dynamically allocated */
 };
 
+static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
+				      struct snd_pcm_hw_params *params)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
+	unsigned int mclk;
+	int ret = 0;
+
+	if (priv->mclk_fs) {
+		mclk = params_rate(params) * priv->mclk_fs;
+		ret = snd_soc_dai_set_sysclk(codec_dai, 0, mclk,
+					     SND_SOC_CLOCK_IN);
+	}
+
+	return ret;
+}
+
+static struct snd_soc_ops asoc_simple_card_ops = {
+	.hw_params = asoc_simple_card_hw_params,
+};
+
 static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai,
 				       struct asoc_simple_dai *set)
 {
@@ -249,6 +272,7 @@ static int simple_card_dai_link_of(struct device_node *node,
 	sprintf(name, "%s-%s", dai_link->cpu_dai_name,
 				dai_link->codec_dai_name);
 	dai_link->name = dai_link->stream_name = name;
+	dai_link->ops = &asoc_simple_card_ops;
 
 	dev_dbg(dev, "\tname : %s\n", dai_link->stream_name);
 	dev_dbg(dev, "\tcpu : %s / %04x / %d\n",
@@ -298,6 +322,10 @@ static int asoc_simple_card_parse_of(struct device_node *node,
 			return ret;
 	}
 
+	/* Factor to mclk, used in hw_params() */
+	of_property_read_u32(node, "simple-audio-card,mclk-fs",
+			     &priv->mclk_fs);
+
 	dev_dbg(dev, "New simple-card: %s\n", priv->snd_card.name ?
 		priv->snd_card.name : "");
 
-- 
2.0.0.rc2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
@ 2014-05-22 15:31             ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-22 15:31 UTC (permalink / raw)
  To: linux-arm-kernel

Some platforms require that the codecs mclk is a fixed multiplication
factor of the audio stream rate. Add a optional property to the
binding to hold this factor and implement a hw_params() function to
make use of it.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
v1->v2:
  s/factor/fs/g
v2->v3:
  rebase on asoc/for-next
---
 .../devicetree/bindings/sound/simple-card.txt      |  3 +++
 sound/soc/generic/simple-card.c                    | 28 ++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
index 9b9df146fd1a..c2e9841dfce4 100644
--- a/Documentation/devicetree/bindings/sound/simple-card.txt
+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
@@ -15,6 +15,9 @@ Optional properties:
 					  Each entry is a pair of strings, the first being the
 					  connection's sink, the second being the connection's
 					  source.
+- simple-audio-card,mclk-fs             : Multiplication factor between stream rate and codec
+  					  mclk.
+
 Optional subnodes:
 
 - simple-audio-card,dai-link		: Container for dai-link level
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 98f97e543c29..e97459f1424a 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -24,9 +24,32 @@ struct simple_card_data {
 		struct asoc_simple_dai cpu_dai;
 		struct asoc_simple_dai codec_dai;
 	} *dai_props;
+	unsigned int mclk_fs;
 	struct snd_soc_dai_link dai_link[];	/* dynamically allocated */
 };
 
+static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
+				      struct snd_pcm_hw_params *params)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
+	unsigned int mclk;
+	int ret = 0;
+
+	if (priv->mclk_fs) {
+		mclk = params_rate(params) * priv->mclk_fs;
+		ret = snd_soc_dai_set_sysclk(codec_dai, 0, mclk,
+					     SND_SOC_CLOCK_IN);
+	}
+
+	return ret;
+}
+
+static struct snd_soc_ops asoc_simple_card_ops = {
+	.hw_params = asoc_simple_card_hw_params,
+};
+
 static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai,
 				       struct asoc_simple_dai *set)
 {
@@ -249,6 +272,7 @@ static int simple_card_dai_link_of(struct device_node *node,
 	sprintf(name, "%s-%s", dai_link->cpu_dai_name,
 				dai_link->codec_dai_name);
 	dai_link->name = dai_link->stream_name = name;
+	dai_link->ops = &asoc_simple_card_ops;
 
 	dev_dbg(dev, "\tname : %s\n", dai_link->stream_name);
 	dev_dbg(dev, "\tcpu : %s / %04x / %d\n",
@@ -298,6 +322,10 @@ static int asoc_simple_card_parse_of(struct device_node *node,
 			return ret;
 	}
 
+	/* Factor to mclk, used in hw_params() */
+	of_property_read_u32(node, "simple-audio-card,mclk-fs",
+			     &priv->mclk_fs);
+
 	dev_dbg(dev, "New simple-card: %s\n", priv->snd_card.name ?
 		priv->snd_card.name : "");
 
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* Re: [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
  2014-05-22 15:31             ` Andrew Lunn
@ 2014-05-22 17:39                 ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-22 17:39 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Jason Cooper, linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

On Thu, May 22, 2014 at 05:31:49PM +0200, Andrew Lunn wrote:
> Some platforms require that the codecs mclk is a fixed multiplication
> factor of the audio stream rate. Add a optional property to the
> binding to hold this factor and implement a hw_params() function to
> make use of it.
> 
> Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>

I'm missing the rest of this series - what's the context, are there any
interdependencies?

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
@ 2014-05-22 17:39                 ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-22 17:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 22, 2014 at 05:31:49PM +0200, Andrew Lunn wrote:
> Some platforms require that the codecs mclk is a fixed multiplication
> factor of the audio stream rate. Add a optional property to the
> binding to hold this factor and implement a hw_params() function to
> make use of it.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

I'm missing the rest of this series - what's the context, are there any
interdependencies?
-------------- 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/20140522/2621fcdd/attachment.sig>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
  2014-05-22 17:39                 ` Mark Brown
@ 2014-05-22 17:52                     ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-22 17:52 UTC (permalink / raw)
  To: Mark Brown
  Cc: Andrew Lunn, devicetree-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Jason Cooper, linux ARM

On Thu, May 22, 2014 at 06:39:19PM +0100, Mark Brown wrote:
> On Thu, May 22, 2014 at 05:31:49PM +0200, Andrew Lunn wrote:
> > Some platforms require that the codecs mclk is a fixed multiplication
> > factor of the audio stream rate. Add a optional property to the
> > binding to hold this factor and implement a hw_params() function to
> > make use of it.
> > 
> > Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
> 
> I'm missing the rest of this series - what's the context, are there any
> interdependencies?

I threaded the patch to your request to respin this patch:

http://patchwork.ozlabs.org/patch/345353/

and the whole the v2 series is here:

http://www.spinics.net/linux/lists/arm-kernel/msg328068.html

You have already accepted patch 1, and Jason Cooper has taken 2, 3, 4,
6, 7, 8, & 9.

There are no build interdependences.

      Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
@ 2014-05-22 17:52                     ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-22 17:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 22, 2014 at 06:39:19PM +0100, Mark Brown wrote:
> On Thu, May 22, 2014 at 05:31:49PM +0200, Andrew Lunn wrote:
> > Some platforms require that the codecs mclk is a fixed multiplication
> > factor of the audio stream rate. Add a optional property to the
> > binding to hold this factor and implement a hw_params() function to
> > make use of it.
> > 
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> 
> I'm missing the rest of this series - what's the context, are there any
> interdependencies?

I threaded the patch to your request to respin this patch:

http://patchwork.ozlabs.org/patch/345353/

and the whole the v2 series is here:

http://www.spinics.net/linux/lists/arm-kernel/msg328068.html

You have already accepted patch 1, and Jason Cooper has taken 2, 3, 4,
6, 7, 8, & 9.

There are no build interdependences.

      Andrew

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
  2014-05-22 17:52                     ` Andrew Lunn
@ 2014-05-22 18:30                         ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-22 18:30 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Jason Cooper, linux ARM

[-- Attachment #1: Type: text/plain, Size: 1179 bytes --]

On Thu, May 22, 2014 at 07:52:06PM +0200, Andrew Lunn wrote:
> On Thu, May 22, 2014 at 06:39:19PM +0100, Mark Brown wrote:

> > I'm missing the rest of this series - what's the context, are there any
> > interdependencies?

> I threaded the patch to your request to respin this patch:

> http://patchwork.ozlabs.org/patch/345353/

Ugh, no - don't do this.  It's just confusing.  Patch series numbering
is used for ordering within a posting of a patch series, the fact that
a given patch might have previously been posted along with some others
isn't relevant if you send it out again in a different form.  People
will hopefully expect to see the rest of the series so they can check
for interdependencies and so on, if the subject says there are 9 patches
in what you're posting then there should be 9 patches.

Similarly threading individual modifications to patches into the middle
of prior postings makes it hard to track what's going on if things
aren't applied - "I want version 1 of this patch, version 2 of that one"
and so on gets hard to follow especially if there's a thread around them.
You get problems like some revisions getting missed in the middle of the
thread.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
@ 2014-05-22 18:30                         ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-22 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 22, 2014 at 07:52:06PM +0200, Andrew Lunn wrote:
> On Thu, May 22, 2014 at 06:39:19PM +0100, Mark Brown wrote:

> > I'm missing the rest of this series - what's the context, are there any
> > interdependencies?

> I threaded the patch to your request to respin this patch:

> http://patchwork.ozlabs.org/patch/345353/

Ugh, no - don't do this.  It's just confusing.  Patch series numbering
is used for ordering within a posting of a patch series, the fact that
a given patch might have previously been posted along with some others
isn't relevant if you send it out again in a different form.  People
will hopefully expect to see the rest of the series so they can check
for interdependencies and so on, if the subject says there are 9 patches
in what you're posting then there should be 9 patches.

Similarly threading individual modifications to patches into the middle
of prior postings makes it hard to track what's going on if things
aren't applied - "I want version 1 of this patch, version 2 of that one"
and so on gets hard to follow especially if there's a thread around them.
You get problems like some revisions getting missed in the middle of the
thread.
-------------- 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/20140522/a0b1cbaa/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
  2014-05-22 18:30                         ` Mark Brown
@ 2014-05-22 19:10                             ` Andrew Lunn
  -1 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-22 19:10 UTC (permalink / raw)
  To: Mark Brown
  Cc: Andrew Lunn, devicetree-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Jason Cooper, linux ARM

On Thu, May 22, 2014 at 07:30:54PM +0100, Mark Brown wrote:
> On Thu, May 22, 2014 at 07:52:06PM +0200, Andrew Lunn wrote:
> > On Thu, May 22, 2014 at 06:39:19PM +0100, Mark Brown wrote:
> 
> > > I'm missing the rest of this series - what's the context, are there any
> > > interdependencies?
> 
> > I threaded the patch to your request to respin this patch:
> 
> > http://patchwork.ozlabs.org/patch/345353/
> 
> Ugh, no - don't do this.  It's just confusing.

O.K, i will try to remember this as your way of doing things, when
submitting to you. The usb-serial maintainer does want replies
threading to his messages, etc. Takes a while to learn each
maintainers ways.

What you failed to say is if they will accept this one patch as is, or
if you want me to post a v4 containing all the patches?

Thanks
	Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
@ 2014-05-22 19:10                             ` Andrew Lunn
  0 siblings, 0 replies; 54+ messages in thread
From: Andrew Lunn @ 2014-05-22 19:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 22, 2014 at 07:30:54PM +0100, Mark Brown wrote:
> On Thu, May 22, 2014 at 07:52:06PM +0200, Andrew Lunn wrote:
> > On Thu, May 22, 2014 at 06:39:19PM +0100, Mark Brown wrote:
> 
> > > I'm missing the rest of this series - what's the context, are there any
> > > interdependencies?
> 
> > I threaded the patch to your request to respin this patch:
> 
> > http://patchwork.ozlabs.org/patch/345353/
> 
> Ugh, no - don't do this.  It's just confusing.

O.K, i will try to remember this as your way of doing things, when
submitting to you. The usb-serial maintainer does want replies
threading to his messages, etc. Takes a while to learn each
maintainers ways.

What you failed to say is if they will accept this one patch as is, or
if you want me to post a v4 containing all the patches?

Thanks
	Andrew

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
  2014-05-22 19:10                             ` Andrew Lunn
@ 2014-05-22 19:23                                 ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-22 19:23 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Jason Cooper, linux ARM

[-- Attachment #1: Type: text/plain, Size: 797 bytes --]

On Thu, May 22, 2014 at 09:10:13PM +0200, Andrew Lunn wrote:

> O.K, i will try to remember this as your way of doing things, when
> submitting to you. The usb-serial maintainer does want replies
> threading to his messages, etc. Takes a while to learn each
> maintainers ways.

I suspect you might find that's for things with an active thread.  I
disagree on that one still but if you're sending new stuff it's a fairly
standard rule to just send new things.

> What you failed to say is if they will accept this one patch as is, or
> if you want me to post a v4 containing all the patches?

I've not looked at it yet, I got as far as seeing that it was patch 3
and I didn't have patches 1 or 2 - I hadn't even registered what the
patch was about.  Assuming it's just a rebase it should be fine.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
@ 2014-05-22 19:23                                 ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-22 19:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 22, 2014 at 09:10:13PM +0200, Andrew Lunn wrote:

> O.K, i will try to remember this as your way of doing things, when
> submitting to you. The usb-serial maintainer does want replies
> threading to his messages, etc. Takes a while to learn each
> maintainers ways.

I suspect you might find that's for things with an active thread.  I
disagree on that one still but if you're sending new stuff it's a fairly
standard rule to just send new things.

> What you failed to say is if they will accept this one patch as is, or
> if you want me to post a v4 containing all the patches?

I've not looked at it yet, I got as far as seeing that it was patch 3
and I didn't have patches 1 or 2 - I hadn't even registered what the
patch was about.  Assuming it's just a rebase it should be fine.
-------------- 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/20140522/81b03296/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
  2014-05-22 15:31             ` Andrew Lunn
@ 2014-05-26 13:29                 ` Mark Brown
  -1 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-26 13:29 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Jason Cooper, linux ARM, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

On Thu, May 22, 2014 at 05:31:49PM +0200, Andrew Lunn wrote:
> Some platforms require that the codecs mclk is a fixed multiplication
> factor of the audio stream rate. Add a optional property to the
> binding to hold this factor and implement a hw_params() function to
> make use of it.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH v3 5/9] ASoC: simple-card: Support setting mclk via a fixed factor
@ 2014-05-26 13:29                 ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2014-05-26 13:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 22, 2014 at 05:31:49PM +0200, Andrew Lunn wrote:
> Some platforms require that the codecs mclk is a fixed multiplication
> factor of the audio stream rate. Add a optional property to the
> binding to hold this factor and implement a hw_params() function to
> make use of it.

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/20140526/5a890b51/attachment.sig>

^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2014-05-26 13:29 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-03 18:30 [PATCH v2 0/9] DT instantiation of sound on T5325 Andrew Lunn
2014-05-03 18:30 ` Andrew Lunn
     [not found] ` <1399141819-23924-1-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>
2014-05-03 18:30   ` [PATCH v2 1/9] ASoC: alc5623: Add device tree binding Andrew Lunn
2014-05-03 18:30     ` Andrew Lunn
     [not found]     ` <1399141819-23924-2-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>
2014-05-04 17:49       ` Jason Cooper
2014-05-04 17:49         ` Jason Cooper
2014-05-20 22:12       ` Mark Brown
2014-05-20 22:12         ` Mark Brown
2014-05-03 18:30   ` [PATCH v2 2/9] ARM: Kirkwood: Remove platform driver for codec Andrew Lunn
2014-05-03 18:30     ` Andrew Lunn
     [not found]     ` <1399141819-23924-3-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>
2014-05-05  1:12       ` Jason Cooper
2014-05-05  1:12         ` Jason Cooper
2014-05-03 18:30   ` [PATCH v2 3/9] ARM: Kirkwood: Add node for audio codec Andrew Lunn
2014-05-03 18:30     ` Andrew Lunn
     [not found]     ` <1399141819-23924-4-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>
2014-05-05  1:21       ` Jason Cooper
2014-05-05  1:21         ` Jason Cooper
2014-05-03 18:30   ` [PATCH v2 4/9] ARM: Kirkwood: DT: Add missing #sound-dai-cells property Andrew Lunn
2014-05-03 18:30     ` Andrew Lunn
2014-05-03 18:30   ` [PATCH v2 5/9] ASoC: simple-card: Support setting mclk via a fixed factor Andrew Lunn
2014-05-03 18:30     ` Andrew Lunn
     [not found]     ` <1399141819-23924-6-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>
2014-05-04 17:50       ` Jason Cooper
2014-05-04 17:50         ` Jason Cooper
2014-05-20 22:13       ` Mark Brown
2014-05-20 22:13         ` Mark Brown
     [not found]         ` <20140520221359.GF12304-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-05-22 15:31           ` [PATCH v3 " Andrew Lunn
2014-05-22 15:31             ` Andrew Lunn
     [not found]             ` <1400772710-23523-1-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>
2014-05-22 17:39               ` Mark Brown
2014-05-22 17:39                 ` Mark Brown
     [not found]                 ` <20140522173919.GM12304-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-05-22 17:52                   ` Andrew Lunn
2014-05-22 17:52                     ` Andrew Lunn
     [not found]                     ` <20140522175206.GA24500-g2DYL2Zd6BY@public.gmane.org>
2014-05-22 18:30                       ` Mark Brown
2014-05-22 18:30                         ` Mark Brown
     [not found]                         ` <20140522183054.GQ12304-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-05-22 19:10                           ` Andrew Lunn
2014-05-22 19:10                             ` Andrew Lunn
     [not found]                             ` <20140522191013.GC24500-g2DYL2Zd6BY@public.gmane.org>
2014-05-22 19:23                               ` Mark Brown
2014-05-22 19:23                                 ` Mark Brown
2014-05-26 13:29               ` Mark Brown
2014-05-26 13:29                 ` Mark Brown
2014-05-03 18:30   ` [PATCH v2 6/9] ARM: Kirkwood: t5325: Remove platform device to instantiate audio Andrew Lunn
2014-05-03 18:30     ` Andrew Lunn
2014-05-03 18:30   ` [PATCH v2 7/9] ARM: Kirkwood: t5325: Use simple card " Andrew Lunn
2014-05-03 18:30     ` Andrew Lunn
2014-05-03 18:30   ` [PATCH v2 8/9] ARM: mvebu_v5_defconfig: Enable sound modules needed for t5325 Andrew Lunn
2014-05-03 18:30     ` Andrew Lunn
     [not found]     ` <1399141819-23924-9-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>
2014-05-05  1:23       ` Jason Cooper
2014-05-05  1:23         ` Jason Cooper
2014-05-03 18:30   ` [PATCH v2 9/9] ARM: multi_v5_defconfig: " Andrew Lunn
2014-05-03 18:30     ` Andrew Lunn
2014-05-08 17:37   ` [PATCH v2 0/9] DT instantiation of sound on T5325 Andrew Lunn
2014-05-08 17:37     ` Andrew Lunn
     [not found]     ` <20140508173748.GK27377-g2DYL2Zd6BY@public.gmane.org>
2014-05-20 21:47       ` Mark Brown
2014-05-20 21:47         ` Mark Brown
     [not found]         ` <20140520214718.GT12304-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-05-20 21:53           ` Andrew Lunn
2014-05-20 21:53             ` Andrew Lunn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.