summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy.green@linaro.org>2012-02-24 22:02:57 +0800
committerAndy Green <andy.green@linaro.org>2012-02-24 22:31:20 +0800
commita946c4893d261efb8a0bb0bf019157b03102fefa (patch)
tree039c350daca97676e8a67c9bdebc85ddd9c969a0
parentfbde73780a27ed5d38913be4dd94c08295444e01 (diff)
Signed-off-by: Andy Green <andy.green@linaro.org>
-rw-r--r--arch/arm/mach-omap2/board-omap5evm.c29
-rw-r--r--arch/arm/mach-omap2/devices.c29
-rw-r--r--arch/arm/mach-omap2/mcbsp.c12
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_54xx_data.c2
-rw-r--r--arch/arm/mach-omap2/opp5xxx_data.c3
-rw-r--r--sound/soc/omap/Kconfig2
-rw-r--r--sound/soc/omap/omap-abe-core.c9
-rw-r--r--sound/soc/omap/omap-abe-twl6040.c7
-rw-r--r--sound/soc/omap/omap-mcbsp.c2
-rw-r--r--sound/soc/soc-core.c2
-rw-r--r--sound/soc/soc-dapm.c2
-rw-r--r--sound/soc/soc-pcm.c2
12 files changed, 74 insertions, 27 deletions
diff --git a/arch/arm/mach-omap2/board-omap5evm.c b/arch/arm/mach-omap2/board-omap5evm.c
index 0688403252e..a6081ebd211 100644
--- a/arch/arm/mach-omap2/board-omap5evm.c
+++ b/arch/arm/mach-omap2/board-omap5evm.c
@@ -19,6 +19,7 @@
#include <linux/hwspinlock.h>
#include <linux/i2c/tsl2771.h>
#include <linux/input/mpu6050.h>
+#include <linux/platform_data/omap-abe-twl6040.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
@@ -793,6 +794,33 @@ static struct twl6040_platform_data twl6040_data = {
.irq_base = TWL6040_CODEC_IRQ_BASE,
};
+static struct omap_abe_twl6040_data omap5sevm_abe_audio_data = {
+ /* Audio out */
+ .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
+ /* HandsFree through expasion connector */
+ .has_hf = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
+ /* PandaBoard: FM TX, PandaBoardES: can be connected to audio out */
+ .has_aux = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
+ /* PandaBoard: FM RX, PandaBoardES: audio in */
+ .has_afm = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
+ .has_abe = 1,
+ /* No jack detection. */
+ .jack_detection = 1,
+ /* MCLK input is 38.4MHz */
+ .mclk_freq = 19200000,
+ .card_name = "omap5sevm",
+ .has_hsmic = 1,
+ .has_dmic = 0, // was 1
+};
+
+static struct platform_device omap5sevm_abe_audio = {
+ .name = "omap-abe-twl6040",
+ .id = -1,
+ .dev = {
+ .platform_data = &omap5sevm_abe_audio_data,
+ },
+};
+
static struct i2c_board_info __initdata omap5evm_i2c_1_boardinfo[] = {
#ifdef CONFIG_OMAP5_SEVM_PALMAS
{
@@ -1291,6 +1319,7 @@ static void __init omap_5430evm_init(void)
omap_5430evm_i2c_init();
omap_serial_init();
platform_device_register(&dummy_sd_regulator_device);
+ platform_device_register(&omap5sevm_abe_audio);
omap2_hsmmc_init(mmc);
omap_ehci_ohci_init();
#if 0
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index eb2621f7029..9321dc6002a 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -334,10 +334,16 @@ static struct platform_device codec_dmic2 = {
};
static struct platform_device omap_abe_dai = {
- .name = "omap-abe-dai",
+// .name = "omap-abe-dai",
+ .name = "omap-abe-twl6040",
.id = -1,
};
+static struct platform_device codec_aess = {
+ .name = "aess",
+ .id = -1,
+};
+
static inline void omap_init_abe(void)
{
platform_device_register(&codec_dmic0);
@@ -467,7 +473,7 @@ static inline void omap_init_dmic(void) {}
#endif
#if defined(CONFIG_SND_OMAP_SOC_ABE_DSP) || \
- defined(CONFIG_SND_OMAP_SOC_ABE_DSP_MODULE)
+ defined(CONFIG_SND_OMAP_SOC_ABE_DSP_MODULE) || defined(CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040)
static struct omap_device_pm_latency omap_aess_latency[] = {
{
@@ -480,7 +486,7 @@ static struct omap_device_pm_latency omap_aess_latency[] = {
static void omap_init_aess(void)
{
struct omap_hwmod *oh;
- struct omap4_abe_dsp_pdata *pdata;
+// struct omap4_abe_dsp_pdata *pdata;
struct platform_device *od;
oh = omap_hwmod_lookup("aess");
@@ -489,21 +495,21 @@ static void omap_init_aess(void)
return;
}
- pdata = kzalloc(sizeof(struct omap4_abe_dsp_pdata), GFP_KERNEL);
- if (!pdata) {
- pr_err("%s Could not allocate platform data\n", __func__);
- return;
- }
+// pdata = kzalloc(sizeof(struct omap4_abe_dsp_pdata), GFP_KERNEL);
+// if (!pdata) {
+// pr_err("%s Could not allocate platform data\n", __func__);
+// return;
+// }
/* FIXME: Add correct context loss counter */
/*pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count;*/
- od = omap_device_build("aess", -1, oh, pdata,
- sizeof(struct omap4_abe_dsp_pdata),
+ od = omap_device_build("aess", -1, oh, NULL, //pdata,
+ 0, // sizeof(struct omap4_abe_dsp_pdata),
omap_aess_latency,
ARRAY_SIZE(omap_aess_latency), 0);
- kfree(pdata);
+// kfree(pdata);
if (IS_ERR(od))
pr_err("Could not build omap_device for omap-aess-audio\n");
@@ -918,7 +924,6 @@ static int __init omap2_init_devices(void)
omap_init_audio();
omap_init_dmic();
omap_init_mcpdm();
- omap_init_dmic();
omap_init_camera();
omap_init_mbox();
omap_init_mcspi();
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index a0e206ae6fe..cb81ff6a81f 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -75,18 +75,6 @@ static int omap2_mcbsp_reparent_clk(struct device *dev, struct clk *clk,
fck_src_name = "pad_fck";
else if (!strcmp(fck_src_name, "clks_fclk"))
fck_src_name = "prcm_fck";
- if (!omap_mcbsp_check_valid_id(id)) {
- pr_err("%s: Invalid id (%d)\n", __func__, id + 1);
- return -EINVAL;
- }
- mcbsp = id_to_mcbsp_ptr(id);
-
- if (fck_src_id == MCBSP_CLKS_PAD_SRC)
- fck_src_name = mcbsp->pdata->clks_pad_src;
- else if (fck_src_id == MCBSP_CLKS_PRCM_SRC)
- fck_src_name = mcbsp->pdata->clks_prcm_src;
- else
- return -EINVAL;
fck_src = clk_get(dev, fck_src_name);
if (IS_ERR_OR_NULL(fck_src)) {
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
index a02631715e0..667ac70ebfc 100644
--- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
@@ -1156,6 +1156,7 @@ static struct omap_hwmod_dma_info omap54xx_dmic_sdma_reqs[] = {
static struct omap_hwmod_addr_space omap54xx_dmic_addrs[] = {
{
+ .name = "mpu",
.pa_start = 0x4012e000,
.pa_end = 0x4012e07f,
.flags = ADDR_TYPE_RT
@@ -1174,6 +1175,7 @@ static struct omap_hwmod_ocp_if omap54xx_l4_abe__dmic = {
static struct omap_hwmod_addr_space omap54xx_dmic_dma_addrs[] = {
{
+ .name = "dma",
.pa_start = 0x4902e000,
.pa_end = 0x4902e07f,
.flags = ADDR_TYPE_RT
diff --git a/arch/arm/mach-omap2/opp5xxx_data.c b/arch/arm/mach-omap2/opp5xxx_data.c
index f8fa94fc768..58e510c48cc 100644
--- a/arch/arm/mach-omap2/opp5xxx_data.c
+++ b/arch/arm/mach-omap2/opp5xxx_data.c
@@ -181,7 +181,8 @@ static struct omap_opp_def __initdata omap54xx_opp_def_list[] = {
OPP_INITIALIZER("hsi", "hsi_fck", "core", true, 96000000, OMAP5430_VDD_CORE_OPP_LOW),
/* FDIF OPP3 - OPPNOM */
OPP_INITIALIZER("fdif", "hsi_fck", "core", true, 192000000, OMAP5430_VDD_CORE_OPP_NOM),
-
+#endif
+#if 1
/* ABE OPP1 - OPPLOW */
OPP_INITIALIZER("aess", "abe_clk", "core", true, 98304000, OMAP5430_VDD_CORE_OPP_LOW),
/* ABE OPP2 - OPPNOM */
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 237132ae046..3afba7e070e 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -102,7 +102,7 @@ config SND_OMAP_SOC_SDP3430
config SND_OMAP_SOC_OMAP_ABE_TWL6040
tristate "SoC Audio support for OMAP boards using ABE and twl6040 codec"
- depends on TWL4030_CORE && SND_OMAP_SOC && (ARCH_OMAP4 || ARCH_OMAP5)
+ depends on SND_OMAP_SOC && (ARCH_OMAP4 || ARCH_OMAP5)
select SND_OMAP_SOC_DMIC
select SND_OMAP_SOC_MCPDM
select SND_SOC_TWL6040
diff --git a/sound/soc/omap/omap-abe-core.c b/sound/soc/omap/omap-abe-core.c
index 8dfe9b4916b..469624975d9 100644
--- a/sound/soc/omap/omap-abe-core.c
+++ b/sound/soc/omap/omap-abe-core.c
@@ -372,14 +372,21 @@ static int __devinit abe_engine_probe(struct platform_device *pdev)
mutex_init(&abe->opp.req_mutex);
INIT_LIST_HEAD(&abe->opp.req);
+ pr_err("abe_engine_probe: register platform...\n");
+
ret = snd_soc_register_platform(abe->dev, &omap_aess_platform);
if (ret < 0)
goto err;
+
+ pr_err("abe_engine_probe: register dais...\n");
+
ret = snd_soc_register_dais(abe->dev, omap_abe_dai,
ARRAY_SIZE(omap_abe_dai));
if (ret < 0)
goto dai_err;
+ pr_err("abe_engine_probe: happy...\n");
+
return ret;
dai_err:
@@ -388,6 +395,8 @@ err:
for (--i; i >= 0; i--)
iounmap(abe->io_base[i]);
+ pr_err("abe_engine_probe: FAILEDrm...\n");
+
return ret;
}
diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c
index f3dbc0eb285..bacc4efa147 100644
--- a/sound/soc/omap/omap-abe-twl6040.c
+++ b/sound/soc/omap/omap-abe-twl6040.c
@@ -1252,16 +1252,20 @@ static __devinit int omap_abe_probe(struct platform_device *pdev)
if (pdata->has_abe) {
if (pdata->has_dmic) {
+ pr_err(" omap_abe_dai\n");
card->dai_link = omap_abe_dai;
card->num_links = ARRAY_SIZE(omap_abe_dai);
} else {
+ pr_err(" omap_abe_no_dmic_dai\n");
card->dai_link = omap_abe_no_dmic_dai;
card->num_links = ARRAY_SIZE(omap_abe_no_dmic_dai);
}
} else if (pdata->has_dmic) {
+ pr_err(" twl6040_dmic_dai\n");
card->dai_link = twl6040_dmic_dai;
card->num_links = ARRAY_SIZE(twl6040_dmic_dai);
} else {
+ pr_err(" twl6040_only_dai\n");
card->dai_link = twl6040_only_dai;
card->num_links = ARRAY_SIZE(twl6040_only_dai);
}
@@ -1289,8 +1293,9 @@ static __devinit int omap_abe_probe(struct platform_device *pdev)
omap_abe_tps6130x_configure(card_data);
}
-
+pr_err("snd_soc_register_card start\n");
ret = snd_soc_register_card(card);
+pr_err("snd_soc_register_card end\n");
if (ret) {
dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret);
goto err_card;
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 1287b870f22..5583a5e793d 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -61,6 +61,8 @@ struct omap_mcbsp_data {
int wlen;
};
+#define NUM_LINKS 5
+
static struct omap_mcbsp_data mcbsp_data[NUM_LINKS];
/*
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index b0262694c3b..720f4facf31 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -22,6 +22,8 @@
* o Support TDM on PCM and I2S
*/
+#define DEBUG
+
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 8ec87cc5701..3e883bb87fe 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -29,6 +29,8 @@
* o Support for reduced codec bias currents.
*/
+#define DEBUG
+
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 62e05a68362..26c4eae5436 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -16,6 +16,8 @@
*
*/
+#define DEBUG
+
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>