From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MmvDH-0001OJ-Hz for qemu-devel@nongnu.org; Sun, 13 Sep 2009 15:58:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MmvDD-0001Kg-S0 for qemu-devel@nongnu.org; Sun, 13 Sep 2009 15:58:19 -0400 Received: from [199.232.76.173] (port=49704 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MmvDD-0001KZ-P0 for qemu-devel@nongnu.org; Sun, 13 Sep 2009 15:58:15 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:40307) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MmvDC-0000lY-PF for qemu-devel@nongnu.org; Sun, 13 Sep 2009 15:58:15 -0400 Message-ID: <4AAD4E9B.3010503@web.de> Date: Sun, 13 Sep 2009 21:57:15 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4AACD7DB.2080800@web.de> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig83243D1E6CF716CCA5F16C39" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: Audio List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig83243D1E6CF716CCA5F16C39 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable malc wrote: > On Sun, 13 Sep 2009, Jan Kiszka wrote: >=20 >> 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 fi= x >> below and disabling polling again cures this effect here. >=20 > Few things: >=20 > 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. Sorry, the patch was so trivial that I became sloppy. >=20 > 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. Unless the bounce said "mailbox full": Just forward me a recent bounce message privately (replace web.de with siemens.com). Typically I get wrong black-listings resolved with web.de within a day or less. >=20 > 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: >=20 > [...]/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 Hmm, this setup works for me (current master). Maybe you can catch what strace reports or which backtrace gdb generates. Does disabling polling or reverting before your changes make it boot again? >=20 > Is disabling of both DAC/ADC poll mode needed in your case or? Yes. >=20 > Does following help? >=20 > 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; > }; > =20 > typedef struct ALSAVoiceOut { > @@ -178,7 +179,7 @@ static void alsa_poll_handler (void *opaque) > return; > } > =20 > - if (!(revents & POLLOUT)) { > + if (!(revents & hlp->mask)) { > if (conf.verbose) { > dolog ("revents =3D %d\n", revents); > } > @@ -208,7 +209,7 @@ static void alsa_poll_handler (void *opaque) > } > } > =20 > -static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp) > +static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp, i= nt mask) > { > int i, count, err; > struct pollfd *pfds; > @@ -265,6 +266,7 @@ static int alsa_poll_helper (snd_pcm_t *handle, str= uct pollhlp *hlp) > hlp->pfds =3D pfds; > hlp->count =3D count; > hlp->handle =3D handle; > + hlp->mask =3D mask; > return 0; > } > =20 > @@ -272,14 +274,14 @@ static int alsa_poll_out (HWVoiceOut *hw) > { > ALSAVoiceOut *alsa =3D (ALSAVoiceOut *) hw; > =20 > - return alsa_poll_helper (alsa->handle, &alsa->pollhlp); > + return alsa_poll_helper (alsa->handle, &alsa->pollhlp, POLLOUT); > } > =20 > static int alsa_poll_in (HWVoiceIn *hw) > { > ALSAVoiceIn *alsa =3D (ALSAVoiceIn *) hw; > =20 > - return alsa_poll_helper (alsa->handle, &alsa->pollhlp); > + return alsa_poll_helper (alsa->handle, &alsa->pollhlp, POLLIN); > } > =20 > static int alsa_write (SWVoiceOut *sw, void *buf, int len) >=20 >=20 Nope, still full CPU load. Jan --------------enig83243D1E6CF716CCA5F16C39 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkqtTqAACgkQniDOoMHTA+nKQgCeMl69+EjDkBvHdV2LR7BrpKZI jgwAnAgwmWrbqNwW1rzm223dgdYFbcD8 =OrQJ -----END PGP SIGNATURE----- --------------enig83243D1E6CF716CCA5F16C39--