summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorxvatnag <vathsala.nagaraju@stericsson.com>2011-09-14 09:24:47 +0530
committerUlf Hansson <ulf.hansson@stericsson.com>2011-09-19 16:07:34 +0200
commitbcf5d6f6d2a70451ba498bb4342d5d36079cda26 (patch)
tree475bbd543067b1f0294532c83f76d794b4414735 /sound
parent8de79197240d994113d82e51f29a05922be1b6e2 (diff)
u5500: Enable Sound on HDMI
This patch enables audio HDMI sink ST-Ericsson ID: 342433 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial ref commit-id: I714161c24527288332b9ebdbef909d199a08f625 Signed-off-by: Avinash A <Avinash.a@stericsson.com> Change-Id: I41f5d27106113a5dc1cbb8febd7db29296cd3f27 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30869 Reviewed-by: Avinash A <avinash.a@stericsson.com> Tested-by: Avinash A <avinash.a@stericsson.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/ux500/u5500.c65
1 files changed, 64 insertions, 1 deletions
diff --git a/sound/soc/ux500/u5500.c b/sound/soc/ux500/u5500.c
index bd5ee83fe99..6564fe9d639 100644
--- a/sound/soc/ux500/u5500.c
+++ b/sound/soc/ux500/u5500.c
@@ -25,6 +25,12 @@
#include "ux500_ab5500.h"
#endif
+#ifdef CONFIG_SND_SOC_UX500_AV8100
+#include "ux500_av8100.h"
+#endif
+#ifdef CONFIG_SND_SOC_UX500_CG29XX
+#include "ux500_cg29xx.h"
+#endif
static struct platform_device *u5500_platform_dev;
/* Create dummy devices for platform drivers */
@@ -36,7 +42,25 @@ static struct platform_device ux500_pcm = {
},
};
+#ifdef CONFIG_SND_SOC_UX500_AV8100
+static struct platform_device av8100_codec = {
+ .name = "av8100-codec",
+ .id = 0,
+ .dev = {
+ .platform_data = NULL,
+ },
+};
+#endif
+#ifdef CONFIG_SND_SOC_UX500_CG29XX
+static struct platform_device cg29xx_codec = {
+ .name = "cg29xx-codec",
+ .id = 0,
+ .dev = {
+ .platform_data = NULL,
+ },
+};
+#endif
/* Define the whole U5500 soundcard, linking platform to the codec-drivers */
struct snd_soc_dai_link u5500_dai_links[] = {
{
@@ -55,6 +79,18 @@ struct snd_soc_dai_link u5500_dai_links[] = {
}
}
},
+ #ifdef CONFIG_SND_SOC_UX500_CG29XX
+ {
+ .name = "cg29xx_0",
+ .stream_name = "cg29xx_0",
+ .cpu_dai_name = "i2s.0",
+ .codec_dai_name = "cg29xx-codec-dai.0",
+ .platform_name = "ux500-pcm.0",
+ .codec_name = "cg29xx-codec.0",
+ .init = NULL,
+ .ops = ux500_cg29xx_ops,
+ },
+ #endif
{
.name = "ab5500_1",
.stream_name = "ab5500_1",
@@ -70,7 +106,19 @@ struct snd_soc_dai_link u5500_dai_links[] = {
.hw_params = ux500_ab5500_hw_params,
}
}
- }
+ },
+ #ifdef CONFIG_SND_SOC_UX500_AV8100
+ {
+ .name = "hdmi",
+ .stream_name = "hdmi",
+ .cpu_dai_name = "i2s.2",
+ .codec_dai_name = "av8100-codec-dai",
+ .platform_name = "ux500-pcm.0",
+ .codec_name = "av8100-codec.0",
+ .init = NULL,
+ .ops = ux500_av8100_ops,
+ },
+ #endif
};
static struct snd_soc_card u5500_drvdata = {
@@ -89,6 +137,21 @@ static int __init u5500_soc_init(void)
if (!machine_is_u5500())
return 0;
+ pr_debug("%s: Enter.\n", __func__);
+
+ #ifdef CONFIG_SND_SOC_UX500_AV8100
+ pr_debug("%s: Register device to generate a probe for AV8100 codec.\n",
+ __func__);
+ platform_device_register(&av8100_codec);
+ #endif
+
+ #ifdef CONFIG_SND_SOC_UX500_CG29XX
+ pr_debug("%s: Register device to generate a probe for CG29xx codec.\n",
+ __func__);
+ platform_device_register(&cg29xx_codec);
+ #endif
+ pr_debug("%s: Register device to generate a probe for Ux500-pcm platform.\n",
+ __func__);
platform_device_register(&ux500_pcm);
u5500_platform_dev = platform_device_alloc("soc-audio", -1);