From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jp91t-0003l7-1q for qemu-devel@nongnu.org; Thu, 24 Apr 2008 17:30:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jp91r-0003kR-NM for qemu-devel@nongnu.org; Thu, 24 Apr 2008 17:30:56 -0400 Received: from [199.232.76.173] (port=49332 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jp91r-0003kJ-9A for qemu-devel@nongnu.org; Thu, 24 Apr 2008 17:30:55 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jp91q-0002WP-68 for qemu-devel@nongnu.org; Thu, 24 Apr 2008 17:30:54 -0400 Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate03.web.de (Postfix) with ESMTP id 70EE7D85F574 for ; Thu, 24 Apr 2008 23:30:39 +0200 (CEST) Received: from [88.64.15.45] (helo=[192.168.1.198]) by smtp08.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.109 #226) id 1Jp91b-0005mE-00 for qemu-devel@nongnu.org; Thu, 24 Apr 2008 23:30:39 +0200 Message-ID: <4810FBF9.1040308@web.de> Date: Thu, 24 Apr 2008 23:30:33 +0200 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] [4249] Improve audio api use in WM8750. References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigED84DFC9A50D5D9B2B6770C1" Sender: jan.kiszka@web.de Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigED84DFC9A50D5D9B2B6770C1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Andrzej, Andrzej Zaborowski wrote: > Revision: 4249 =2E.. > static void wm8750_audio_out_cb(void *opaque, int free_b) > { > struct wm8750_s *s =3D (struct wm8750_s *) opaque; > =20 > - s->req_out =3D free_b; > - s->data_req(s->opaque, free_b >> 2, s->req_in >> 2); > - wm8750_out_flush(s); > + if (s->idx_out >=3D free_b) { > + s->idx_out =3D free_b; > + s->req_out =3D 0; > + wm8750_out_flush(s); > + } else > + s->req_out =3D free_b - s->idx_out; > +=20 > + s->data_req(s->opaque, s->req_out >> 2, s->req_in >> 2); Please make sure that the callback is always issued _before_ the flush (keep in mind: it may increase the amount of data that has to be flushed ASAP!). And this change also leaves the MusicPal broken. As I haven't fully understood what the hunk above is supposed to improve (and a quick fix of mine failed), I cannot provide a patch yet. Thanks, Jan --------------enigED84DFC9A50D5D9B2B6770C1 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.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD4DBQFIEPv+niDOoMHTA+kRAv+JAJd7cu0DcSDcbhlV3mQBOnij1cENAJ40bo+b D0TkSzuh7vcmrGfvlfhlaw== =b3K7 -----END PGP SIGNATURE----- --------------enigED84DFC9A50D5D9B2B6770C1--