audio: do not run each backend in audio_run
audio_run is called manually by alsa and oss backends when polling.
In this case only the requesting backend should be run, not all of them.
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 10221fcea2028fa18d95cf531526ffe3b1d9b21a.1566168923.git.DirtY.iCE.hu@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index 29139ef..456fba7 100644
--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -110,28 +110,28 @@
static void oss_helper_poll_out (void *opaque)
{
- (void) opaque;
- audio_run ("oss_poll_out");
+ AudioState *s = opaque;
+ audio_run(s, "oss_poll_out");
}
static void oss_helper_poll_in (void *opaque)
{
- (void) opaque;
- audio_run ("oss_poll_in");
+ AudioState *s = opaque;
+ audio_run(s, "oss_poll_in");
}
static void oss_poll_out (HWVoiceOut *hw)
{
OSSVoiceOut *oss = (OSSVoiceOut *) hw;
- qemu_set_fd_handler (oss->fd, NULL, oss_helper_poll_out, NULL);
+ qemu_set_fd_handler(oss->fd, NULL, oss_helper_poll_out, hw->s);
}
static void oss_poll_in (HWVoiceIn *hw)
{
OSSVoiceIn *oss = (OSSVoiceIn *) hw;
- qemu_set_fd_handler (oss->fd, oss_helper_poll_in, NULL, NULL);
+ qemu_set_fd_handler(oss->fd, oss_helper_poll_in, NULL, hw->s);
}
static int oss_write (SWVoiceOut *sw, void *buf, int len)