qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Questions on audio_atexit(), possibly bugs
@ 2009-09-30 21:39 Markus Armbruster
  2009-09-30 22:42 ` malc
  0 siblings, 1 reply; 15+ messages in thread
From: Markus Armbruster @ 2009-09-30 21:39 UTC (permalink / raw)
  To: qemu-devel

Excuse my ignorance on all things audio, but I stumbled over something
that could be wrong.

audio_vm_change_state_handler() stops voices when the VM stops, and
starts them when it continues.

audio_atexit() unconditionally stops them.  When a stopped VM exits,
this stops voices that are already stopped.

Does the audio driver contract allow stopping a stopped voice?  If yes,
I figured starting a running voice is fine, too.  If no, we have a bug
in audio_atexit().

Why is audio_atexit() needed at all?  Doesn't the OS clean up just fine
all by itself?  If we do need manual cleanup, why do we have to stop
voices before we run fini_out() and fini_in()?


Unrelated, but nearby: audio_vm_change_state_handler() calls the
ctl_out() callback with three arguments:

        hwo->pcm_ops->ctl_out (hwo, op, conf.try_poll_out);

(op is either VOICE_ENABLE or VOICE_DISABLE here), while audio_atexit()
calls it with two:

        hwo->pcm_ops->ctl_out (hwo, VOICE_DISABLE);

Same for ctl_in().  Doesn't look kosher.  A quick check of oss_ctl_out()
and oss_ctl_in() shows use of three parameters.

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

end of thread, other threads:[~2009-10-03 12:55 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-30 21:39 [Qemu-devel] Questions on audio_atexit(), possibly bugs Markus Armbruster
2009-09-30 22:42 ` malc
2009-09-30 22:59   ` Markus Armbruster
2009-09-30 23:22     ` malc
2009-10-02 17:04       ` Markus Armbruster
2009-10-02 21:26         ` malc
2009-10-03 11:47           ` Markus Armbruster
2009-10-03 12:21             ` malc
2009-10-03 12:49               ` Markus Armbruster
2009-10-03 12:55                 ` malc
2009-09-30 23:28     ` malc
2009-10-01 15:21       ` Markus Armbruster
2009-10-01 21:26         ` malc
2009-10-01 22:40           ` Markus Armbruster
2009-10-01 22:49             ` malc

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