qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [4249] Improve audio api use in WM8750.


From: Jan Kiszka
Subject: Re: [Qemu-devel] [4249] Improve audio api use in WM8750.
Date: Thu, 24 Apr 2008 23:30:33 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080226)

Hi Andrzej,

Andrzej Zaborowski wrote:
> Revision: 4249
...
>  static void wm8750_audio_out_cb(void *opaque, int free_b)
>  {
>      struct wm8750_s *s = (struct wm8750_s *) opaque;
>  
> -    s->req_out = free_b;
> -    s->data_req(s->opaque, free_b >> 2, s->req_in >> 2);
> -    wm8750_out_flush(s);
> +    if (s->idx_out >= free_b) {
> +        s->idx_out = free_b;
> +        s->req_out = 0;
> +        wm8750_out_flush(s);
> +    } else
> +        s->req_out = free_b - s->idx_out;
> + 
> +    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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]