[PATCH] ASoC: Samsung: Add arndale_rt5631 machine driver and binding

2014-11-26 Thread Krishna Mohan Dani
Adding machine driver to instantiate I2S based realtek's ALC5631
sound card on Arndale board.

There are other variants of Audio Daughter Cards for Arndale
Board for which support already exists but there is no support for
Realtek's alc5631 codec hence support for ALC5631 based machine
driver is being added.
This patch also documents the device tree binding for the Arndale
board based machine driver.

Signed-off-by: Claude Youn claude.y...@gmail.com
Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 .../devicetree/bindings/sound/arndale.txt  |   24 
 sound/soc/samsung/Kconfig  |6 +
 sound/soc/samsung/Makefile |2 +
 sound/soc/samsung/arndale_rt5631.c |  150 
 4 files changed, 182 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/arndale.txt
 create mode 100644 sound/soc/samsung/arndale_rt5631.c

diff --git a/Documentation/devicetree/bindings/sound/arndale.txt 
b/Documentation/devicetree/bindings/sound/arndale.txt
new file mode 100644
index 000..0e76946
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/arndale.txt
@@ -0,0 +1,24 @@
+Audio Binding for Arndale boards
+
+Required properties:
+- compatible : Can be the following,
+   samsung,arndale-rt5631
+
+- samsung,audio-cpu: The phandle of the Samsung I2S controller
+- samsung,audio-codec: The phandle of the audio codec
+
+Optional:
+- samsung,model: The name of the sound-card
+
+Arndale Boards has many audio daughter cards, one of them is
+rt5631/alc5631. Below example shows audio bindings for rt5631/
+alc5631 based codec.
+
+Example:
+
+sound {
+   compatible = samsung,arndale-rt5631;
+
+   samsung,audio-cpu = i2s0
+   samsung,audio-codec = rt5631;
+};
diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index 55a3869..80b5c61 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -239,3 +239,9 @@ config SND_SOC_ODROIDX2
select SND_SAMSUNG_I2S
help
  Say Y here to enable audio support for the Odroid-X2/U3.
+
+config SND_SOC_ARNDALE_RT5631_ALC5631
+tristate Audio support for RT5631(ALC5631) on Arndale Board
+depends on SND_SOC_SAMSUNG
+select SND_SAMSUNG_I2S
+select SND_SOC_RT5631
diff --git a/sound/soc/samsung/Makefile b/sound/soc/samsung/Makefile
index 91505dd..31e3dba 100644
--- a/sound/soc/samsung/Makefile
+++ b/sound/soc/samsung/Makefile
@@ -45,6 +45,7 @@ snd-soc-lowland-objs := lowland.o
 snd-soc-littlemill-objs := littlemill.o
 snd-soc-bells-objs := bells.o
 snd-soc-odroidx2-max98090-objs := odroidx2_max98090.o
+snd-soc-arndale-rt5631-objs := arndale_rt5631.o
 
 obj-$(CONFIG_SND_SOC_SAMSUNG_JIVE_WM8750) += snd-soc-jive-wm8750.o
 obj-$(CONFIG_SND_SOC_SAMSUNG_NEO1973_WM8753) += snd-soc-neo1973-wm8753.o
@@ -71,3 +72,4 @@ obj-$(CONFIG_SND_SOC_LOWLAND) += snd-soc-lowland.o
 obj-$(CONFIG_SND_SOC_LITTLEMILL) += snd-soc-littlemill.o
 obj-$(CONFIG_SND_SOC_BELLS) += snd-soc-bells.o
 obj-$(CONFIG_SND_SOC_ODROIDX2) += snd-soc-odroidx2-max98090.o
+obj-$(CONFIG_SND_SOC_ARNDALE_RT5631_ALC5631) += snd-soc-arndale-rt5631.o
diff --git a/sound/soc/samsung/arndale_rt5631.c 
b/sound/soc/samsung/arndale_rt5631.c
new file mode 100644
index 000..1e2b61c
--- /dev/null
+++ b/sound/soc/samsung/arndale_rt5631.c
@@ -0,0 +1,150 @@
+/*
+ *  arndale_rt5631.c
+ *
+ *  Copyright (c) 2014, Insignal Co., Ltd.
+ *
+ *  Author: Claude cla...@insginal.co.kr
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ */
+
+#include linux/module.h
+#include linux/platform_device.h
+#include linux/clk.h
+
+#include sound/soc.h
+#include sound/soc-dapm.h
+#include sound/pcm.h
+#include sound/pcm_params.h
+
+#include i2s.h
+
+static int arndale_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 *cpu_dai = rtd-cpu_dai;
+   struct snd_soc_dai *codec_dai = rtd-codec_dai;
+   int rfs, ret;
+   unsigned long rclk;
+
+   rfs = 256;
+
+   rclk = params_rate(params) * rfs;
+
+   ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_CDCLK,
+   0, SND_SOC_CLOCK_OUT);
+   if (ret  0)
+   return ret;
+
+   ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_RCLKSRC_0,
+   0, SND_SOC_CLOCK_OUT);
+
+   if (ret  0)
+   return ret;
+
+   ret = snd_soc_dai_set_sysclk(codec_dai, 0, rclk, SND_SOC_CLOCK_OUT);
+   if (ret  0)
+   return ret;
+
+   return 0;
+}
+
+static struct snd_soc_ops arndale_ops = {
+   .hw_params

[PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled

2014-11-24 Thread Krishna Mohan Dani
Fixes the following compilation warning:
Warning: 'rt5631_i2c_dt_ids' defined but not used - when DT is not used.

Signed-off-by: Claude Youn claude.y...@gmail.com
Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/codecs/rt5631.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index 3b7d5e4..5c65915 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -1691,7 +1691,7 @@ static const struct i2c_device_id rt5631_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
 
-static struct of_device_id rt5631_i2c_dt_ids[] = {
+static struct of_device_id rt5631_i2c_dt_ids[] __maybe_unused = {
{ .compatible = realtek,rt5631},
{ .compatible = realtek,alc5631},
{ }
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ASoC: Arndale: Add machine device tree binding documentation for Arndale board

2014-11-23 Thread Krishna Mohan Dani
Document the device tree binding for the Arndale board based machine driver.

Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 .../devicetree/bindings/sound/arndale.txt  |   24 
 1 file changed, 24 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/arndale.txt

diff --git a/Documentation/devicetree/bindings/sound/arndale.txt 
b/Documentation/devicetree/bindings/sound/arndale.txt
new file mode 100644
index 000..0e76946
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/arndale.txt
@@ -0,0 +1,24 @@
+Audio Binding for Arndale boards
+
+Required properties:
+- compatible : Can be the following,
+   samsung,arndale-rt5631
+
+- samsung,audio-cpu: The phandle of the Samsung I2S controller
+- samsung,audio-codec: The phandle of the audio codec
+
+Optional:
+- samsung,model: The name of the sound-card
+
+Arndale Boards has many audio daughter cards, one of them is
+rt5631/alc5631. Below example shows audio bindings for rt5631/
+alc5631 based codec.
+
+Example:
+
+sound {
+   compatible = samsung,arndale-rt5631;
+
+   samsung,audio-cpu = i2s0
+   samsung,audio-codec = rt5631;
+};
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4 V3] Arndale: Adding Sound Machine Driver for ALC5631 Codec

2014-11-13 Thread Krishna Mohan Dani
These patches add machine driver to instantiate I2S based realtek's
 ALC5631 based sound card on Arndale board.

There are other variants of Audio Daughter Cards for Arndale
Board for which support already exists but there is no support for
Realtek's alc5631 codec based card hence support for ALC5631 based
machine driver is being added.

Most of the code has been pulled from insignal's git for Arndale and
modified to suit the maintain syntax. Machine driver has been made
DT compatible.

Changes done:
- Removed ifdef for of_device_id structure as commented by Mark Brown
- Supporting both variants of device name:alc5631 and rt5631 as
  commented by Mark Brown
- Added return -EINVAL if cpu_of_node or codec_of_node is not
  found in dtb, as commented by Anil Kumar
- Removed i2s specific changes
- Added signed off of claude
- Removed CONFIG_OF check from rt5631.c codec driver and other changes

Krishna Mohan Dani (4):
  ASoC: ALC5631/RT5631: Add device tree binding documentation
  ASoC: Samsung: Add arndale_rt5631 machine driver
  Sound: Kconfig: Adding the description of the codec
  ASoC: rt5631: Adding Device Tree compatibility to Realtek's
ALC5631/RT5631 codec driver

 Documentation/devicetree/bindings/sound/rt5631.txt |   48 +++
 sound/soc/codecs/Kconfig   |3 +-
 sound/soc/codecs/rt5631.c  |9 ++
 sound/soc/samsung/Kconfig  |6 +
 sound/soc/samsung/Makefile |2 +
 sound/soc/samsung/arndale_rt5631.c |  150 
 6 files changed, 217 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/sound/rt5631.txt
 create mode 100644 sound/soc/samsung/arndale_rt5631.c

-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4 V3] ASoC: ALC5631/RT5631: Add device tree binding documentation

2014-11-13 Thread Krishna Mohan Dani
Document the device tree binding for the ALC5631 codec and update vendor
specific prefix for the Realtek.

Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 Documentation/devicetree/bindings/sound/rt5631.txt |   48 
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/rt5631.txt

diff --git a/Documentation/devicetree/bindings/sound/rt5631.txt 
b/Documentation/devicetree/bindings/sound/rt5631.txt
new file mode 100644
index 000..92b986c
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rt5631.txt
@@ -0,0 +1,48 @@
+ALC5631/RT5631 audio CODEC
+
+This device supports I2C only.
+
+Required properties:
+
+  - compatible : realtek,alc5631 or realtek,rt5631
+
+  - reg : the I2C address of the device.
+
+Pins on the device (for linking into audio routes):
+
+  * SPK_OUT_R_P
+  * SPK_OUT_R_N
+  * SPK_OUT_L_P
+  * SPK_OUT_L_N
+  * HP_OUT_L
+  * HP_OUT_R
+  * AUX_OUT2_LP
+  * AUX_OUT2_RN
+  * AUX_OUT1_LP
+  * AUX_OUT1_RN
+  * AUX_IN_L_JD
+  * AUX_IN_R_JD
+  * MONO_IN_P
+  * MONO_IN_N
+  * MIC1_P
+  * MIC1_N
+  * MIC2_P
+  * MIC2_N
+  * MONO_OUT_P
+  * MONO_OUT_N
+  * MICBIAS1
+  * MICBIAS2
+
+Example:
+
+alc5631: alc5631@1a {
+   compatible = realtek,alc5631;
+   reg = 0x1a;
+};
+
+or
+
+rt5631: rt5631@1a {
+   compatible = realtek,rt5631;
+   reg = 0x1a;
+};
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/4 V3] ASoC: Samsung: Add arndale_rt5631 machine driver

2014-11-13 Thread Krishna Mohan Dani
Adding machine driver to instantiate I2S based realtek's ALC5631
sound card on Arndale board.

There are other variants of Audio Daughter Cards for Arndale
Board for which support already exists but there is no support for
Realtek's alc5631 codec hence support for ALC5631 based machine
driver is being added.

Signed-off-by: Claude Youn claude.y...@gmail.com
Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/samsung/Kconfig  |6 ++
 sound/soc/samsung/Makefile |2 +
 sound/soc/samsung/arndale_rt5631.c |  150 
 3 files changed, 158 insertions(+)
 create mode 100644 sound/soc/samsung/arndale_rt5631.c

diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index 55a3869..80b5c61 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -239,3 +239,9 @@ config SND_SOC_ODROIDX2
select SND_SAMSUNG_I2S
help
  Say Y here to enable audio support for the Odroid-X2/U3.
+
+config SND_SOC_ARNDALE_RT5631_ALC5631
+tristate Audio support for RT5631(ALC5631) on Arndale Board
+depends on SND_SOC_SAMSUNG
+select SND_SAMSUNG_I2S
+select SND_SOC_RT5631
diff --git a/sound/soc/samsung/Makefile b/sound/soc/samsung/Makefile
index 91505dd..31e3dba 100644
--- a/sound/soc/samsung/Makefile
+++ b/sound/soc/samsung/Makefile
@@ -45,6 +45,7 @@ snd-soc-lowland-objs := lowland.o
 snd-soc-littlemill-objs := littlemill.o
 snd-soc-bells-objs := bells.o
 snd-soc-odroidx2-max98090-objs := odroidx2_max98090.o
+snd-soc-arndale-rt5631-objs := arndale_rt5631.o
 
 obj-$(CONFIG_SND_SOC_SAMSUNG_JIVE_WM8750) += snd-soc-jive-wm8750.o
 obj-$(CONFIG_SND_SOC_SAMSUNG_NEO1973_WM8753) += snd-soc-neo1973-wm8753.o
@@ -71,3 +72,4 @@ obj-$(CONFIG_SND_SOC_LOWLAND) += snd-soc-lowland.o
 obj-$(CONFIG_SND_SOC_LITTLEMILL) += snd-soc-littlemill.o
 obj-$(CONFIG_SND_SOC_BELLS) += snd-soc-bells.o
 obj-$(CONFIG_SND_SOC_ODROIDX2) += snd-soc-odroidx2-max98090.o
+obj-$(CONFIG_SND_SOC_ARNDALE_RT5631_ALC5631) += snd-soc-arndale-rt5631.o
diff --git a/sound/soc/samsung/arndale_rt5631.c 
b/sound/soc/samsung/arndale_rt5631.c
new file mode 100644
index 000..3495ad5
--- /dev/null
+++ b/sound/soc/samsung/arndale_rt5631.c
@@ -0,0 +1,150 @@
+/*
+ *  arndale_rt5631.c
+ *
+ *  Copyright (c) 2014, Insignal Co., Ltd.
+ *
+ *  Author: Claude cla...@insginal.co.kr
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ */
+
+#include linux/module.h
+#include linux/platform_device.h
+#include linux/clk.h
+
+#include sound/soc.h
+#include sound/soc-dapm.h
+#include sound/pcm.h
+#include sound/pcm_params.h
+
+#include i2s.h
+
+static int arndale_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 *cpu_dai = rtd-cpu_dai;
+   struct snd_soc_dai *codec_dai = rtd-codec_dai;
+   int rfs, ret;
+   unsigned long rclk;
+
+   rfs = 256;
+
+   rclk = params_rate(params) * rfs;
+
+   ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_CDCLK,
+   0, SND_SOC_CLOCK_OUT);
+   if (ret  0)
+   return ret;
+
+   ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_RCLKSRC_0,
+   0, SND_SOC_CLOCK_OUT);
+
+   if (ret  0)
+   return ret;
+
+   ret = snd_soc_dai_set_sysclk(codec_dai, 0, rclk, SND_SOC_CLOCK_OUT);
+   if (ret  0)
+   return ret;
+
+   return 0;
+}
+
+static struct snd_soc_ops arndale_ops = {
+   .hw_params = arndale_hw_params,
+};
+
+static struct snd_soc_dai_link arndale_rt5631_dai[] = {
+   {
+   .name = RT5631 HiFi,
+   .stream_name = Primary,
+   .codec_dai_name = rt5631-hifi,
+   .dai_fmt = SND_SOC_DAIFMT_I2S
+   | SND_SOC_DAIFMT_NB_NF
+   | SND_SOC_DAIFMT_CBS_CFS,
+   .ops = arndale_ops,
+   },
+};
+
+static struct snd_soc_card arndale_rt5631 = {
+   .name = Arndale RT5631,
+   .dai_link = arndale_rt5631_dai,
+   .num_links = ARRAY_SIZE(arndale_rt5631_dai),
+};
+
+static int arndale_audio_probe(struct platform_device *pdev)
+{
+   int n, ret;
+   struct device_node *np = pdev-dev.of_node;
+   struct snd_soc_card *card = arndale_rt5631;
+
+   card-dev = pdev-dev;
+
+   for (n = 0; np  n  ARRAY_SIZE(arndale_rt5631_dai); n++) {
+   if (!arndale_rt5631_dai[n].cpu_dai_name) {
+   arndale_rt5631_dai[n].cpu_of_node = of_parse_phandle(np,
+   samsung,audio-cpu, n);
+
+   if (!arndale_rt5631_dai[n].cpu_of_node

[PATCH 3/4 V3] Sound: Kconfig: Adding the description of the codec

2014-11-13 Thread Krishna Mohan Dani
Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/codecs/Kconfig |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index a68d173..7e43e97 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -487,7 +487,8 @@ config SND_SOC_RT286
depends on I2C
 
 config SND_SOC_RT5631
-   tristate
+   tristate Realtek ALC5631/RT5631 CODEC
+   depends on I2C
 
 config SND_SOC_RT5640
tristate
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/4 V3] ASoC: rt5631: Adding Device Tree compatibility to Realtek's ALC5631/RT5631 codec driver

2014-11-13 Thread Krishna Mohan Dani
Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/codecs/rt5631.c |9 +
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index 1ba27db..3b7d5e4 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -1686,10 +1686,18 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5631 
= {
 
 static const struct i2c_device_id rt5631_i2c_id[] = {
{ rt5631, 0 },
+   { alc5631, 0 },
{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
 
+static struct of_device_id rt5631_i2c_dt_ids[] = {
+   { .compatible = realtek,rt5631},
+   { .compatible = realtek,alc5631},
+   { }
+};
+MODULE_DEVICE_TABLE(of, rt5631_i2c_dt_ids);
+
 static const struct regmap_config rt5631_regmap_config = {
.reg_bits = 8,
.val_bits = 16,
@@ -1734,6 +1742,7 @@ static struct i2c_driver rt5631_i2c_driver = {
.driver = {
.name = rt5631,
.owner = THIS_MODULE,
+   .of_match_table = of_match_ptr(rt5631_i2c_dt_ids),
},
.probe = rt5631_i2c_probe,
.remove   = rt5631_i2c_remove,
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4 V2] Arndale: Adding Sound Machine Driver for ALC5631 Codec

2014-11-12 Thread Krishna Mohan Dani
These patches add machine driver to instantiate I2S based realtek's
 ALC5631 based sound card on Arndale board.

There are other variants of Audio Daughter Cards for Arndale
Board for which support already exists but there is no support for
Realtek's alc5631 codec based card hence support for ALC5631 based
machine driver is being added.

Most of the code has been pulled from insignal's git for Arndale and
modified to suit the maintain syntax. Machine driver has been made
DT compatible.

Changes done:
- Removed ifdef for of_device_id structure as commented by Mark Brown
- Supporting both variants of device name:alc5631 and rt5631 as
  commented by Mark Brown
- Added return -EINVAL if cpu_of_node or codec_of_node is not
  found in dtb, as commented by Anil Kumar 

Krishna Mohan Dani (4):
  ASoC: ALC5631/RT5631: Add device tree binding documentation
  ASoC: Samsung: Add arndale_rt5631 machine driver
  Sound: Kconfig: Adding the description of the codec
  ASoC: rt5631: Adding Device Tree compatibility to Realtek's ALC5631
codec driver

 Documentation/devicetree/bindings/sound/rt5631.txt |   48 ++
 sound/soc/codecs/Kconfig   |3 +-
 sound/soc/codecs/rt5631.c  |   11 ++
 sound/soc/samsung/Kconfig  |6 +
 sound/soc/samsung/Makefile |2 +
 sound/soc/samsung/arndale_rt5631.c |  166 
 6 files changed, 235 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/sound/rt5631.txt
 create mode 100644 sound/soc/samsung/arndale_rt5631.c

-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4 V2] ASoC: ALC5631/RT5631: Add device tree binding documentation

2014-11-12 Thread Krishna Mohan Dani
Document the device tree binding for the ALC5631 codec and update vendor
specific prefix for the Realtek.

Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 Documentation/devicetree/bindings/sound/rt5631.txt |   48 
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/rt5631.txt

diff --git a/Documentation/devicetree/bindings/sound/rt5631.txt 
b/Documentation/devicetree/bindings/sound/rt5631.txt
new file mode 100644
index 000..92b986c
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rt5631.txt
@@ -0,0 +1,48 @@
+ALC5631/RT5631 audio CODEC
+
+This device supports I2C only.
+
+Required properties:
+
+  - compatible : realtek,alc5631 or realtek,rt5631
+
+  - reg : the I2C address of the device.
+
+Pins on the device (for linking into audio routes):
+
+  * SPK_OUT_R_P
+  * SPK_OUT_R_N
+  * SPK_OUT_L_P
+  * SPK_OUT_L_N
+  * HP_OUT_L
+  * HP_OUT_R
+  * AUX_OUT2_LP
+  * AUX_OUT2_RN
+  * AUX_OUT1_LP
+  * AUX_OUT1_RN
+  * AUX_IN_L_JD
+  * AUX_IN_R_JD
+  * MONO_IN_P
+  * MONO_IN_N
+  * MIC1_P
+  * MIC1_N
+  * MIC2_P
+  * MIC2_N
+  * MONO_OUT_P
+  * MONO_OUT_N
+  * MICBIAS1
+  * MICBIAS2
+
+Example:
+
+alc5631: alc5631@1a {
+   compatible = realtek,alc5631;
+   reg = 0x1a;
+};
+
+or
+
+rt5631: rt5631@1a {
+   compatible = realtek,rt5631;
+   reg = 0x1a;
+};
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/4 V2] ASoC: Samsung: Add arndale_rt5631 machine driver

2014-11-12 Thread Krishna Mohan Dani
Adding machine driver to instantiate I2S based realtek's ALC5631
sound card on Arndale board.

There are other variants of Audio Daughter Cards for Arndale
Board for which support already exists but there is no support for
Realtek's alc5631 codec hence support for ALC5631 based machine
driver is being added.

Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/samsung/Kconfig  |6 ++
 sound/soc/samsung/Makefile |2 +
 sound/soc/samsung/arndale_rt5631.c |  166 
 3 files changed, 174 insertions(+)
 create mode 100644 sound/soc/samsung/arndale_rt5631.c

diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index 55a3869..80b5c61 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -239,3 +239,9 @@ config SND_SOC_ODROIDX2
select SND_SAMSUNG_I2S
help
  Say Y here to enable audio support for the Odroid-X2/U3.
+
+config SND_SOC_ARNDALE_RT5631_ALC5631
+tristate Audio support for RT5631(ALC5631) on Arndale Board
+depends on SND_SOC_SAMSUNG
+select SND_SAMSUNG_I2S
+select SND_SOC_RT5631
diff --git a/sound/soc/samsung/Makefile b/sound/soc/samsung/Makefile
index 91505dd..31e3dba 100644
--- a/sound/soc/samsung/Makefile
+++ b/sound/soc/samsung/Makefile
@@ -45,6 +45,7 @@ snd-soc-lowland-objs := lowland.o
 snd-soc-littlemill-objs := littlemill.o
 snd-soc-bells-objs := bells.o
 snd-soc-odroidx2-max98090-objs := odroidx2_max98090.o
+snd-soc-arndale-rt5631-objs := arndale_rt5631.o
 
 obj-$(CONFIG_SND_SOC_SAMSUNG_JIVE_WM8750) += snd-soc-jive-wm8750.o
 obj-$(CONFIG_SND_SOC_SAMSUNG_NEO1973_WM8753) += snd-soc-neo1973-wm8753.o
@@ -71,3 +72,4 @@ obj-$(CONFIG_SND_SOC_LOWLAND) += snd-soc-lowland.o
 obj-$(CONFIG_SND_SOC_LITTLEMILL) += snd-soc-littlemill.o
 obj-$(CONFIG_SND_SOC_BELLS) += snd-soc-bells.o
 obj-$(CONFIG_SND_SOC_ODROIDX2) += snd-soc-odroidx2-max98090.o
+obj-$(CONFIG_SND_SOC_ARNDALE_RT5631_ALC5631) += snd-soc-arndale-rt5631.o
diff --git a/sound/soc/samsung/arndale_rt5631.c 
b/sound/soc/samsung/arndale_rt5631.c
new file mode 100644
index 000..fa23a00
--- /dev/null
+++ b/sound/soc/samsung/arndale_rt5631.c
@@ -0,0 +1,166 @@
+/*
+ *  arndale_rt5631.c
+ *
+ *  Copyright (c) 2014, Insignal Co., Ltd.
+ *
+ *  Author: Claude cla...@insginal.co.kr
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ */
+
+#include linux/module.h
+#include linux/platform_device.h
+#include linux/clk.h
+
+#include sound/soc.h
+#include sound/soc-dapm.h
+#include sound/pcm.h
+#include sound/pcm_params.h
+
+#include i2s.h
+
+static int arndale_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 *cpu_dai = rtd-cpu_dai;
+   struct snd_soc_dai *codec_dai = rtd-codec_dai;
+   int bfs, psr, rfs, ret;
+   unsigned long rclk;
+
+   bfs = 32;
+
+   rfs = 256;
+
+   rclk = params_rate(params) * rfs;
+
+   psr = 4;
+
+   ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_CDCLK,
+   0, SND_SOC_CLOCK_OUT);
+   if (ret  0)
+   return ret;
+
+   ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_RCLKSRC_0,
+   0, SND_SOC_CLOCK_OUT);
+
+   if (ret  0)
+   return ret;
+
+   ret = snd_soc_dai_set_sysclk(codec_dai, 0, rclk, SND_SOC_CLOCK_OUT);
+   if (ret  0)
+   return ret;
+
+   return 0;
+}
+
+static struct snd_soc_ops arndale_ops = {
+   .hw_params = arndale_hw_params,
+};
+
+static int arndale_alc5631_init_paiftx(struct snd_soc_pcm_runtime *rtd)
+{
+   struct snd_soc_codec *codec = rtd-codec;
+   struct snd_soc_dapm_context *dapm = codec-dapm;
+
+   snd_soc_dapm_sync(dapm);
+
+   return 0;
+}
+
+static struct snd_soc_dai_link arndale_dai[] = {
+   {
+   .name = RT5631 HiFi,
+   .stream_name = Primary,
+   .codec_dai_name = rt5631-hifi,
+   .init = arndale_alc5631_init_paiftx,
+   .dai_fmt = SND_SOC_DAIFMT_I2S
+   | SND_SOC_DAIFMT_NB_NF
+   | SND_SOC_DAIFMT_CBS_CFS,
+   .ops = arndale_ops,
+   },
+};
+
+static struct snd_soc_card arndale = {
+   .name = Arndale-I2S,
+   .dai_link = arndale_dai,
+   .num_links = ARRAY_SIZE(arndale_dai),
+};
+
+static int arndale_audio_probe(struct platform_device *pdev)
+{
+   int n, ret;
+   struct device_node *np = pdev-dev.of_node;
+   struct snd_soc_card *card = arndale;
+
+   card-dev = pdev-dev;
+
+   for (n = 0; np  n  ARRAY_SIZE(arndale_dai); n++) {
+   if (!arndale_dai[n

[PATCH 3/4 V2] Sound: Kconfig: Adding the description of the codec

2014-11-12 Thread Krishna Mohan Dani
Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/codecs/Kconfig |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index a68d173..2d85887 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -487,7 +487,8 @@ config SND_SOC_RT286
depends on I2C
 
 config SND_SOC_RT5631
-   tristate
+   tristate Realtek ALC5631 CODEC
+   depends on I2C
 
 config SND_SOC_RT5640
tristate
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/4 V2] ASoC: rt5631: Adding Device Tree compatibility to Realtek's ALC5631 codec driver

2014-11-12 Thread Krishna Mohan Dani
Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/codecs/rt5631.c |   11 +++
 1 file changed, 11 insertions(+)

diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index 1ba27db..101b205 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -1686,10 +1686,18 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5631 
= {
 
 static const struct i2c_device_id rt5631_i2c_id[] = {
{ rt5631, 0 },
+   { alc5631, 0 },
{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
 
+static struct of_device_id rt5631_i2c_dt_ids[] = {
+   { .compatible = realtek,rt5631},
+   { .compatible = realtek,alc5631},
+   { }
+};
+MODULE_DEVICE_TABLE(of, rt5631_i2c_dt_ids);
+
 static const struct regmap_config rt5631_regmap_config = {
.reg_bits = 8,
.val_bits = 16,
@@ -1734,6 +1742,9 @@ static struct i2c_driver rt5631_i2c_driver = {
.driver = {
.name = rt5631,
.owner = THIS_MODULE,
+#ifdef CONFIG_OF
+   .of_match_table = of_match_ptr(rt5631_i2c_dt_ids),
+#endif
},
.probe = rt5631_i2c_probe,
.remove   = rt5631_i2c_remove,
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4] ASoC: ALC5631/RT5631: Add device tree binding documentation

2014-11-11 Thread Krishna Mohan Dani
Document the device tree binding for the ALC5631 codec and update vendor
specific prefix for the Realtek.

Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 Documentation/devicetree/bindings/sound/rt5631.txt |   48 
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/rt5631.txt

diff --git a/Documentation/devicetree/bindings/sound/rt5631.txt 
b/Documentation/devicetree/bindings/sound/rt5631.txt
new file mode 100644
index 000..92b986c
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rt5631.txt
@@ -0,0 +1,48 @@
+ALC5631/RT5631 audio CODEC
+
+This device supports I2C only.
+
+Required properties:
+
+  - compatible : realtek,alc5631 or realtek,rt5631
+
+  - reg : the I2C address of the device.
+
+Pins on the device (for linking into audio routes):
+
+  * SPK_OUT_R_P
+  * SPK_OUT_R_N
+  * SPK_OUT_L_P
+  * SPK_OUT_L_N
+  * HP_OUT_L
+  * HP_OUT_R
+  * AUX_OUT2_LP
+  * AUX_OUT2_RN
+  * AUX_OUT1_LP
+  * AUX_OUT1_RN
+  * AUX_IN_L_JD
+  * AUX_IN_R_JD
+  * MONO_IN_P
+  * MONO_IN_N
+  * MIC1_P
+  * MIC1_N
+  * MIC2_P
+  * MIC2_N
+  * MONO_OUT_P
+  * MONO_OUT_N
+  * MICBIAS1
+  * MICBIAS2
+
+Example:
+
+alc5631: alc5631@1a {
+   compatible = realtek,alc5631;
+   reg = 0x1a;
+};
+
+or
+
+rt5631: rt5631@1a {
+   compatible = realtek,rt5631;
+   reg = 0x1a;
+};
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] Arndale: Adding Sound Machine Driver for ALC5631 Codec

2014-11-11 Thread Krishna Mohan Dani
These patches add machine driver to instantiate I2S based realtek's
 ALC5631 based sound card on Arndale board.

There are other variants of Audio Daughter Cards for Arndale
Board for which support already exists but there is no support for
Realtek's alc5631 codec based card hence support for ALC5631 based
machine driver is being added.

Most of the code has been pulled from insignal's git for Arndale and
modified to suit the maintain syntax. Machine driver has been made
DT compatible.

Krishna Mohan Dani (4):
  ASoC: ALC5631/RT5631: Add device tree binding documentation
  ASoC: Samsung: Add arndale_rt5631 machine driver
  Sound: Kconfig: Adding the description of the codec
  ASoC: rt5631: Adding Device Tree compatibility to Realtek's ALC5631
codec driver

 Documentation/devicetree/bindings/sound/rt5631.txt |   48 ++
 sound/soc/codecs/Kconfig   |3 +-
 sound/soc/codecs/rt5631.c  |   11 ++
 sound/soc/samsung/Kconfig  |6 +
 sound/soc/samsung/Makefile |2 +
 sound/soc/samsung/arndale_rt5631.c |  166 
 6 files changed, 235 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/sound/rt5631.txt
 create mode 100644 sound/soc/samsung/arndale_rt5631.c

-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/4] ASoC: Samsung: Add arndale_rt5631 machine driver

2014-11-11 Thread Krishna Mohan Dani
Adding machine driver to instantiate I2S based realtek's ALC5631
sound card on Arndale board.

There are other variants of Audio Daughter Cards for Arndale
Board for which support already exists but there is no support for
Realtek's alc5631 codec hence support for ALC5631 based machine
driver is being added.

Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/samsung/Kconfig  |6 ++
 sound/soc/samsung/Makefile |2 +
 sound/soc/samsung/arndale_rt5631.c |  166 
 3 files changed, 174 insertions(+)
 create mode 100644 sound/soc/samsung/arndale_rt5631.c

diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index 55a3869..80b5c61 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -239,3 +239,9 @@ config SND_SOC_ODROIDX2
select SND_SAMSUNG_I2S
help
  Say Y here to enable audio support for the Odroid-X2/U3.
+
+config SND_SOC_ARNDALE_RT5631_ALC5631
+tristate Audio support for RT5631(ALC5631) on Arndale Board
+depends on SND_SOC_SAMSUNG
+select SND_SAMSUNG_I2S
+select SND_SOC_RT5631
diff --git a/sound/soc/samsung/Makefile b/sound/soc/samsung/Makefile
index 91505dd..31e3dba 100644
--- a/sound/soc/samsung/Makefile
+++ b/sound/soc/samsung/Makefile
@@ -45,6 +45,7 @@ snd-soc-lowland-objs := lowland.o
 snd-soc-littlemill-objs := littlemill.o
 snd-soc-bells-objs := bells.o
 snd-soc-odroidx2-max98090-objs := odroidx2_max98090.o
+snd-soc-arndale-rt5631-objs := arndale_rt5631.o
 
 obj-$(CONFIG_SND_SOC_SAMSUNG_JIVE_WM8750) += snd-soc-jive-wm8750.o
 obj-$(CONFIG_SND_SOC_SAMSUNG_NEO1973_WM8753) += snd-soc-neo1973-wm8753.o
@@ -71,3 +72,4 @@ obj-$(CONFIG_SND_SOC_LOWLAND) += snd-soc-lowland.o
 obj-$(CONFIG_SND_SOC_LITTLEMILL) += snd-soc-littlemill.o
 obj-$(CONFIG_SND_SOC_BELLS) += snd-soc-bells.o
 obj-$(CONFIG_SND_SOC_ODROIDX2) += snd-soc-odroidx2-max98090.o
+obj-$(CONFIG_SND_SOC_ARNDALE_RT5631_ALC5631) += snd-soc-arndale-rt5631.o
diff --git a/sound/soc/samsung/arndale_rt5631.c 
b/sound/soc/samsung/arndale_rt5631.c
new file mode 100644
index 000..17cf289
--- /dev/null
+++ b/sound/soc/samsung/arndale_rt5631.c
@@ -0,0 +1,166 @@
+/*
+ *  arndale_rt5631.c
+ *
+ *  Copyright (c) 2014, Insignal Co., Ltd.
+ *
+ *  Author: Claude cla...@insginal.co.kr
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ */
+
+#include linux/module.h
+#include linux/platform_device.h
+#include linux/clk.h
+
+#include sound/soc.h
+#include sound/soc-dapm.h
+#include sound/pcm.h
+#include sound/pcm_params.h
+
+#include i2s.h
+
+static int arndale_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 *cpu_dai = rtd-cpu_dai;
+   struct snd_soc_dai *codec_dai = rtd-codec_dai;
+   int bfs, psr, rfs, ret;
+   unsigned long rclk;
+
+   bfs = 32;
+
+   rfs = 256;
+
+   rclk = params_rate(params) * rfs;
+
+   psr = 4;
+
+   ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_CDCLK,
+   0, SND_SOC_CLOCK_OUT);
+   if (ret  0)
+   return ret;
+
+   ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_RCLKSRC_0,
+   0, SND_SOC_CLOCK_OUT);
+
+   if (ret  0)
+   return ret;
+
+   ret = snd_soc_dai_set_sysclk(codec_dai, 0, rclk, SND_SOC_CLOCK_OUT);
+   if (ret  0)
+   return ret;
+
+   return 0;
+}
+
+static struct snd_soc_ops arndale_ops = {
+   .hw_params = arndale_hw_params,
+};
+
+static int arndale_alc5631_init_paiftx(struct snd_soc_pcm_runtime *rtd)
+{
+   struct snd_soc_codec *codec = rtd-codec;
+   struct snd_soc_dapm_context *dapm = codec-dapm;
+
+   snd_soc_dapm_sync(dapm);
+
+   return 0;
+}
+
+static struct snd_soc_dai_link arndale_dai[] = {
+   {
+   .name = RT5631 HiFi,
+   .stream_name = Primary,
+   .codec_dai_name = rt5631-hifi,
+   .init = arndale_alc5631_init_paiftx,
+   .dai_fmt = SND_SOC_DAIFMT_I2S
+   | SND_SOC_DAIFMT_NB_NF
+   | SND_SOC_DAIFMT_CBS_CFS,
+   .ops = arndale_ops,
+   },
+};
+
+static struct snd_soc_card arndale = {
+   .name = Arndale-I2S,
+   .dai_link = arndale_dai,
+   .num_links = ARRAY_SIZE(arndale_dai),
+};
+
+static int arndale_audio_probe(struct platform_device *pdev)
+{
+   int n, ret;
+   struct device_node *np = pdev-dev.of_node;
+   struct snd_soc_card *card = arndale;
+
+   card-dev = pdev-dev;
+
+   for (n = 0; np  n  ARRAY_SIZE(arndale_dai); n++) {
+   if (!arndale_dai[n

[PATCH 3/4] Sound: Kconfig: Adding the description of the codec

2014-11-11 Thread Krishna Mohan Dani
Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/codecs/Kconfig |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index a68d173..2d85887 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -487,7 +487,8 @@ config SND_SOC_RT286
depends on I2C
 
 config SND_SOC_RT5631
-   tristate
+   tristate Realtek ALC5631 CODEC
+   depends on I2C
 
 config SND_SOC_RT5640
tristate
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/4] ASoC: rt5631: Adding Device Tree compatibility to Realtek's ALC5631 codec driver

2014-11-11 Thread Krishna Mohan Dani
Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/codecs/rt5631.c |   11 +++
 1 file changed, 11 insertions(+)

diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index 1ba27db..101b205 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -1686,10 +1686,18 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5631 
= {
 
 static const struct i2c_device_id rt5631_i2c_id[] = {
{ rt5631, 0 },
+   { alc5631, 0 },
{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
 
+static struct of_device_id rt5631_i2c_dt_ids[] = {
+   { .compatible = realtek,rt5631},
+   { .compatible = realtek,alc5631},
+   { }
+};
+MODULE_DEVICE_TABLE(of, rt5631_i2c_dt_ids);
+
 static const struct regmap_config rt5631_regmap_config = {
.reg_bits = 8,
.val_bits = 16,
@@ -1734,6 +1742,9 @@ static struct i2c_driver rt5631_i2c_driver = {
.driver = {
.name = rt5631,
.owner = THIS_MODULE,
+#ifdef CONFIG_OF
+   .of_match_table = of_match_ptr(rt5631_i2c_dt_ids),
+#endif
},
.probe = rt5631_i2c_probe,
.remove   = rt5631_i2c_remove,
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] Arndale: Adding Sound Machine Driver for ALC5631 Codec

2014-11-10 Thread Krishna Mohan Dani
These patches add machine driver to instantiate I2S based realtek's
 ALC5631 based sound card on Arndale board.

There are other variants of Audio Daughter Cards for Arndale
Board for which support already exists but there is no support for
Realtek's alc5631 codec based card hence support for ALC5631 based
machine driver is being added.

Most of the code has been pulled from insignal's git for Arndale and
modified to suit the maintain syntax. Machine driver has been made
DT compatible.

Krishna Mohan Dani (4):
  ASoC: ALC5631: Add device tree binding documentation
  Sound: Samsung: Add sound card machine driver for Arndale Board
  Sound: Kconfig: Adding the description of the codec
  Sound: DT: Adding Device Tree compatibility to Realtek's ALC5631
codec driver

 Documentation/devicetree/bindings/sound/rt5631.txt |   41 +
 sound/soc/codecs/Kconfig   |3 +-
 sound/soc/codecs/rt5631.c  |   11 ++
 sound/soc/samsung/Kconfig  |6 +
 sound/soc/samsung/Makefile |2 +
 sound/soc/samsung/arndale_rt5631.c |  167 
 6 files changed, 229 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/sound/rt5631.txt
 create mode 100644 sound/soc/samsung/arndale_rt5631.c

-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4] ASoC: ALC5631: Add device tree binding documentation

2014-11-10 Thread Krishna Mohan Dani
Document the device tree binding for the ALC5631 codec and update vendor
specific prefix for the Realtek.

Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 Documentation/devicetree/bindings/sound/rt5631.txt |   41 
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/rt5631.txt

diff --git a/Documentation/devicetree/bindings/sound/rt5631.txt 
b/Documentation/devicetree/bindings/sound/rt5631.txt
new file mode 100644
index 000..9e68c4d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rt5631.txt
@@ -0,0 +1,41 @@
+ALC5631 audio CODEC
+
+This device supports I2C only.
+
+Required properties:
+
+  - compatible : realtek,alc5631
+
+  - reg : the I2C address of the device.
+
+Pins on the device (for linking into audio routes):
+
+  * SPK_OUT_R_P
+  * SPK_OUT_R_N
+  * SPK_OUT_L_P
+  * SPK_OUT_L_N
+  * HP_OUT_L
+  * HP_OUT_R
+  * AUX_OUT2_LP
+  * AUX_OUT2_RN
+  * AUX_OUT1_LP
+  * AUX_OUT1_RN
+  * AUX_IN_L_JD
+  * AUX_IN_R_JD
+  * MONO_IN_P
+  * MONO_IN_N
+  * MIC1_P
+  * MIC1_N
+  * MIC2_P
+  * MIC2_N
+  * MONO_OUT_P
+  * MONO_OUT_N
+  * MICBIAS1
+  * MICBIAS2
+
+Example:
+
+alc5631: alc5631@1e {
+   compatible = realtek,alc5631;
+   reg = 0x1a;
+};
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/4] Sound: Samsung: Add sound card machine driver for Arndale Board

2014-11-10 Thread Krishna Mohan Dani
Adding machine driver to instantiate I2S based realtek's ALC5631
sound card on Arndale board.

There are other variants of Audio Daughter Cards for Arndale
Board for which support already exists but there is no support for
Realtek's alc5631 codec hence support for ALC5631 based machine
driver is being added.

Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/samsung/Kconfig  |6 ++
 sound/soc/samsung/Makefile |2 +
 sound/soc/samsung/arndale_rt5631.c |  167 
 3 files changed, 175 insertions(+)
 create mode 100644 sound/soc/samsung/arndale_rt5631.c

diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index 55a3869..b6134aa 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -239,3 +239,9 @@ config SND_SOC_ODROIDX2
select SND_SAMSUNG_I2S
help
  Say Y here to enable audio support for the Odroid-X2/U3.
+
+config SND_SOC_ARNDALE_RT5631
+tristate Audio support for RT5631(ALC5631) on Arndale Board
+depends on SND_SOC_SAMSUNG
+select SND_SAMSUNG_I2S
+select SND_SOC_RT5631
diff --git a/sound/soc/samsung/Makefile b/sound/soc/samsung/Makefile
index 91505dd..656e64d 100644
--- a/sound/soc/samsung/Makefile
+++ b/sound/soc/samsung/Makefile
@@ -45,6 +45,7 @@ snd-soc-lowland-objs := lowland.o
 snd-soc-littlemill-objs := littlemill.o
 snd-soc-bells-objs := bells.o
 snd-soc-odroidx2-max98090-objs := odroidx2_max98090.o
+snd-soc-arndale-rt5631-objs := arndale_rt5631.o
 
 obj-$(CONFIG_SND_SOC_SAMSUNG_JIVE_WM8750) += snd-soc-jive-wm8750.o
 obj-$(CONFIG_SND_SOC_SAMSUNG_NEO1973_WM8753) += snd-soc-neo1973-wm8753.o
@@ -71,3 +72,4 @@ obj-$(CONFIG_SND_SOC_LOWLAND) += snd-soc-lowland.o
 obj-$(CONFIG_SND_SOC_LITTLEMILL) += snd-soc-littlemill.o
 obj-$(CONFIG_SND_SOC_BELLS) += snd-soc-bells.o
 obj-$(CONFIG_SND_SOC_ODROIDX2) += snd-soc-odroidx2-max98090.o
+obj-$(CONFIG_SND_SOC_ARNDALE_RT5631) += snd-soc-arndale-rt5631.o
diff --git a/sound/soc/samsung/arndale_rt5631.c 
b/sound/soc/samsung/arndale_rt5631.c
new file mode 100644
index 000..2697af7
--- /dev/null
+++ b/sound/soc/samsung/arndale_rt5631.c
@@ -0,0 +1,167 @@
+/*
+ *  arndale_rt5631.c
+ *
+ *  Copyright (c) 2014, Insignal Co., Ltd.
+ *
+ *  Author: Claude cla...@insginal.co.kr
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ */
+
+#include linux/module.h
+#include linux/platform_device.h
+#include linux/clk.h
+
+#include sound/soc.h
+#include sound/soc-dapm.h
+#include sound/pcm.h
+#include sound/pcm_params.h
+
+#include i2s.h
+
+static int arndale_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 *cpu_dai = rtd-cpu_dai;
+   struct snd_soc_dai *codec_dai = rtd-codec_dai;
+   int bfs, psr, rfs, ret;
+   unsigned long rclk;
+
+   bfs = 32;
+
+   rfs = 256;
+
+   rclk = params_rate(params) * rfs;
+
+   psr = 4;
+
+   ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_CDCLK,
+   0, SND_SOC_CLOCK_OUT);
+   if (ret  0)
+   return ret;
+
+   ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_RCLKSRC_0,
+   0, SND_SOC_CLOCK_OUT);
+
+   if (ret  0)
+   return ret;
+
+   ret = snd_soc_dai_set_sysclk(codec_dai, 0, rclk, SND_SOC_CLOCK_OUT);
+   if (ret  0)
+   return ret;
+
+   return 0;
+}
+
+static struct snd_soc_ops arndale_ops = {
+   .hw_params = arndale_hw_params,
+};
+
+static int arndale_alc5631_init_paiftx(struct snd_soc_pcm_runtime *rtd)
+{
+   struct snd_soc_codec *codec = rtd-codec;
+   struct snd_soc_dapm_context *dapm = codec-dapm;
+
+   snd_soc_dapm_sync(dapm);
+
+   return 0;
+}
+
+static struct snd_soc_dai_link arndale_dai[] = {
+   {
+   .name = RT5631 HiFi,
+   .stream_name = Primary,
+   .codec_dai_name = rt5631-hifi,
+   .init = arndale_alc5631_init_paiftx,
+   .dai_fmt = SND_SOC_DAIFMT_I2S
+   | SND_SOC_DAIFMT_NB_NF
+   | SND_SOC_DAIFMT_CBS_CFS,
+   .ops = arndale_ops,
+   },
+};
+
+static struct snd_soc_card arndale = {
+   .name = Arndale-I2S,
+   .dai_link = arndale_dai,
+   .num_links = ARRAY_SIZE(arndale_dai),
+};
+
+static int arndale_audio_probe(struct platform_device *pdev)
+{
+   int n, ret;
+   struct device_node *np = pdev-dev.of_node;
+   struct snd_soc_card *card = arndale;
+
+   card-dev = pdev-dev;
+
+   for (n = 0; np  n  ARRAY_SIZE(arndale_dai); n++) {
+   if (!arndale_dai[n].cpu_dai_name

[PATCH 4/4] Sound: DT: Adding Device Tree compatibility to Realtek's ALC5631 codec driver

2014-11-10 Thread Krishna Mohan Dani
Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/codecs/rt5631.c |   11 +++
 1 file changed, 11 insertions(+)

diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index 1ba27db..d7c3f42 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -1690,6 +1690,14 @@ static const struct i2c_device_id rt5631_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
 
+#ifdef CONFIG_OF
+static struct of_device_id rt5631_i2c_dt_ids[] = {
+   { .compatible = realtek,alc5631},
+   { }
+};
+MODULE_DEVICE_TABLE(of, rt5631_i2c_dt_ids);
+#endif
+
 static const struct regmap_config rt5631_regmap_config = {
.reg_bits = 8,
.val_bits = 16,
@@ -1734,6 +1742,9 @@ static struct i2c_driver rt5631_i2c_driver = {
.driver = {
.name = rt5631,
.owner = THIS_MODULE,
+#ifdef CONFIG_OF
+   .of_match_table = of_match_ptr(rt5631_i2c_dt_ids),
+#endif
},
.probe = rt5631_i2c_probe,
.remove   = rt5631_i2c_remove,
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/4] Sound: Kconfig: Adding the description of the codec

2014-11-10 Thread Krishna Mohan Dani
Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/codecs/Kconfig |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index a68d173..2d85887 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -487,7 +487,8 @@ config SND_SOC_RT286
depends on I2C
 
 config SND_SOC_RT5631
-   tristate
+   tristate Realtek ALC5631 CODEC
+   depends on I2C
 
 config SND_SOC_RT5640
tristate
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] Arndale: Adding Sound Machine Driver for ALC5631 Codec

2014-10-27 Thread Krishna Mohan Dani
These patches add machine driver to instantiate I2S based realtek's
 ALC5631 based sound card on Arndale board.

There are other variants of Audio Daughter Cards for Arndale
Board for which support already exists but there is no support for
Realtek's alc5631 codec based card hence support for ALC5631 based
machine driver is being added.

Most of the code has been pulled from insignal's git for Arndale and
modified to suit the maintain syntax. Machine driver has been made
DT compatible.

Krishna Mohan Dani (4):
  ASoC: ALC5631: Add device tree binding documentation
  Sound: Samsung: Add sound card machine driver for Arndale Board
  Sound: Kconfig: Adding the description of the codec
  Sound: DT: Adding Device Tree compatibility to Realtek's ALC5631
codec driver

 Documentation/devicetree/bindings/sound/rt5631.txt |   41 +
 sound/soc/codecs/Kconfig   |3 +-
 sound/soc/codecs/rt5631.c  |   11 ++
 sound/soc/samsung/Kconfig  |6 +
 sound/soc/samsung/Makefile |2 +
 sound/soc/samsung/arndale_rt5631.c |  167 
 6 files changed, 229 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/sound/rt5631.txt
 create mode 100644 sound/soc/samsung/arndale_rt5631.c

-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4] ASoC: ALC5631: Add device tree binding documentation

2014-10-27 Thread Krishna Mohan Dani
Document the device tree binding for the ALC5631 codec and update vendor
specific prefix for the Realtek.

Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 Documentation/devicetree/bindings/sound/rt5631.txt |   41 
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/rt5631.txt

diff --git a/Documentation/devicetree/bindings/sound/rt5631.txt 
b/Documentation/devicetree/bindings/sound/rt5631.txt
new file mode 100644
index 000..9e68c4d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rt5631.txt
@@ -0,0 +1,41 @@
+ALC5631 audio CODEC
+
+This device supports I2C only.
+
+Required properties:
+
+  - compatible : realtek,alc5631
+
+  - reg : the I2C address of the device.
+
+Pins on the device (for linking into audio routes):
+
+  * SPK_OUT_R_P
+  * SPK_OUT_R_N
+  * SPK_OUT_L_P
+  * SPK_OUT_L_N
+  * HP_OUT_L
+  * HP_OUT_R
+  * AUX_OUT2_LP
+  * AUX_OUT2_RN
+  * AUX_OUT1_LP
+  * AUX_OUT1_RN
+  * AUX_IN_L_JD
+  * AUX_IN_R_JD
+  * MONO_IN_P
+  * MONO_IN_N
+  * MIC1_P
+  * MIC1_N
+  * MIC2_P
+  * MIC2_N
+  * MONO_OUT_P
+  * MONO_OUT_N
+  * MICBIAS1
+  * MICBIAS2
+
+Example:
+
+alc5631: alc5631@1e {
+   compatible = realtek,alc5631;
+   reg = 0x1a;
+};
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/4] Sound: DT: Adding Device Tree compatibility to Realtek's ALC5631 codec driver

2014-10-27 Thread Krishna Mohan Dani
Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/codecs/rt5631.c |   11 +++
 1 file changed, 11 insertions(+)

diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index 1ba27db..d7c3f42 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -1690,6 +1690,14 @@ static const struct i2c_device_id rt5631_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
 
+#ifdef CONFIG_OF
+static struct of_device_id rt5631_i2c_dt_ids[] = {
+   { .compatible = realtek,alc5631},
+   { }
+};
+MODULE_DEVICE_TABLE(of, rt5631_i2c_dt_ids);
+#endif
+
 static const struct regmap_config rt5631_regmap_config = {
.reg_bits = 8,
.val_bits = 16,
@@ -1734,6 +1742,9 @@ static struct i2c_driver rt5631_i2c_driver = {
.driver = {
.name = rt5631,
.owner = THIS_MODULE,
+#ifdef CONFIG_OF
+   .of_match_table = of_match_ptr(rt5631_i2c_dt_ids),
+#endif
},
.probe = rt5631_i2c_probe,
.remove   = rt5631_i2c_remove,
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/4] Sound: Samsung: Add sound card machine driver for Arndale Board

2014-10-27 Thread Krishna Mohan Dani
Adding machine driver to instantiate I2S based realtek's ALC5631
sound card on Arndale board.

There are other variants of Audio Daughter Cards for Arndale
Board for which support already exists but there is no support for
Realtek's alc5631 codec hence support for ALC5631 based machine
driver is being added.

Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/samsung/Kconfig  |6 ++
 sound/soc/samsung/Makefile |2 +
 sound/soc/samsung/arndale_rt5631.c |  167 
 3 files changed, 175 insertions(+)
 create mode 100644 sound/soc/samsung/arndale_rt5631.c

diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index 55a3869..b6134aa 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -239,3 +239,9 @@ config SND_SOC_ODROIDX2
select SND_SAMSUNG_I2S
help
  Say Y here to enable audio support for the Odroid-X2/U3.
+
+config SND_SOC_ARNDALE_RT5631
+tristate Audio support for RT5631(ALC5631) on Arndale Board
+depends on SND_SOC_SAMSUNG
+select SND_SAMSUNG_I2S
+select SND_SOC_RT5631
diff --git a/sound/soc/samsung/Makefile b/sound/soc/samsung/Makefile
index 91505dd..656e64d 100644
--- a/sound/soc/samsung/Makefile
+++ b/sound/soc/samsung/Makefile
@@ -45,6 +45,7 @@ snd-soc-lowland-objs := lowland.o
 snd-soc-littlemill-objs := littlemill.o
 snd-soc-bells-objs := bells.o
 snd-soc-odroidx2-max98090-objs := odroidx2_max98090.o
+snd-soc-arndale-rt5631-objs := arndale_rt5631.o
 
 obj-$(CONFIG_SND_SOC_SAMSUNG_JIVE_WM8750) += snd-soc-jive-wm8750.o
 obj-$(CONFIG_SND_SOC_SAMSUNG_NEO1973_WM8753) += snd-soc-neo1973-wm8753.o
@@ -71,3 +72,4 @@ obj-$(CONFIG_SND_SOC_LOWLAND) += snd-soc-lowland.o
 obj-$(CONFIG_SND_SOC_LITTLEMILL) += snd-soc-littlemill.o
 obj-$(CONFIG_SND_SOC_BELLS) += snd-soc-bells.o
 obj-$(CONFIG_SND_SOC_ODROIDX2) += snd-soc-odroidx2-max98090.o
+obj-$(CONFIG_SND_SOC_ARNDALE_RT5631) += snd-soc-arndale-rt5631.o
diff --git a/sound/soc/samsung/arndale_rt5631.c 
b/sound/soc/samsung/arndale_rt5631.c
new file mode 100644
index 000..2697af7
--- /dev/null
+++ b/sound/soc/samsung/arndale_rt5631.c
@@ -0,0 +1,167 @@
+/*
+ *  arndale_rt5631.c
+ *
+ *  Copyright (c) 2014, Insignal Co., Ltd.
+ *
+ *  Author: Claude cla...@insginal.co.kr
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ */
+
+#include linux/module.h
+#include linux/platform_device.h
+#include linux/clk.h
+
+#include sound/soc.h
+#include sound/soc-dapm.h
+#include sound/pcm.h
+#include sound/pcm_params.h
+
+#include i2s.h
+
+static int arndale_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 *cpu_dai = rtd-cpu_dai;
+   struct snd_soc_dai *codec_dai = rtd-codec_dai;
+   int bfs, psr, rfs, ret;
+   unsigned long rclk;
+
+   bfs = 32;
+
+   rfs = 256;
+
+   rclk = params_rate(params) * rfs;
+
+   psr = 4;
+
+   ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_CDCLK,
+   0, SND_SOC_CLOCK_OUT);
+   if (ret  0)
+   return ret;
+
+   ret = snd_soc_dai_set_sysclk(cpu_dai, SAMSUNG_I2S_RCLKSRC_0,
+   0, SND_SOC_CLOCK_OUT);
+
+   if (ret  0)
+   return ret;
+
+   ret = snd_soc_dai_set_sysclk(codec_dai, 0, rclk, SND_SOC_CLOCK_OUT);
+   if (ret  0)
+   return ret;
+
+   return 0;
+}
+
+static struct snd_soc_ops arndale_ops = {
+   .hw_params = arndale_hw_params,
+};
+
+static int arndale_alc5631_init_paiftx(struct snd_soc_pcm_runtime *rtd)
+{
+   struct snd_soc_codec *codec = rtd-codec;
+   struct snd_soc_dapm_context *dapm = codec-dapm;
+
+   snd_soc_dapm_sync(dapm);
+
+   return 0;
+}
+
+static struct snd_soc_dai_link arndale_dai[] = {
+   {
+   .name = RT5631 HiFi,
+   .stream_name = Primary,
+   .codec_dai_name = rt5631-hifi,
+   .init = arndale_alc5631_init_paiftx,
+   .dai_fmt = SND_SOC_DAIFMT_I2S
+   | SND_SOC_DAIFMT_NB_NF
+   | SND_SOC_DAIFMT_CBS_CFS,
+   .ops = arndale_ops,
+   },
+};
+
+static struct snd_soc_card arndale = {
+   .name = Arndale-I2S,
+   .dai_link = arndale_dai,
+   .num_links = ARRAY_SIZE(arndale_dai),
+};
+
+static int arndale_audio_probe(struct platform_device *pdev)
+{
+   int n, ret;
+   struct device_node *np = pdev-dev.of_node;
+   struct snd_soc_card *card = arndale;
+
+   card-dev = pdev-dev;
+
+   for (n = 0; np  n  ARRAY_SIZE(arndale_dai); n++) {
+   if (!arndale_dai[n].cpu_dai_name

[PATCH 3/4] Sound: Kconfig: Adding the description of the codec

2014-10-27 Thread Krishna Mohan Dani
Signed-off-by: Krishna Mohan Dani krishna...@samsung.com
---
 sound/soc/codecs/Kconfig |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index a68d173..2d85887 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -487,7 +487,8 @@ config SND_SOC_RT286
depends on I2C
 
 config SND_SOC_RT5631
-   tristate
+   tristate Realtek ALC5631 CODEC
+   depends on I2C
 
 config SND_SOC_RT5640
tristate
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html