summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorHemanth Puranik <hemanth.puranik@stericsson.com>2012-01-13 15:36:24 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:05:05 +0200
commit543296a34d8586fea0535faff7a2f575cdd8f624 (patch)
treecfcd04f83b30a6ee89d64d040a5f9e629af907b3 /sound
parent2b1f7c6f04cf45ba69047a0a87ff8bfc9ebb86ea (diff)
ASoC:Ux500: Random crash in MSP driver
Corrected the condition check which released the TX DMA if RX is opened first on same msp interface. Also corrected the alsa pcm device active and configure device flags, add suspend and resume cases. ST-Ericsson Linux next: NA ST-Ericsson ID: 407933 ST-Ericsson FOSS-OUT ID: Trivial Signed-off-by: Hemanth Puranik <hemanth.puranik@stericsson.com> Change-Id: I78b73585333cd9ad61fda1f6a2d5d3be9d15210c Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/45411 Tested-by: Hemanth Ramachandra PURANIK <hemanth.puranik@stericsson.com> Reviewed-by: Ola LILJA2 <ola.o.lilja@stericsson.com> Reviewed-by: QATOOLS
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/ux500/ux500_msp_dai.c12
-rw-r--r--sound/soc/ux500/ux500_msp_i2s.c3
-rw-r--r--sound/soc/ux500/ux500_pcm.c4
3 files changed, 10 insertions, 9 deletions
diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c
index 2af5bf14193..4a2ff3419f2 100644
--- a/sound/soc/ux500/ux500_msp_dai.c
+++ b/sound/soc/ux500/ux500_msp_dai.c
@@ -189,11 +189,6 @@ static void ux500_msp_dai_shutdown(struct snd_pcm_substream *substream,
if (drvdata == NULL)
return;
- if (mode_playback)
- drvdata->playback_active = false;
- else
- drvdata->capture_active = false;
-
if (ux500_msp_i2s_close(drvdata->msp_i2s_drvdata,
mode_playback ? DISABLE_TRANSMIT : DISABLE_RECEIVE)) {
pr_err("%s: Error: MSP %d (%s): Unable to close i2s.\n",
@@ -202,10 +197,13 @@ static void ux500_msp_dai_shutdown(struct snd_pcm_substream *substream,
stream_str(substream));
}
- if (mode_playback)
+ if (mode_playback) {
+ drvdata->playback_active = false;
drvdata->configured &= ~PLAYBACK_CONFIGURED;
- else
+ } else {
+ drvdata->capture_active = false;
drvdata->configured &= ~CAPTURE_CONFIGURED;
+ }
}
static void ux500_msp_dai_setup_multichannel(struct ux500_platform_drvdata *private,
diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c
index 91a9a03f93d..f8138bd1aa3 100644
--- a/sound/soc/ux500/ux500_msp_i2s.c
+++ b/sound/soc/ux500/ux500_msp_i2s.c
@@ -317,7 +317,8 @@ void ux500_msp_i2s_configure_dma(struct msp *msp, struct msp_config *config)
u16 word_width;
bool rx_active, tx_active;
- if (msp->tx_pipeid != NULL) {
+ if ((msp->tx_pipeid != NULL) &&
+ (config->direction == MSP_TRANSMIT_MODE)) {
dma_release_channel(msp->tx_pipeid);
msp->tx_pipeid = NULL;
}
diff --git a/sound/soc/ux500/ux500_pcm.c b/sound/soc/ux500/ux500_pcm.c
index 29b3f5e0ffb..07e18135451 100644
--- a/sound/soc/ux500/ux500_pcm.c
+++ b/sound/soc/ux500/ux500_pcm.c
@@ -276,11 +276,13 @@ static int ux500_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
return -EINVAL;
}
break;
-
+ case SNDRV_PCM_TRIGGER_RESUME:
+ break;
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
break;
case SNDRV_PCM_TRIGGER_STOP:
+ case SNDRV_PCM_TRIGGER_SUSPEND:
pr_debug("%s: SNDRV_PCM_TRIGGER_STOP\n", __func__);
pr_debug("%s: no_of_underruns = %u\n",
__func__,