Skip to contentSkip to conversation

wss_lib: Fix resume on Yamaha OPL3-SAx

PATCH Applied Ondrej Zary 2 participants 2 messages Jul 16, 2012 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

sound/isa/wss/wss_lib.c +4 -0
@@ -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);
Signature · 1 line
Ondrej Zary
Applied
#1 lore raw

At Mon, 16 Jul 2012 08:30:18 +0200,

Quoted 6 lines · Ondrej Zary

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.

Applied. Thanks.

Takashi

Quoted 21 lines
sound/isa/wss/wss_lib.c +4 -0
@@ -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);
Signature · 6 lines
-- 
Ondrej Zary
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel