summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorroger nilsson <roger.xr.nilsson@stericsson.com>2011-12-05 13:08:59 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:05:02 +0200
commite840431742d3fb90b3e396204b1a03e76920e879 (patch)
treef0d4a6cfef95119efa07788c494bd2db720506d6 /sound
parente70300f59baa832307a36807b26da8e6b69da151 (diff)
misc: Remove obsolete header file
The msp_i2s header file was a duplicate to: arch/arm/mach-ux500/include/mach/msp.h The asoc drivers now use the correct header file. ST-Ericsson ID: 361991 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: NA Change-Id: I8bd4e67ba149b12f9008012d98cb6d0c8481c5a4 Signed-off-by: roger nilsson <roger.xr.nilsson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/41032 Reviewed-by: QABUILD Reviewed-by: Ola LILJA2 <ola.o.lilja@stericsson.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/ab8500_audio.c2
-rw-r--r--sound/soc/codecs/av8100_audio.c2
-rw-r--r--sound/soc/codecs/cg29xx.c2
-rw-r--r--sound/soc/ux500/ux500_ab5500.c2
-rw-r--r--sound/soc/ux500/ux500_ab8500.c11
-rw-r--r--sound/soc/ux500/ux500_av8100.c6
-rw-r--r--sound/soc/ux500/ux500_cg29xx.c10
-rw-r--r--sound/soc/ux500/ux500_msp_dai.c30
8 files changed, 28 insertions, 37 deletions
diff --git a/sound/soc/codecs/ab8500_audio.c b/sound/soc/codecs/ab8500_audio.c
index 3bc13ef1f4e..078e068b728 100644
--- a/sound/soc/codecs/ab8500_audio.c
+++ b/sound/soc/codecs/ab8500_audio.c
@@ -2589,7 +2589,7 @@ static int ab8500_codec_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
break;
case SND_SOC_DAIFMT_DSP_A: /* L data MSB after FRM LRC */
pr_debug("%s: IF0 Protocol: DSP A (TDM)\n", __func__);
- set_mask |= BMASK(REG_DIGIFCONF2_IF0FORMAT1);
+ set_mask |= BMASK(REG_DIGIFCONF2_IF0FORMAT0);
break;
case SND_SOC_DAIFMT_DSP_B: /* L data MSB during FRM LRC */
pr_debug("%s: IF0 Protocol: DSP B (TDM)\n", __func__);
diff --git a/sound/soc/codecs/av8100_audio.c b/sound/soc/codecs/av8100_audio.c
index 2b4b526cfe1..bca5b7a4329 100644
--- a/sound/soc/codecs/av8100_audio.c
+++ b/sound/soc/codecs/av8100_audio.c
@@ -342,7 +342,7 @@ static int av8100_codec_set_dai_fmt(struct snd_soc_dai *codec_dai,
/* Set the audio input format of AV8100 */
config.audio_input_format.audio_input_if_format =
- ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_DSP_B) ?
+ ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_DSP_A) ?
AV8100_AUDIO_TDM_MODE : AV8100_AUDIO_I2SDELAYED_MODE;
config.audio_input_format.audio_if_mode =
((fmt & SND_SOC_DAIFMT_MASTER_MASK) == SND_SOC_DAIFMT_CBM_CFM) ?
diff --git a/sound/soc/codecs/cg29xx.c b/sound/soc/codecs/cg29xx.c
index b5461c3e214..ec79cdae91b 100644
--- a/sound/soc/codecs/cg29xx.c
+++ b/sound/soc/codecs/cg29xx.c
@@ -215,7 +215,7 @@ static int cg29xx_set_dai_fmt(struct snd_soc_dai *codec_dai,
dai_data->config.conf.i2s.mode = DAI_MODE_SLAVE;
break;
- case SND_SOC_DAIFMT_DSP_A:
+ case SND_SOC_DAIFMT_DSP_B:
if (dai_data->config.port != PORT_1_I2S_PCM ||
msel == SND_SOC_DAIFMT_CBM_CFM) {
pr_err("cg29xx_dai: unsupported DAI format 0x%x port=%d,msel=%d\n",
diff --git a/sound/soc/ux500/ux500_ab5500.c b/sound/soc/ux500/ux500_ab5500.c
index 5b4e5576cf0..6dbf72e9153 100644
--- a/sound/soc/ux500/ux500_ab5500.c
+++ b/sound/soc/ux500/ux500_ab5500.c
@@ -53,7 +53,7 @@ int ux500_ab5500_hw_params(struct snd_pcm_substream *substream,
ret = snd_soc_dai_set_fmt(cpu_dai,
SND_SOC_DAIFMT_I2S |
SND_SOC_DAIFMT_CBM_CFM |
- SND_SOC_DAIFMT_IB_IF);
+ SND_SOC_DAIFMT_NB_NF);
if (ret < 0)
return ret;
ux500_msp_dai_set_data_delay(cpu_dai, MSP_DELAY_1);
diff --git a/sound/soc/ux500/ux500_ab8500.c b/sound/soc/ux500/ux500_ab8500.c
index 2eef499d22e..5860e05a1dd 100644
--- a/sound/soc/ux500/ux500_ab8500.c
+++ b/sound/soc/ux500/ux500_ab8500.c
@@ -525,17 +525,18 @@ int ux500_ab8500_hw_params(struct snd_pcm_substream *substream,
pr_debug("%s: Driver-mode: %s.\n",
__func__,
(driver_mode == DRIVERMODE_NORMAL) ? "NORMAL" : "CODEC_ONLY");
+
+ ab8500_audio_set_bit_delay(codec_dai, 1);
+
if (driver_mode == DRIVERMODE_NORMAL) {
- ab8500_audio_set_bit_delay(codec_dai, 0);
ab8500_audio_set_word_length(codec_dai, 16);
- fmt = SND_SOC_DAIFMT_DSP_B |
+ fmt = SND_SOC_DAIFMT_DSP_A |
SND_SOC_DAIFMT_CBM_CFM |
SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CONT;
} else {
- ab8500_audio_set_bit_delay(codec_dai, 1);
ab8500_audio_set_word_length(codec_dai, 20);
- fmt = SND_SOC_DAIFMT_DSP_B |
+ fmt = SND_SOC_DAIFMT_DSP_A |
SND_SOC_DAIFMT_CBM_CFM |
SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_GATED;
@@ -557,6 +558,8 @@ int ux500_ab8500_hw_params(struct snd_pcm_substream *substream,
return ret;
}
+ ux500_msp_dai_set_data_delay(cpu_dai, MSP_DELAY_1);
+
/* Setup TDM-slots */
streamIsPlayback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
diff --git a/sound/soc/ux500/ux500_av8100.c b/sound/soc/ux500/ux500_av8100.c
index a1be8d15c72..becf81a07e0 100644
--- a/sound/soc/ux500/ux500_av8100.c
+++ b/sound/soc/ux500/ux500_av8100.c
@@ -112,7 +112,7 @@ static int ux500_av8100_hw_params(struct snd_pcm_substream *substream,
}
/* Set format for codec-DAI */
- fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_CBM_CFM;
+ fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_CBM_CFM;
pr_debug("%s: Setting format for codec-DAI (fmt = %d).\n",
__func__,
fmt);
@@ -139,7 +139,7 @@ static int ux500_av8100_hw_params(struct snd_pcm_substream *substream,
}
/* Set format for CPU-DAI */
- fmt = SND_SOC_DAIFMT_DSP_B |
+ fmt = SND_SOC_DAIFMT_DSP_A |
SND_SOC_DAIFMT_CBM_CFM |
SND_SOC_DAIFMT_NB_IF;
pr_debug("%s: Setting DAI-format for Ux500-platform (fmt = %d).\n",
@@ -154,8 +154,6 @@ static int ux500_av8100_hw_params(struct snd_pcm_substream *substream,
return ret;
}
- ux500_msp_dai_set_data_delay(cpu_dai, MSP_DELAY_1);
-
return ret;
}
diff --git a/sound/soc/ux500/ux500_cg29xx.c b/sound/soc/ux500/ux500_cg29xx.c
index 8301a80f54d..bb95bc2c306 100644
--- a/sound/soc/ux500/ux500_cg29xx.c
+++ b/sound/soc/ux500/ux500_cg29xx.c
@@ -19,7 +19,7 @@
#define UX500_CG29XX_MSP_CLOCK_FREQ 18900000
#define UX500_CG29XX_DAI_SLOT_WIDTH 16
#define UX500_CG29XX_DAI_SLOTS 2
-#define UX500_CG29XX_DAI_ACTIVE_SLOTS 0x01
+#define UX500_CG29XX_DAI_ACTIVE_SLOTS 0x02
int ux500_cg29xx_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
@@ -40,7 +40,7 @@ int ux500_cg29xx_hw_params(struct snd_pcm_substream *substream,
pr_debug("%s: DAI-index (Platform): %d\n", __func__, cpu_dai->id);
err = snd_soc_dai_set_fmt(codec_dai,
- SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_CBS_CFS);
+ SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_CBS_CFS);
if (err) {
pr_err("%s: snd_soc_dai_set_fmt(codec) failed with %d.\n",
@@ -63,7 +63,7 @@ int ux500_cg29xx_hw_params(struct snd_pcm_substream *substream,
}
err = snd_soc_dai_set_fmt(cpu_dai,
- SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_CBS_CFS |
+ SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_CBS_CFS |
SND_SOC_DAIFMT_NB_NF);
if (err) {
@@ -148,7 +148,7 @@ int u5500_cg29xx_hw_params(struct snd_pcm_substream *substream,
}
} else {
err = snd_soc_dai_set_fmt(codec_dai,
- SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_CBS_CFS);
+ SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_CBS_CFS);
if (err) {
pr_err("%s: snd_soc_dai_set_fmt(codec) failed with %d.\n",
__func__,
@@ -170,7 +170,7 @@ int u5500_cg29xx_hw_params(struct snd_pcm_substream *substream,
}
err = snd_soc_dai_set_fmt(cpu_dai,
- SND_SOC_DAIFMT_DSP_A |
+ SND_SOC_DAIFMT_DSP_B |
SND_SOC_DAIFMT_CBS_CFS |
SND_SOC_DAIFMT_NB_NF);
diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c
index 1eb8cf88323..6cdc96734ed 100644
--- a/sound/soc/ux500/ux500_msp_dai.c
+++ b/sound/soc/ux500/ux500_msp_dai.c
@@ -339,32 +339,18 @@ static void ux500_msp_dai_setup_clocking(unsigned int fmt,
switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
default:
case SND_SOC_DAIFMT_NB_NF:
- msp_config->tx_frame_sync_pol =
- MSP_FRAME_SYNC_POL(MSP_FRAME_SYNC_POL_ACTIVE_HIGH);
- msp_config->rx_frame_sync_pol =
- MSP_FRAME_SYNC_POL_ACTIVE_HIGH << RFSPOL_SHIFT;
break;
case SND_SOC_DAIFMT_NB_IF:
- msp_config->tx_frame_sync_pol =
- MSP_FRAME_SYNC_POL(MSP_FRAME_SYNC_POL_ACTIVE_LOW);
- msp_config->rx_frame_sync_pol =
- MSP_FRAME_SYNC_POL_ACTIVE_LOW << RFSPOL_SHIFT;
- break;
-
- case SND_SOC_DAIFMT_IB_IF:
- msp_config->iodelay = 0x20;
- msp_config->protocol_desc.tx_clock_pol = 1;
- msp_config->tx_frame_sync_pol = 1 << TFSPOL_SHIFT;
- msp_config->protocol_desc.rx_clock_pol = 1;
- msp_config->rx_frame_sync_pol = 1 << RFSPOL_SHIFT;
+ msp_config->tx_frame_sync_pol ^= 1 << TFSPOL_SHIFT;
+ msp_config->rx_frame_sync_pol ^= 1 << RFSPOL_SHIFT;
break;
}
if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) == SND_SOC_DAIFMT_CBM_CFM) {
pr_debug("%s: Codec is MASTER.\n",
__func__);
-
+ msp_config->iodelay = 0x20;
msp_config->rx_frame_sync_sel = 0;
msp_config->tx_frame_sync_sel = 1 << TFSSEL_SHIFT;
msp_config->tx_clock_sel = 0;
@@ -392,17 +378,19 @@ static void ux500_msp_dai_compile_prot_desc_pcm(unsigned int fmt,
prot_desc->tx_phase2_start_mode = MSP_PHASE2_START_MODE_IMEDIATE;
prot_desc->rx_bit_transfer_format = MSP_BTF_MS_BIT_FIRST;
prot_desc->tx_bit_transfer_format = MSP_BTF_MS_BIT_FIRST;
+ prot_desc->tx_frame_sync_pol = MSP_FRAME_SYNC_POL(MSP_FRAME_SYNC_POL_ACTIVE_HIGH);
+ prot_desc->rx_frame_sync_pol = MSP_FRAME_SYNC_POL_ACTIVE_HIGH << RFSPOL_SHIFT;
if ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_DSP_A) {
pr_debug("%s: DSP_A.\n",
__func__);
+ prot_desc->rx_clock_pol = MSP_RISING_EDGE;
prot_desc->tx_clock_pol = MSP_FALLING_EDGE;
- prot_desc->rx_clock_pol = MSP_FALLING_EDGE;
} else {
pr_debug("%s: DSP_B.\n",
__func__);
+ prot_desc->rx_clock_pol = MSP_FALLING_EDGE;
prot_desc->tx_clock_pol = MSP_RISING_EDGE;
- prot_desc->rx_clock_pol = MSP_RISING_EDGE;
}
prot_desc->rx_half_word_swap = MSP_HWS_NO_SWAP;
@@ -424,6 +412,8 @@ static void ux500_msp_dai_compile_prot_desc_i2s(struct msp_protocol_desc *prot_d
MSP_PHASE2_START_MODE_FRAME_SYNC;
prot_desc->rx_bit_transfer_format = MSP_BTF_MS_BIT_FIRST;
prot_desc->tx_bit_transfer_format = MSP_BTF_MS_BIT_FIRST;
+ prot_desc->tx_frame_sync_pol = MSP_FRAME_SYNC_POL(MSP_FRAME_SYNC_POL_ACTIVE_LOW);
+ prot_desc->rx_frame_sync_pol = MSP_FRAME_SYNC_POL_ACTIVE_LOW << RFSPOL_SHIFT;
prot_desc->rx_frame_length_1 = MSP_FRAME_LENGTH_1;
prot_desc->rx_frame_length_2 = MSP_FRAME_LENGTH_1;
@@ -435,7 +425,7 @@ static void ux500_msp_dai_compile_prot_desc_i2s(struct msp_protocol_desc *prot_d
prot_desc->tx_element_length_2 = MSP_ELEM_LENGTH_16;
prot_desc->rx_clock_pol = MSP_RISING_EDGE;
- prot_desc->tx_clock_pol = MSP_RISING_EDGE;
+ prot_desc->tx_clock_pol = MSP_FALLING_EDGE;
prot_desc->tx_half_word_swap = MSP_HWS_NO_SWAP;
prot_desc->rx_half_word_swap = MSP_HWS_NO_SWAP;