[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: Audio
From: |
malc |
Subject: |
[Qemu-devel] Re: Audio |
Date: |
Sun, 13 Sep 2009 22:52:01 +0400 (MSD) |
On Sun, 13 Sep 2009, Jan Kiszka wrote:
> malc wrote:
> > The code was just commited that enables "polling" audio mode (oss and
> > alsa), it's also unconditionally enabled now to obtain some testing
> > coverage, so please give it a whirl, feedback is welcome.
>
> CPU load goes to 100% when starting my Musicpal image. Applying the fix
> below and disabling polling again cures this effect here.
Few things:
Thanks for the patch, but i was at a loss how to properly apply it
with git and retain all the relevant information (Subject/Authorhsip
etc), so for the time being it was applied manually.
In the past your mail server was bouncing my replies to threads where
you paticipated, and since this new CC-ing madness is in place i'm not
sure whether the list reply was delivered to you either, hence i
emptied CC header and replying to the list alone.
The Musicpal image i have here is getting stuck somewhere along the
way to the point of monitor not being responsive, so i can not test
anything myself. FWIW the command line is this:
[...]/arm-softmmu/qemu-system-arm \
-M musicpal \
-pflash flash.image \
-kernel u-boot.bin \
-monitor stdio \
-m 128 \
-redir tcp:8080::80 -redir tcp:2323::23
Is disabling of both DAC/ADC poll mode needed in your case or?
Does following help?
diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index 28c245d..9cc1372 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -37,6 +37,7 @@ struct pollhlp {
snd_pcm_t *handle;
struct pollfd *pfds;
int count;
+ int mask;
};
typedef struct ALSAVoiceOut {
@@ -178,7 +179,7 @@ static void alsa_poll_handler (void *opaque)
return;
}
- if (!(revents & POLLOUT)) {
+ if (!(revents & hlp->mask)) {
if (conf.verbose) {
dolog ("revents = %d\n", revents);
}
@@ -208,7 +209,7 @@ static void alsa_poll_handler (void *opaque)
}
}
-static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp)
+static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp, int mask)
{
int i, count, err;
struct pollfd *pfds;
@@ -265,6 +266,7 @@ static int alsa_poll_helper (snd_pcm_t *handle, struct
pollhlp *hlp)
hlp->pfds = pfds;
hlp->count = count;
hlp->handle = handle;
+ hlp->mask = mask;
return 0;
}
@@ -272,14 +274,14 @@ static int alsa_poll_out (HWVoiceOut *hw)
{
ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
- return alsa_poll_helper (alsa->handle, &alsa->pollhlp);
+ return alsa_poll_helper (alsa->handle, &alsa->pollhlp, POLLOUT);
}
static int alsa_poll_in (HWVoiceIn *hw)
{
ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
- return alsa_poll_helper (alsa->handle, &alsa->pollhlp);
+ return alsa_poll_helper (alsa->handle, &alsa->pollhlp, POLLIN);
}
static int alsa_write (SWVoiceOut *sw, void *buf, int len)
[..snip..]
--
mailto:address@hidden
- [Qemu-devel] Audio, malc, 2009/09/11
- [Qemu-devel] Re: Audio, Jan Kiszka, 2009/09/13
- [Qemu-devel] Re: Audio,
malc <=
- [Qemu-devel] Re: Audio, Jan Kiszka, 2009/09/13
- [Qemu-devel] Re: Audio, Jan Kiszka, 2009/09/13
- [Qemu-devel] Re: Audio, malc, 2009/09/13
- [Qemu-devel] Re: Audio, Jan Kiszka, 2009/09/14
- [Qemu-devel] Re: Audio, malc, 2009/09/14
- [Qemu-devel] Solaris SPARC guest on QEMU, Luis Freitas, 2009/09/14
- Re: [Qemu-devel] Solaris SPARC guest on QEMU, Laurent Vivier, 2009/09/15
- Re: [Qemu-devel] Solaris SPARC guest on QEMU, Luis Freitas, 2009/09/15
- Re: [Qemu-devel] Solaris SPARC guest on QEMU, Artyom Tarasenko, 2009/09/15
- Re: [Qemu-devel] Solaris SPARC guest on QEMU, Blue Swirl, 2009/09/15