summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAdrian Alonso <aalonso@freescale.com>2012-05-16 17:34:24 -0500
committerJason Liu <r64343@freescale.com>2012-07-20 13:37:39 +0800
commit7c47640e62b8f88808af8c47e50e9d88d090a66d (patch)
tree9df6663815c9f5480f908709d87915b578f5307b /sound
parent9c4bbfaed02c3ea40e349f3c19057d0677845abd (diff)
ENGR00209384-4 mxc_spdif: disable sym_err isr
* Disable symbol error interrupt when rx dpll is unlocked This means that no spdif Rx data had been identified and driver will keep issuing sym_err interrupt request. * Add check to only execute capture_start/stop functions if rx_active is set. Signed-off-by: Adrian Alonso <aalonso@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/mxc_spdif.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sound/soc/codecs/mxc_spdif.c b/sound/soc/codecs/mxc_spdif.c
index 94b1335d7855..73b2b2b9ef10 100644
--- a/sound/soc/codecs/mxc_spdif.c
+++ b/sound/soc/codecs/mxc_spdif.c
@@ -305,7 +305,13 @@ static void spdif_irq_bit_error(unsigned int bit, void *devid)
*/
static void spdif_irq_sym_error(unsigned int bit, void *devid)
{
+ struct mxc_spdif_priv *spdif_priv = (struct mxc_spdif_priv *)devid;
+
pr_debug("SPDIF interrupt symbol error\n");
+ if (!atomic_read(&spdif_priv->dpll_locked)) {
+ /* dpll unlocked seems no audio stream */
+ spdif_intr_enable(INT_SYM_ERR, 0);
+ }
}
/*
@@ -693,9 +699,6 @@ static int mxc_spdif_capture_startup(struct snd_pcm_substream *substream,
if (err < 0)
goto failed;
- /* enable spdif dpll lock interrupt */
- spdif_intr_enable(INT_DPLL_LOCKED, 1);
-
return 0;
failed:
@@ -713,7 +716,7 @@ static int mxc_spdif_capture_start(struct snd_pcm_substream *substream,
struct mxc_spdif_platform_data *plat_data = spdif_priv->plat_data;
unsigned long regval;
- if (!plat_data->spdif_rx)
+ if (!plat_data->spdif_rx || !spdif_priv->rx_active)
return -EINVAL;
regval = __raw_readl(spdif_base_addr + SPDIF_REG_SCR);
@@ -732,7 +735,7 @@ static int mxc_spdif_capture_start(struct snd_pcm_substream *substream,
spdif_intr_enable(INT_SYM_ERR | INT_BIT_ERR | INT_URX_FUL |
INT_URX_OV | INT_QRX_FUL | INT_QRX_OV |
INT_UQ_SYNC | INT_UQ_ERR | INT_RX_RESYNC |
- INT_LOSS_LOCK, 1);
+ INT_LOSS_LOCK | INT_DPLL_LOCKED, 1);
/* setup rx clock source */
spdif_set_rx_clksrc(plat_data->spdif_rx_clk, SPDIF_DEFAULT_GAINSEL, 1);
@@ -758,7 +761,7 @@ static int mxc_spdif_capture_stop(struct snd_pcm_substream *substream,
struct mxc_spdif_platform_data *plat_data = spdif_priv->plat_data;
unsigned long regval;
- if (!plat_data->spdif_rx)
+ if (!plat_data->spdif_rx || !spdif_priv->rx_active)
return -EINVAL;
pr_debug("SIS: 0x%08x\n", __raw_readl(spdif_base_addr + SPDIF_REG_SIS));