[alsa-devel] [PATCH 2/4 v6] ASoC: ak4642: enable .of_xlate_dai_name on struct snd_soc_dai_driver

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu Feb 14 10:22:10 CET 2013


ak4642 driver can be used from simple-card driver
which requires .of_xlate_dai_name.

This patch supports .of_xlate_dai_name.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
v5 -> v6

 - new patch

 Documentation/devicetree/bindings/sound/ak4642.txt |    5 +++++
 sound/soc/codecs/ak4642.c                          |    1 +
 2 files changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/ak4642.txt b/Documentation/devicetree/bindings/sound/ak4642.txt
index 623d4e7..c9bb4e5 100644
--- a/Documentation/devicetree/bindings/sound/ak4642.txt
+++ b/Documentation/devicetree/bindings/sound/ak4642.txt
@@ -7,10 +7,15 @@ Required properties:
   - compatible : "asahi-kasei,ak4642" or "asahi-kasei,ak4643" or "asahi-kasei,ak4648"
   - reg : The chip select number on the I2C bus
 
+Optional
+
+  #sound-dai-cells : enable DAI specifier, it must be 1
+
 Example:
 
 &i2c {
 	ak4648: ak4648 at 0x12 {
+		#sound-dai-cells = <1>;
 		compatible = "asahi-kasei,ak4642";
 		reg = <0x12>;
 	};
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index c78794d..4b212f9 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -452,6 +452,7 @@ static struct snd_soc_dai_driver ak4642_dai = {
 		.formats = SNDRV_PCM_FMTBIT_S16_LE },
 	.ops = &ak4642_dai_ops,
 	.symmetric_rates = 1,
+	.of_xlate_dai_name = snd_soc_common_of_xlate_dai_name,
 };
 
 static int ak4642_resume(struct snd_soc_codec *codec)
-- 
1.7.9.5



More information about the Alsa-devel mailing list