Skip to contentSkip to conversation

wss_lib: fix suspend/resume

PATCH In review Ondrej Zary 2 participants 2 messages Jul 12, 2012 – Jul 16, 2012 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wss_lib: fix suspend/resume

By setting SNDRV_PCM_INFO_RESUME, wss_lib claims that it can restore the card state fully on resume. But in fact, it can't as DMA is not restored so any playback/capture running during suspend will fail to continue after resume.

Remove SNDRV_PCM_INFO_RESUME flag from pcm info field to fix the problem.

sound/isa/wss/wss_lib.c +0 -1
@@ -1456,7 +1456,6 @@ static struct snd_pcm_hardware snd_wss_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID |
-				 SNDRV_PCM_INFO_RESUME |
 				 SNDRV_PCM_INFO_SYNC_START),
 	.formats =		(SNDRV_PCM_FMTBIT_MU_LAW | SNDRV_PCM_FMTBIT_A_LAW | SNDRV_PCM_FMTBIT_IMA_ADPCM |
 				 SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE),
Signature · 1 line
Ondrej Zary
#1 lore raw

At Thu, 12 Jul 2012 23:30:31 +0200,

Quoted 8 lines · Ondrej Zary

By setting SNDRV_PCM_INFO_RESUME, wss_lib claims that it can restore the card state fully on resume. But in fact, it can't as DMA is not restored so any playback/capture running during suspend will fail to continue after resume.

Remove SNDRV_PCM_INFO_RESUME flag from pcm info field to fix the problem.

Applied now. Thanks.

Takashi

Quoted 19 lines
sound/isa/wss/wss_lib.c +0 -1
@@ -1456,7 +1456,6 @@ static struct snd_pcm_hardware snd_wss_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID |
-				 SNDRV_PCM_INFO_RESUME |
 				 SNDRV_PCM_INFO_SYNC_START),
 	.formats =		(SNDRV_PCM_FMTBIT_MU_LAW | SNDRV_PCM_FMTBIT_A_LAW | SNDRV_PCM_FMTBIT_IMA_ADPCM |
 				 SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE),
Signature · 6 lines
-- 
Ondrej Zary
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel