diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-04-24 08:09:55 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-04-25 10:54:30 -0400 |
commit | 6e4cac23c5a648d50b107d1b53e9c4e1120c7943 (patch) | |
tree | 39e57cfc0bd1e034d3b3df115e629257a08de4ea | |
parent | c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201 (diff) |
ASoC: intel: Fix PM and non-atomic crash in bytcr drivers
The FE setups of Intel SST bytcr_rt5640 and bytcr_rt5651 drivers carry
the ignore_suspend flag, and this prevents the suspend/resume working
properly while the stream is running, since SST core code has the
check of the running streams and returns -EBUSY. Drop these
superfluous flags for fixing the behavior.
Also, the bytcr_rt5640 driver lacks of nonatomic flag in some FE
definitions, which leads to the kernel Oops at suspend/resume like:
BUG: scheduling while atomic: systemd-sleep/3144/0x00000003
Call Trace:
dump_stack+0x5c/0x7a
__schedule_bug+0x55/0x70
__schedule+0x63c/0x8c0
schedule+0x3d/0x90
schedule_timeout+0x16b/0x320
? del_timer_sync+0x50/0x50
? sst_wait_timeout+0xa9/0x170 [snd_intel_sst_core]
? sst_wait_timeout+0xa9/0x170 [snd_intel_sst_core]
? remove_wait_queue+0x60/0x60
? sst_prepare_and_post_msg+0x275/0x960 [snd_intel_sst_core]
? sst_pause_stream+0x9b/0x110 [snd_intel_sst_core]
....
This patch addresses these appropriately, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: <stable@vger.kernel.org> # v4.1+
-rw-r--r-- | sound/soc/intel/boards/bytcr_rt5640.c | 4 | ||||
-rw-r--r-- | sound/soc/intel/boards/bytcr_rt5651.c | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index 5c7219fb3aa8..9e2a3404a836 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c | |||
@@ -621,7 +621,7 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = { | |||
621 | .codec_dai_name = "snd-soc-dummy-dai", | 621 | .codec_dai_name = "snd-soc-dummy-dai", |
622 | .codec_name = "snd-soc-dummy", | 622 | .codec_name = "snd-soc-dummy", |
623 | .platform_name = "sst-mfld-platform", | 623 | .platform_name = "sst-mfld-platform", |
624 | .ignore_suspend = 1, | 624 | .nonatomic = true, |
625 | .dynamic = 1, | 625 | .dynamic = 1, |
626 | .dpcm_playback = 1, | 626 | .dpcm_playback = 1, |
627 | .dpcm_capture = 1, | 627 | .dpcm_capture = 1, |
@@ -634,7 +634,6 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = { | |||
634 | .codec_dai_name = "snd-soc-dummy-dai", | 634 | .codec_dai_name = "snd-soc-dummy-dai", |
635 | .codec_name = "snd-soc-dummy", | 635 | .codec_name = "snd-soc-dummy", |
636 | .platform_name = "sst-mfld-platform", | 636 | .platform_name = "sst-mfld-platform", |
637 | .ignore_suspend = 1, | ||
638 | .nonatomic = true, | 637 | .nonatomic = true, |
639 | .dynamic = 1, | 638 | .dynamic = 1, |
640 | .dpcm_playback = 1, | 639 | .dpcm_playback = 1, |
@@ -661,6 +660,7 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = { | |||
661 | | SND_SOC_DAIFMT_CBS_CFS, | 660 | | SND_SOC_DAIFMT_CBS_CFS, |
662 | .be_hw_params_fixup = byt_rt5640_codec_fixup, | 661 | .be_hw_params_fixup = byt_rt5640_codec_fixup, |
663 | .ignore_suspend = 1, | 662 | .ignore_suspend = 1, |
663 | .nonatomic = true, | ||
664 | .dpcm_playback = 1, | 664 | .dpcm_playback = 1, |
665 | .dpcm_capture = 1, | 665 | .dpcm_capture = 1, |
666 | .init = byt_rt5640_init, | 666 | .init = byt_rt5640_init, |
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index 3186f015939f..8164bec63bf1 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c | |||
@@ -235,7 +235,6 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = { | |||
235 | .codec_dai_name = "snd-soc-dummy-dai", | 235 | .codec_dai_name = "snd-soc-dummy-dai", |
236 | .codec_name = "snd-soc-dummy", | 236 | .codec_name = "snd-soc-dummy", |
237 | .platform_name = "sst-mfld-platform", | 237 | .platform_name = "sst-mfld-platform", |
238 | .ignore_suspend = 1, | ||
239 | .nonatomic = true, | 238 | .nonatomic = true, |
240 | .dynamic = 1, | 239 | .dynamic = 1, |
241 | .dpcm_playback = 1, | 240 | .dpcm_playback = 1, |
@@ -249,7 +248,6 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = { | |||
249 | .codec_dai_name = "snd-soc-dummy-dai", | 248 | .codec_dai_name = "snd-soc-dummy-dai", |
250 | .codec_name = "snd-soc-dummy", | 249 | .codec_name = "snd-soc-dummy", |
251 | .platform_name = "sst-mfld-platform", | 250 | .platform_name = "sst-mfld-platform", |
252 | .ignore_suspend = 1, | ||
253 | .nonatomic = true, | 251 | .nonatomic = true, |
254 | .dynamic = 1, | 252 | .dynamic = 1, |
255 | .dpcm_playback = 1, | 253 | .dpcm_playback = 1, |