Commit eb69b50ad9806c4a3b5900392a5acc9837cffd18
1 parent
601d70b9
Prevent use of an uninitialised value in WM8750 and move buffer flush
to a better place (Jan Kiszka). git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4223 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
1 deletions
hw/wm8750.c
... | ... | @@ -76,10 +76,10 @@ static void wm8750_audio_in_cb(void *opaque, int avail_b) |
76 | 76 | static void wm8750_audio_out_cb(void *opaque, int free_b) |
77 | 77 | { |
78 | 78 | struct wm8750_s *s = (struct wm8750_s *) opaque; |
79 | - wm8750_out_flush(s); | |
80 | 79 | |
81 | 80 | s->req_out = free_b; |
82 | 81 | s->data_req(s->opaque, free_b >> 2, s->req_in >> 2); |
82 | + wm8750_out_flush(s); | |
83 | 83 | } |
84 | 84 | |
85 | 85 | struct wm_rate_s { |
... | ... | @@ -213,6 +213,7 @@ static void inline wm8750_mask_update(struct wm8750_s *s) |
213 | 213 | void wm8750_reset(i2c_slave *i2c) |
214 | 214 | { |
215 | 215 | struct wm8750_s *s = (struct wm8750_s *) i2c; |
216 | + s->rate = &wm_rate_table[0]; | |
216 | 217 | s->enable = 0; |
217 | 218 | wm8750_set_format(s); |
218 | 219 | s->diff[0] = 0; | ... | ... |