summaryrefslogtreecommitdiff
path: root/sound/soc/imx
diff options
context:
space:
mode:
authorLionel Xu <Lionel.Xu@freescale.com>2012-03-02 13:18:17 +0800
committerLionel Xu <Lionel.Xu@freescale.com>2012-03-06 10:53:07 +0800
commit8b4eb3911f63aa32b74ef8dd79d2ca2a721db983 (patch)
tree6a1d5bb9c335905e4616208921bd24c3d9422227 /sound/soc/imx
parent5f5a08e4d616beb2aac46ccbb00ee98683c0d4c4 (diff)
ENGR00170526-4 ESAI: To resolve the playback no sound issue occasionally happen
There is no sound output any longer sometimes after several times of playback, this platch is trying to resolve this issue by: 1)move the global power control bit setting from function hw_params/shutdown to DAPM, thererfor the PWN bit will not be set/unset each time playback; 2) Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
Diffstat (limited to 'sound/soc/imx')
-rw-r--r--sound/soc/imx/imx-esai.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/soc/imx/imx-esai.c b/sound/soc/imx/imx-esai.c
index d3cf553bee2e..f6361716c20c 100644
--- a/sound/soc/imx/imx-esai.c
+++ b/sound/soc/imx/imx-esai.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2008-2012 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -280,16 +280,12 @@ static int imx_esai_startup(struct snd_pcm_substream *substream,
if (!(local_esai->imx_esai_txrx_state & IMX_DAI_ESAI_TXRX)) {
clk_enable(esai->clk);
- writel(ESAI_ECR_ERST, esai->base + ESAI_ECR);
- writel(ESAI_ECR_ESAIEN, esai->base + ESAI_ECR);
-
writel(ESAI_GPIO_ESAI, esai->base + ESAI_PRRC);
writel(ESAI_GPIO_ESAI, esai->base + ESAI_PCRC);
}
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
local_esai->imx_esai_txrx_state |= IMX_DAI_ESAI_TX;
- writel(ESAI_TCR_TPR, esai->base + ESAI_TCR);
} else {
local_esai->imx_esai_txrx_state |= IMX_DAI_ESAI_RX;
writel(ESAI_RCR_RPR, esai->base + ESAI_RCR);
@@ -458,7 +454,6 @@ static int imx_esai_trigger(struct snd_pcm_substream *substream, int cmd,
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
tfcr |= ESAI_TFCR_TFEN;
writel(tfcr, esai->base + ESAI_TFCR);
- reg &= ~ESAI_TCR_TPR;
reg |= ESAI_TCR_TE(substream->runtime->channels);
writel(reg, esai->base + ESAI_TCR);
} else {
@@ -478,7 +473,6 @@ static int imx_esai_trigger(struct snd_pcm_substream *substream, int cmd,
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
reg &= ~ESAI_TCR_TE(substream->runtime->channels);
writel(reg, esai->base + ESAI_TCR);
- reg |= ESAI_TCR_TPR;
writel(reg, esai->base + ESAI_TCR);
tfcr |= ESAI_TFCR_TFR;
tfcr &= ~ESAI_TFCR_TFEN;
@@ -661,6 +655,9 @@ static int imx_esai_probe(struct platform_device *pdev)
goto failed_pdev_add;
}
+ writel(ESAI_ECR_ERST, esai->base + ESAI_ECR);
+ writel(ESAI_ECR_ESAIEN, esai->base + ESAI_ECR);
+
return 0;
failed_pdev_add: