public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wss_lib: Fix resume on Yamaha OPL3-SAx
@ 2012-07-16  6:30 Ondrej Zary
  2012-07-16  9:24 ` [alsa-devel] " Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Ondrej Zary @ 2012-07-16  6:30 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: alsa-devel, Kernel development list

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 <linux@rainbow-software.org>

--- 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);

-- 
Ondrej Zary

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [alsa-devel] [PATCH] wss_lib: Fix resume on Yamaha OPL3-SAx
  2012-07-16  6:30 [PATCH] wss_lib: Fix resume on Yamaha OPL3-SAx Ondrej Zary
@ 2012-07-16  9:24 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2012-07-16  9:24 UTC (permalink / raw)
  To: Ondrej Zary; +Cc: Jaroslav Kysela, alsa-devel, Kernel development list

At Mon, 16 Jul 2012 08:30:18 +0200,
Ondrej Zary wrote:
> 
> 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 <linux@rainbow-software.org>

Applied.  Thanks.


Takashi


> --- 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);
> 
> -- 
> Ondrej Zary
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-16  9:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-16  6:30 [PATCH] wss_lib: Fix resume on Yamaha OPL3-SAx Ondrej Zary
2012-07-16  9:24 ` [alsa-devel] " Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox