From: malc <av1474@comtv.ru>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: Audio
Date: Sun, 13 Sep 2009 22:52:01 +0400 (MSD) [thread overview]
Message-ID: <Pine.LNX.4.64.0909132235410.1394@linmac.oyster.ru> (raw)
In-Reply-To: <4AACD7DB.2080800@web.de>
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:av1474@comtv.ru
next prev parent reply other threads:[~2009-09-13 18:52 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 23:34 [Qemu-devel] Audio malc
2009-09-13 11:30 ` [Qemu-devel] Audio Jan Kiszka
2009-09-13 18:52 ` malc [this message]
2009-09-13 19:57 ` Jan Kiszka
2009-09-13 20:07 ` Jan Kiszka
2009-09-14 0:02 ` malc
2009-09-14 6:18 ` Jan Kiszka
2009-09-14 21:13 ` malc
2009-09-14 21:30 ` [Qemu-devel] Solaris SPARC guest on QEMU Luis Freitas
2009-09-15 6:33 ` Laurent Vivier
2009-09-15 23:31 ` Luis Freitas
2009-09-15 8:55 ` Artyom Tarasenko
2009-09-15 19:19 ` Blue Swirl
2009-09-15 21:08 ` Stuart Brady
2009-09-16 8:28 ` Artyom Tarasenko
2009-09-16 15:38 ` Luis Freitas
2009-09-16 16:33 ` Artyom Tarasenko
2009-09-15 20:11 ` [Qemu-devel] Re: Audio Jan Kiszka
2009-09-18 18:49 ` Jan Kiszka
2009-09-18 19:29 ` malc
2009-09-13 23:31 ` malc
2009-09-15 11:28 ` Avi Kivity
2009-09-22 11:24 ` malc
-- strict thread matches above, loose matches on Subject: below --
2004-11-05 18:47 [Qemu-devel] Audio malc
2004-11-05 20:35 ` [Qemu-devel] Audio Ronald
2004-11-05 20:38 ` André Braga
2004-11-05 20:46 ` malc
[not found] <Pine.LNX.4.55.0410311815320.2162@home.oyster.ru>
2004-11-01 12:32 ` Ronald
2004-11-01 12:43 ` malc
[not found] ` <4185ADFA.7010102@brittainweb.org>
2004-11-01 12:06 ` [Qemu-devel] Audio malc
2004-11-04 17:14 ` Jason Brittain
2004-11-04 19:12 ` [Qemu-devel] Audio Ronald
2004-11-04 19:18 ` Jason Brittain
2004-11-04 19:34 ` Jason Brittain
2004-11-04 20:03 ` malc
2004-11-05 3:22 ` Jason Brittain
2004-11-05 6:28 ` Jens Arm
2004-11-05 8:01 ` Jens Arm
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.0909132235410.1394@linmac.oyster.ru \
--to=av1474@comtv.ru \
--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).