summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorkumar km <kkm00000@bnru01.(none)>2011-11-04 12:05:19 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:04:59 +0200
commit6f7f16e39fa3eae75bed7c5ccaac38d07eedd53a (patch)
treedfbe04ec0b44b01bc3acfa53ca16bd195e1018ba /sound
parent31f8e7bdf85a77e46dc64fafcc6aaf58ecd68883 (diff)
Ux500 ASOC:To enable codec as master
This patch enables AB5500 as master and MSP as slave to resolve AV sync issue. ST-Ericsson Linux next: Not tested, 361991 ST-Ericsson ID: 361991 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10006 Change-Id: I642e4ce214cf2c732ad38db42f2c83324fa23ccb Signed-off-by: kumar km <kumar.km@stericsson.com> Change-Id: I113bd7ebe4d417f9bd19794eaae203f36308158d Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35933 Reviewed-by: Roger NILSSON1 <roger.xr.nilsson@stericsson.com> Reviewed-by: QATOOLS
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/ux500/ux500_ab5500.c7
-rw-r--r--sound/soc/ux500/ux500_msp_dai.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/sound/soc/ux500/ux500_ab5500.c b/sound/soc/ux500/ux500_ab5500.c
index 551ec05fcb5..021ae1cd75c 100644
--- a/sound/soc/ux500/ux500_ab5500.c
+++ b/sound/soc/ux500/ux500_ab5500.c
@@ -14,6 +14,8 @@
#include <sound/soc.h>
#include "../codecs/ab5500.h"
+#include "ux500_msp_dai.h"
+
int ux500_ab5500_startup(struct snd_pcm_substream *substream)
{
return 0;
@@ -44,14 +46,15 @@ int ux500_ab5500_hw_params(struct snd_pcm_substream *substream,
printk(KERN_DEBUG "%s: DAI-index (Platform): %d\n", __func__, cpu_dai->id);
ret = snd_soc_dai_set_fmt(codec_dai,
- SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS);
+ SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM);
if (ret < 0)
return ret;
ret = snd_soc_dai_set_fmt(cpu_dai,
- SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS);
+ SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM);
if (ret < 0)
return ret;
+ ux500_msp_dai_set_data_delay(cpu_dai, MSP_DELAY_1);
return ret;
}
diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c
index 430b18906da..ad698d979f6 100644
--- a/sound/soc/ux500/ux500_msp_dai.c
+++ b/sound/soc/ux500/ux500_msp_dai.c
@@ -362,6 +362,15 @@ static void ux500_msp_dai_setup_clocking(unsigned int fmt,
msp_config->tx_clock_sel = 0;
msp_config->rx_clock_sel = 0;
msp_config->srg_clock_sel = 0x2 << SCKSEL_SHIFT;
+
+ msp_config->iodelay = 0x20;
+ msp_config->protocol_desc.tx_clock_pol = 1;
+ msp_config->tx_fifo_config = 1 << TFFEN_SHIFT;
+ msp_config->tx_frame_sync_pol = 1 << TFSPOL_SHIFT;
+ msp_config->protocol_desc.rx_clock_pol = 1;
+ msp_config->rx_fifo_config = 1 << RFFEN_SHIFT;
+ msp_config->rx_frame_sync_pol = 1 << RFSPOL_SHIFT;
+
} else {
pr_debug("%s: Codec is SLAVE.\n",
__func__);