summaryrefslogtreecommitdiff
path: root/sound/soc/ux500/u8500.c
diff options
context:
space:
mode:
authorMikko Sarmanne <mikko.sarmanne@symbio.com>2010-12-15 08:43:08 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:04:44 +0200
commit28020a9480d2e6482a4eccf38f924dbdfacea0f3 (patch)
tree8bd6d725d67583869692266badf8bde72429e09a /sound/soc/ux500/u8500.c
parent8eef521fc02912db31c9b6404fd39abfbb47d1c3 (diff)
ASoC: Add support for AB8500 audio
Adds ALSA SoC support for AB8500 audio codec for 2.6.35 kernel. Signed-off-by: Mikko Sarmanne <mikko.sarmanne@symbio.com> Change-Id: Ibb8c0ae51ebd7c31615fd214292f3be2063a3dcf Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/12277 Reviewed-by: Ola LILJA2 <ola.o.lilja@stericsson.com> Tested-by: Ola LILJA2 <ola.o.lilja@stericsson.com> Reviewed-by: QATOOLS Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
Diffstat (limited to 'sound/soc/ux500/u8500.c')
-rw-r--r--sound/soc/ux500/u8500.c43
1 files changed, 42 insertions, 1 deletions
diff --git a/sound/soc/ux500/u8500.c b/sound/soc/ux500/u8500.c
index 54fb9a1584e..e4208951821 100644
--- a/sound/soc/ux500/u8500.c
+++ b/sound/soc/ux500/u8500.c
@@ -24,6 +24,10 @@
#include "ux500_ab3550.h"
#endif
+#ifdef CONFIG_SND_SOC_UX500_AB8500
+#include "ux500_ab8500.h"
+#endif
+
#ifdef CONFIG_SND_SOC_UX500_AV8100
#include "ux500_av8100.h"
#endif
@@ -101,6 +105,28 @@ struct snd_soc_dai_link u8500_dai_links[] = {
.ops = ux500_ab3550_ops,
},
#endif
+ #ifdef CONFIG_SND_SOC_UX500_AB8500
+ {
+ .name = "ab8500_0",
+ .stream_name = "ab8500_0",
+ .cpu_dai_name = "i2s.1",
+ .codec_dai_name = "ab8500-codec-dai.0",
+ .platform_name = "ux500-pcm.0",
+ .codec_name = "ab8500-codec.0",
+ .init = ux500_ab8500_machine_codec_init,
+ .ops = ux500_ab8500_ops,
+ },
+ {
+ .name = "ab8500_1",
+ .stream_name = "ab8500_1",
+ .cpu_dai_name = "i2s.3",
+ .codec_dai_name = "ab8500-codec-dai.1",
+ .platform_name = "ux500-pcm.0",
+ .codec_name = "ab8500-codec.0",
+ .init = NULL,
+ .ops = ux500_ab8500_ops,
+ },
+ #endif
#ifdef CONFIG_SND_SOC_UX500_CG29XX
{
.name = "cg29xx_0",
@@ -124,7 +150,7 @@ static struct snd_soc_card u8500_drvdata = {
static int __init u8500_soc_init(void)
{
- int ret = 0;
+ int ret;
pr_debug("%s: Enter.\n", __func__);
@@ -140,6 +166,15 @@ static int __init u8500_soc_init(void)
platform_device_register(&cg29xx_codec);
#endif
+ #ifdef CONFIG_SND_SOC_UX500_AB8500
+ pr_debug("%s: Calling init-function for AB8500 machine driver.\n",
+ __func__);
+ ret = ux500_ab8500_soc_machine_drv_init();
+ if (ret)
+ pr_err("%s: ux500_ab8500_soc_machine_drv_init failed (%d).\n",
+ __func__, ret);
+ #endif
+
pr_debug("%s: Register device to generate a probe for Ux500-pcm platform.\n",
__func__);
platform_device_register(&ux500_pcm);
@@ -187,6 +222,12 @@ static void __exit u8500_soc_exit(void)
{
pr_debug("%s: Enter.\n", __func__);
+ #ifdef CONFIG_SND_SOC_UX500_AB8500
+ pr_debug("%s: Calling exit-function for AB8500 machine driver.\n",
+ __func__);
+ ux500_ab8500_soc_machine_drv_cleanup();
+ #endif
+
pr_debug("%s: Unregister platform device (%s).\n",
__func__,
u8500_drvdata.name);