summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-08-19 23:18:57 -0300
committerNitin Garg <nitin.garg@freescale.com>2015-09-17 09:24:18 -0500
commit742c86ed8665414da7818b62de827ff2a87adede (patch)
tree036f8d5a12efe1570d70a50ada22fb1da4390a4e /sound
parent932363be7655b19e2b2f07799e186708ac43efc9 (diff)
MLK-11392-2: ASoC: fsl_ssi: revert patch to fix kernel dump issue
Revert "MLK-10359: ASoC: fsl_ssi: move pm runtime enable/disable to trigger function" This reverts commit 6fe69c2ff824ddb2c260b31615641d7d942bf2d6. commit 6fe69c2ff82 "MLK-10359: ASoC: fsl_ssi: move pm runtime enable/disable to trigger function " calls the pm_runtime_ functions from an unsafe context as shown when building a kernel with CONFIG_DEBUG_ATOMIC_SLEEP=y: root@freescale /$ aplay /home/clarinet.wav BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:954 in_atomic(): 1, irqs_disabled(): 128, pid: 781, name: aplay CPU: 0 PID: 781 Comm: aplay Not tainted 3.10.53-02670-g6fe69c2 #2 [<80013f98>] (unwind_backtrace+0x0/0xf8) from [<80011a2c>] (show_stack+0x10/0x14) [<80011a2c>] (show_stack+0x10/0x14) from [<80313634>] (__pm_runtime_resume+0x84/0x8c) [<80313634>] (__pm_runtime_resume+0x84/0x8c) from [<804cc4b4>] (fsl_ssi_trigger+0x54/0x200) So revert such commit. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 16d24d435c2ce1ae6f8139af7fdcf627d9b32b72)
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_ssi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 39aff7ec6f63..ee01296d07ff 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -623,6 +623,8 @@ static int fsl_ssi_startup(struct snd_pcm_substream *substream,
if (ret)
return ret;
+ pm_runtime_get_sync(dai->dev);
+
/* When using dual fifo mode, it is safer to ensure an even period
* size. If appearing to an odd number while DMA always starts its
* task from fifo0, fifo1 would be neglected at the end of each
@@ -646,6 +648,8 @@ static void fsl_ssi_shutdown(struct snd_pcm_substream *substream,
struct fsl_ssi_private *ssi_private =
snd_soc_dai_get_drvdata(rtd->cpu_dai);
+ pm_runtime_put_sync(dai->dev);
+
clk_disable_unprepare(ssi_private->clk);
}
@@ -1089,7 +1093,6 @@ static int fsl_ssi_trigger(struct snd_pcm_substream *substream, int cmd,
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- pm_runtime_get_sync(dai->dev);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
fsl_ssi_tx_config(ssi_private, true);
else
@@ -1103,7 +1106,6 @@ static int fsl_ssi_trigger(struct snd_pcm_substream *substream, int cmd,
fsl_ssi_tx_config(ssi_private, false);
else
fsl_ssi_rx_config(ssi_private, false);
- pm_runtime_put_sync(dai->dev);
break;
default: