diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/audio/wm8750.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/audio/wm8750.c b/hw/audio/wm8750.c index f8b5bebfc2..d2bf2e1da1 100644 --- a/hw/audio/wm8750.c +++ b/hw/audio/wm8750.c @@ -680,8 +680,12 @@ uint32_t wm8750_adc_dat(void *opaque) WM8750State *s = (WM8750State *) opaque; uint32_t *data; - if (s->idx_in >= sizeof(s->data_in)) + if (s->idx_in >= sizeof(s->data_in)) { wm8750_in_load(s); + if (s->idx_in >= sizeof(s->data_in)) { + return 0x80008000; /* silence in AUD_FMT_S16 sample format */ + } + } data = (uint32_t *) &s->data_in[s->idx_in]; s->req_in -= 4; |