> compile NEMU
221220000 张三 Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 15:01:37 up 4 days, 10:07, 1 user, load average: 0.54, 0.53, 0.54
This commit is contained in:
@ -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--;
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user