summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorWilliam Lai <b04597@freescale.com>2009-06-30 16:30:13 +0800
committerJustin Waters <justin.waters@timesys.com>2009-10-13 11:04:22 -0400
commit17984758820b3e6cc4ae22b3e695093eef8237a0 (patch)
treed25f152e88df2ff90bf98ccccebd9d83897643d4 /sound
parent4788ca1d40c85cd0e11efd40990c76b7781110aa (diff)
ENGR00113676 ESAI: Cann't support playing Mono file
1. The original ESAI driver treats the mono data as stereo, and it seems playing fater than normal speed, and the sound is not correct either. 2. Correctly set the Slot Mask Register to disable the undesired slot, and get the mono output. Signed-off-by: William Lai <b04597@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/imx/imx-3stack-wm8580.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/imx/imx-3stack-wm8580.c b/sound/soc/imx/imx-3stack-wm8580.c
index 5c09fa27a964..29f61a884fc8 100644
--- a/sound/soc/imx/imx-3stack-wm8580.c
+++ b/sound/soc/imx/imx-3stack-wm8580.c
@@ -127,6 +127,7 @@ static int imx_3stack_surround_hw_params(struct snd_pcm_substream *substream,
unsigned int rate = params_rate(params);
u32 dai_format;
unsigned int pll_out = 0, lrclk_ratio = 0;
+ unsigned int channel = params_channels(params);
if (clk_state.lr_clk_active > 1)
return 0;
@@ -134,7 +135,6 @@ static int imx_3stack_surround_hw_params(struct snd_pcm_substream *substream,
#if defined(CONFIG_MXC_ASRC) || defined(CONFIG_MXC_ASRC_MODULE)
if (asrc_esai_data.output_sample_rate != 0) {
unsigned int asrc_input_rate = rate;
- unsigned int channel = params_channels(params);
struct mxc_runtime_data *pcm_data =
substream->runtime->private_data;
struct asrc_config config;
@@ -235,7 +235,7 @@ static int imx_3stack_surround_hw_params(struct snd_pcm_substream *substream,
snd_soc_dai_set_fmt(cpu_dai, dai_format);
/* set i.MX active slot mask */
- snd_soc_dai_set_tdm_slot(cpu_dai, 0xffffffff, 32);
+ snd_soc_dai_set_tdm_slot(cpu_dai, channel == 1 ? 0x1 : 0x3, 2);
/* set the ESAI system clock as input (unused) */
snd_soc_dai_set_sysclk(cpu_dai, 0, 0, SND_SOC_CLOCK_IN);