From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [Qemu-devel] dsound: warning: Voice is already playing
Date: Wed, 18 Feb 2009 01:27:20 +0300 (MSK) [thread overview]
Message-ID: <Pine.LNX.4.64.0902180119550.2613@linmac.oyster.ru> (raw)
In-Reply-To: <499B1601.9090909@bttr-software.de>
On Tue, 17 Feb 2009, Robert Riebisch wrote:
> malc wrote:
>
> >> > What is the exact sequence of events that leads to it?
> >>
> >> What do you mean by "sequence"?
> >
> > Step by step actions after which the following message is seen, including
> > all command line parameters.
>
[..snip..]
>
> I narrowed it down to GUS emulation, because this warning also appears,
> when I just use "-soundhw gus" (not "all").
>
It's actually fallout from r6402:
"Rework vm_state_change notifiers (Jan Kiszka)"
GUS, unlike all other cards emulated by QEMU, is mixing sound at all times
and as such it calls AUD_set_active_out during intialization stage which
happens before vm_start is called and when it does audio vm change state
notification callback is invoked which tries to enable underlying audio
subsystem's voice, but it is already enabled and in case of dsound will,
rightfully, complain.
Jan, can you please check that this doesn't break Musicpal or the other
ARM stuff you have written and i have no means to test:
diff --git a/audio/audio.c b/audio/audio.c
index b0a5f3b..a2636cb 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1127,6 +1127,7 @@ void AUD_set_active_out (SWVoiceOut *sw, int on)
hw = sw->hw;
if (sw->active != on) {
+ AudioState *s = &glob_audio_state;
SWVoiceOut *temp_sw;
SWVoiceCap *sc;
@@ -1134,7 +1135,9 @@ void AUD_set_active_out (SWVoiceOut *sw, int on)
hw->pending_disable = 0;
if (!hw->enabled) {
hw->enabled = 1;
- hw->pcm_ops->ctl_out (hw, VOICE_ENABLE);
+ if (s->vm_running) {
+ hw->pcm_ops->ctl_out (hw, VOICE_ENABLE);
+ }
}
}
else {
@@ -1170,12 +1173,15 @@ void AUD_set_active_in (SWVoiceIn *sw, int on)
hw = sw->hw;
if (sw->active != on) {
+ AudioState *s = &glob_audio_state;
SWVoiceIn *temp_sw;
if (on) {
if (!hw->enabled) {
hw->enabled = 1;
- hw->pcm_ops->ctl_in (hw, VOICE_ENABLE);
+ if (s->vm_running) {
+ hw->pcm_ops->ctl_in (hw, VOICE_ENABLE);
+ }
}
sw->total_hw_samples_acquired = hw->total_samples_captured;
}
@@ -1623,6 +1629,7 @@ static void audio_vm_change_state_handler (void *opaque, int running,
HWVoiceIn *hwi = NULL;
int op = running ? VOICE_ENABLE : VOICE_DISABLE;
+ s->vm_running = running;
while ((hwo = audio_pcm_hw_find_any_enabled_out (s, hwo))) {
hwo->pcm_ops->ctl_out (hwo, op);
}
diff --git a/audio/audio_int.h b/audio/audio_int.h
index c1da710..fc87458 100644
--- a/audio/audio_int.h
+++ b/audio/audio_int.h
@@ -192,6 +192,7 @@ struct AudioState {
LIST_HEAD (cap_listhead, CaptureVoiceOut) cap_head;
int nb_hw_voices_out;
int nb_hw_voices_in;
+ int vm_running;
};
extern struct audio_driver no_audio_driver;
--
mailto:av1474@comtv.ru
next prev parent reply other threads:[~2009-02-17 22:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-16 21:49 [Qemu-devel] dsound: warning: Voice is already playing Robert Riebisch
2009-02-16 21:59 ` malc
2009-02-16 22:02 ` Robert Riebisch
2009-02-16 23:16 ` malc
2009-02-17 19:54 ` Robert Riebisch
2009-02-17 22:27 ` malc [this message]
2009-02-18 20:18 ` Jan Kiszka
2009-02-18 20:44 ` malc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0902180119550.2613@linmac.oyster.ru \
--to=av1474@comtv.ru \
--cc=jan.kiszka@siemens.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).