From: Ondrej Zary Date: Mon, 16 Jul 2012 06:30:18 +0000 (+0200) Subject: ALSA: wss_lib: Fix resume on Yamaha OPL3-SAx X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b4e2a16f992288f1c5cddda1948c53ba3dde9cb3;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 --- diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c index 00ca9fc4de0..360b08b03e1 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);