diff options
author | Kővágó, Zoltán | 2019-08-19 01:06:54 +0200 |
---|---|---|
committer | Gerd Hoffmann | 2019-08-21 09:13:37 +0200 |
commit | 589359150365616de479866f8bc594c876480bd8 (patch) | |
tree | 3b0413edced2698cd97e18b6cc106df811c0cc2c /hw/audio/milkymist-ac97.c | |
parent | paaudio: properly disconnect streams in fini_* (diff) | |
download | qemu-589359150365616de479866f8bc594c876480bd8.tar.gz qemu-589359150365616de479866f8bc594c876480bd8.tar.xz qemu-589359150365616de479866f8bc594c876480bd8.zip |
audio: remove audio_MIN, audio_MAX
There's already a MIN and MAX macro in include/qemu/osdep.h, use them
instead.
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 303222477df6f7373217e0df768635fab5855745.1566168923.git.DirtY.iCE.hu@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/audio/milkymist-ac97.c')
-rw-r--r-- | hw/audio/milkymist-ac97.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/audio/milkymist-ac97.c b/hw/audio/milkymist-ac97.c index 853b4ed874..6d409eff1b 100644 --- a/hw/audio/milkymist-ac97.c +++ b/hw/audio/milkymist-ac97.c @@ -185,7 +185,7 @@ static void ac97_in_cb(void *opaque, int avail_b) MilkymistAC97State *s = opaque; uint8_t buf[4096]; uint32_t remaining = s->regs[R_U_REMAINING]; - int temp = audio_MIN(remaining, avail_b); + int temp = MIN(remaining, avail_b); uint32_t addr = s->regs[R_U_ADDR]; int transferred = 0; @@ -199,7 +199,7 @@ static void ac97_in_cb(void *opaque, int avail_b) while (temp) { int acquired, to_copy; - to_copy = audio_MIN(temp, sizeof(buf)); + to_copy = MIN(temp, sizeof(buf)); acquired = AUD_read(s->voice_in, buf, to_copy); if (!acquired) { break; @@ -228,7 +228,7 @@ static void ac97_out_cb(void *opaque, int free_b) MilkymistAC97State *s = opaque; uint8_t buf[4096]; uint32_t remaining = s->regs[R_D_REMAINING]; - int temp = audio_MIN(remaining, free_b); + int temp = MIN(remaining, free_b); uint32_t addr = s->regs[R_D_ADDR]; int transferred = 0; @@ -242,7 +242,7 @@ static void ac97_out_cb(void *opaque, int free_b) while (temp) { int copied, to_copy; - to_copy = audio_MIN(temp, sizeof(buf)); + to_copy = MIN(temp, sizeof(buf)); cpu_physical_memory_read(addr, buf, to_copy); copied = AUD_write(s->voice_out, buf, to_copy); if (!copied) { |