From ca3273fb594ae4e953042c956eb40141ba46ad2c Mon Sep 17 00:00:00 2001 From: Ondrej Zary Date: Thu, 12 Jul 2012 23:30:31 +0200 Subject: ALSA: 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. Signed-off-by: Ondrej Zary Signed-off-by: Takashi Iwai --- sound/isa/wss/wss_lib.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sound/isa/wss/wss_lib.c') diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c index 49c8a0c2442c..00ca9fc4de0a 100644 --- a/sound/isa/wss/wss_lib.c +++ b/sound/isa/wss/wss_lib.c @@ -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), -- cgit v1.2.3 From b4e2a16f992288f1c5cddda1948c53ba3dde9cb3 Mon Sep 17 00:00:00 2001 From: Ondrej Zary Date: Mon, 16 Jul 2012 08:30:18 +0200 Subject: ALSA: wss_lib: Fix resume on Yamaha OPL3-SAx Yamaha OPL3-SAx chips don't resume properly when playback is running - garbage is played after resume. Restoring the CS4231_PLAYBK_FORMAT register last fixes the problem. Signed-off-by: Ondrej Zary Signed-off-by: Takashi Iwai --- sound/isa/wss/wss_lib.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sound/isa/wss/wss_lib.c') diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c index 00ca9fc4de0a..360b08b03e1d 100644 --- a/sound/isa/wss/wss_lib.c +++ b/sound/isa/wss/wss_lib.c @@ -1656,6 +1656,10 @@ static void snd_wss_resume(struct snd_wss *chip) break; } } + /* Yamaha needs this to resume properly */ + if (chip->hardware == WSS_HW_OPL3SA2) + snd_wss_out(chip, CS4231_PLAYBK_FORMAT, + chip->image[CS4231_PLAYBK_FORMAT]); spin_unlock_irqrestore(&chip->reg_lock, flags); #if 1 snd_wss_mce_down(chip); -- cgit v1.2.3