From: Jan Kiszka <jan.kiszka@web.de>
To: malc <av1474@comtv.ru>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: Audio
Date: Sun, 13 Sep 2009 22:07:38 +0200 [thread overview]
Message-ID: <4AAD510A.90908@web.de> (raw)
In-Reply-To: <4AAD4E9B.3010503@web.de>
[-- Attachment #1: Type: text/plain, Size: 1998 bytes --]
Jan Kiszka wrote:
> malc wrote:
>> 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)
>>
>>
>
> Nope, still full CPU load.
Forgot to mention: I also tried OSS before, but it suffered the same
way, and polling had to be disabled.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2009-09-13 20:07 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
2009-09-13 19:57 ` Jan Kiszka
2009-09-13 20:07 ` Jan Kiszka [this message]
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=4AAD510A.90908@web.de \
--to=jan.kiszka@web.de \
--cc=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).