From 52379e98dbc6cedb446dbf7f2262274c05d3ac3f Mon Sep 17 00:00:00 2001 From: tracer-ics2023 Date: Sat, 21 Sep 2024 15:01:38 +0800 Subject: [PATCH] =?UTF-8?q?>=20=20compile=20NEMU=20221220000=20=E5=BC=A0?= =?UTF-8?q?=E4=B8=89=20Linux=20zzy=205.15.146.1-microsoft-standard-WSL2=20?= =?UTF-8?q?#1=20SMP=20Thu=20Jan=2011=2004:09:03=20UTC=202024=20x86=5F64=20?= =?UTF-8?q?x86=5F64=20x86=5F64=20GNU/Linux=20=2015:01:37=20up=204=20days,?= =?UTF-8?q?=2010:07,=20=201=20user,=20=20load=20average:=200.54,=200.53,?= =?UTF-8?q?=200.54?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- abstract-machine/am/src/platform/nemu/ioe/audio.c | 2 +- nemu/src/device/audio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/abstract-machine/am/src/platform/nemu/ioe/audio.c b/abstract-machine/am/src/platform/nemu/ioe/audio.c index 34bd632..98c2478 100644 --- a/abstract-machine/am/src/platform/nemu/ioe/audio.c +++ b/abstract-machine/am/src/platform/nemu/ioe/audio.c @@ -38,7 +38,7 @@ void __am_audio_play(AM_AUDIO_PLAY_T *ctl) { int cnt = ctl->buf.end - ctl->buf.start, i = 0; while (cnt) { // lock sbuf - outl(AUDIO_INIT_ADDR, 1 << 1); + outl(AUDIO_INIT_ADDR, 2); for (; i < cnt; i++) { if (inl(AUDIO_COUNT_ADDR) == audio_sbuf_size) { i--; diff --git a/nemu/src/device/audio.c b/nemu/src/device/audio.c index e4286a2..8a43506 100644 --- a/nemu/src/device/audio.c +++ b/nemu/src/device/audio.c @@ -89,7 +89,7 @@ static void audio_io_handler(uint32_t offset, int len, bool is_write) { case reg_init: if (is_write) { if (audio_base[reg_init] & 1) init_audio_dev(); - if (audio_base[reg_init] & 1 << 1) { + if (audio_base[reg_init] & 2) { mtx_lock(&mtx_audio); } else { mtx_unlock(&mtx_audio);