From nobody Thu May 2 08:55:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517586253589161.0707021608796; Fri, 2 Feb 2018 07:44:13 -0800 (PST) Received: from localhost ([::1]:37098 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehdVc-00029E-Kw for importer@patchew.org; Fri, 02 Feb 2018 10:44:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehcp7-0006kB-QI for qemu-devel@nongnu.org; Fri, 02 Feb 2018 10:00:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehcp2-0003UT-Lt for qemu-devel@nongnu.org; Fri, 02 Feb 2018 10:00:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59742) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ehcos-0003M7-SH; Fri, 02 Feb 2018 10:00:03 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 99C26C0587C4; Fri, 2 Feb 2018 07:50:13 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-227.ams2.redhat.com [10.36.116.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C5E9619E9; Fri, 2 Feb 2018 07:50:10 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C628231FFF; Fri, 2 Feb 2018 08:50:09 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 2 Feb 2018 08:50:08 +0100 Message-Id: <20180202075009.11653-2-kraxel@redhat.com> In-Reply-To: <20180202075009.11653-1-kraxel@redhat.com> References: <20180202075009.11653-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 02 Feb 2018 07:50:13 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/2] hw/audio/wm8750: move WM8750 declarations from i2c/i2c.h to audio/wm8750.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "open list:Musicpal" , Jan Kiszka , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 while here use TYPE_WM8750 and declare a data_req_cb() typedef. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20170919123053.32675-1-f4bug@amsat.org Signed-off-by: Gerd Hoffmann --- include/hw/audio/wm8750.h | 30 ++++++++++++++++++++++++++++++ include/hw/i2c/i2c.h | 9 --------- hw/arm/musicpal.c | 3 ++- hw/arm/spitz.c | 3 ++- hw/arm/z2.c | 3 ++- hw/audio/marvell_88w8618.c | 1 + hw/audio/wm8750.c | 6 ++---- 7 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 include/hw/audio/wm8750.h diff --git a/include/hw/audio/wm8750.h b/include/hw/audio/wm8750.h new file mode 100644 index 0000000000..84e7a119bb --- /dev/null +++ b/include/hw/audio/wm8750.h @@ -0,0 +1,30 @@ +/* + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2 or later, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License f= or + * more details. + * + * You should have received a copy of the GNU General Public License along= with + * this program. If not, see . + */ +#ifndef HW_DAC_WM8750_H +#define HW_DAC_WM8750_H + +#include "hw/hw.h" + +#define TYPE_WM8750 "wm8750" + +typedef void data_req_cb(void *opaque, int free_out, int free_in); + +void wm8750_data_req_set(DeviceState *dev, data_req_cb *data_req, void *op= aque); +void wm8750_dac_dat(void *opaque, uint32_t sample); +uint32_t wm8750_adc_dat(void *opaque); +void *wm8750_dac_buffer(void *opaque, int samples); +void wm8750_dac_commit(void *opaque); +void wm8750_set_bclk_in(void *opaque, int new_hz); + +#endif diff --git a/include/hw/i2c/i2c.h b/include/hw/i2c/i2c.h index 2ce611d4c8..24e95d0155 100644 --- a/include/hw/i2c/i2c.h +++ b/include/hw/i2c/i2c.h @@ -70,15 +70,6 @@ int i2c_recv(I2CBus *bus); =20 DeviceState *i2c_create_slave(I2CBus *bus, const char *name, uint8_t addr); =20 -/* wm8750.c */ -void wm8750_data_req_set(DeviceState *dev, - void (*data_req)(void *, int, int), void *opaque); -void wm8750_dac_dat(void *opaque, uint32_t sample); -uint32_t wm8750_adc_dat(void *opaque); -void *wm8750_dac_buffer(void *opaque, int samples); -void wm8750_dac_commit(void *opaque); -void wm8750_set_bclk_in(void *opaque, int new_hz); - /* lm832x.c */ void lm832x_key_event(DeviceState *dev, int key, int state); =20 diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index b648770882..4172caf5db 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -25,6 +25,7 @@ #include "hw/block/flash.h" #include "ui/console.h" #include "hw/i2c/i2c.h" +#include "hw/audio/wm8750.h" #include "sysemu/block-backend.h" #include "exec/address-spaces.h" #include "ui/pixel_ops.h" @@ -1691,7 +1692,7 @@ static void musicpal_init(MachineState *machine) qdev_connect_gpio_out(key_dev, i, qdev_get_gpio_in(dev, i + 15)); } =20 - wm8750_dev =3D i2c_create_slave(i2c, "wm8750", MP_WM_ADDR); + wm8750_dev =3D i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR); dev =3D qdev_create(NULL, "mv88w8618_audio"); s =3D SYS_BUS_DEVICE(dev); qdev_prop_set_ptr(dev, "wm8750", wm8750_dev); diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c index ac1e15cbbc..e419e3c00e 100644 --- a/hw/arm/spitz.c +++ b/hw/arm/spitz.c @@ -24,6 +24,7 @@ #include "hw/devices.h" #include "hw/arm/sharpsl.h" #include "ui/console.h" +#include "hw/audio/wm8750.h" #include "audio/audio.h" #include "hw/boards.h" #include "sysemu/block-backend.h" @@ -745,7 +746,7 @@ static void spitz_i2c_setup(PXA2xxState *cpu) DeviceState *wm; =20 /* Attach a WM8750 to the bus */ - wm =3D i2c_create_slave(bus, "wm8750", 0); + wm =3D i2c_create_slave(bus, TYPE_WM8750, 0); =20 spitz_wm8750_addr(wm, 0, 0); qdev_connect_gpio_out(cpu->gpio, SPITZ_GPIO_WM, diff --git a/hw/arm/z2.c b/hw/arm/z2.c index 60561c7b7c..300e933c82 100644 --- a/hw/arm/z2.c +++ b/hw/arm/z2.c @@ -23,6 +23,7 @@ #include "hw/block/flash.h" #include "sysemu/block-backend.h" #include "ui/console.h" +#include "hw/audio/wm8750.h" #include "audio/audio.h" #include "exec/address-spaces.h" #include "sysemu/qtest.h" @@ -346,7 +347,7 @@ static void z2_init(MachineState *machine) z2_lcd =3D ssi_create_slave(mpu->ssp[1], "zipit-lcd"); bus =3D pxa2xx_i2c_bus(mpu->i2c[0]); i2c_create_slave(bus, TYPE_AER915, 0x55); - wm =3D i2c_create_slave(bus, "wm8750", 0x1b); + wm =3D i2c_create_slave(bus, TYPE_WM8750, 0x1b); mpu->i2s->opaque =3D wm; mpu->i2s->codec_out =3D wm8750_dac_dat; mpu->i2s->codec_in =3D wm8750_adc_dat; diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c index 4f65f8c199..e546892d3c 100644 --- a/hw/audio/marvell_88w8618.c +++ b/hw/audio/marvell_88w8618.c @@ -13,6 +13,7 @@ #include "hw/sysbus.h" #include "hw/hw.h" #include "hw/i2c/i2c.h" +#include "hw/audio/wm8750.h" #include "audio/audio.h" =20 #define MP_AUDIO_SIZE 0x00001000 diff --git a/hw/audio/wm8750.c b/hw/audio/wm8750.c index 6d8b728923..416a78e869 100644 --- a/hw/audio/wm8750.c +++ b/hw/audio/wm8750.c @@ -8,8 +8,8 @@ */ =20 #include "qemu/osdep.h" -#include "hw/hw.h" #include "hw/i2c/i2c.h" +#include "hw/audio/wm8750.h" #include "audio/audio.h" =20 #define IN_PORT_N 3 @@ -24,7 +24,6 @@ typedef struct { int dac_hz; } WMRate; =20 -#define TYPE_WM8750 "wm8750" #define WM8750(obj) OBJECT_CHECK(WM8750State, (obj), TYPE_WM8750) =20 typedef struct WM8750State { @@ -639,8 +638,7 @@ static void wm8750_fini(I2CSlave *i2c) } #endif =20 -void wm8750_data_req_set(DeviceState *dev, - void (*data_req)(void *, int, int), void *opaque) +void wm8750_data_req_set(DeviceState *dev, data_req_cb *data_req, void *op= aque) { WM8750State *s =3D WM8750(dev); =20 --=20 2.9.3 From nobody Thu May 2 08:55:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517585778129189.47493263895672; Fri, 2 Feb 2018 07:36:18 -0800 (PST) Received: from localhost ([::1]:36708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehdNw-0004Ap-6O for importer@patchew.org; Fri, 02 Feb 2018 10:36:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehcoN-0005q7-UB for qemu-devel@nongnu.org; Fri, 02 Feb 2018 09:59:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehcoK-0002oU-1F for qemu-devel@nongnu.org; Fri, 02 Feb 2018 09:59:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44548) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ehcoJ-0002o5-PX for qemu-devel@nongnu.org; Fri, 02 Feb 2018 09:59:27 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B930D5F7AD; Fri, 2 Feb 2018 07:50:13 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-227.ams2.redhat.com [10.36.116.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 893E278E86; Fri, 2 Feb 2018 07:50:10 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CEA1D40BF4; Fri, 2 Feb 2018 08:50:09 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 2 Feb 2018 08:50:09 +0100 Message-Id: <20180202075009.11653-3-kraxel@redhat.com> In-Reply-To: <20180202075009.11653-1-kraxel@redhat.com> References: <20180202075009.11653-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 02 Feb 2018 07:50:13 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/2] hw/audio/sb16.c: change dolog() to qemu_log_mask() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Arbuckle , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: John Arbuckle Changes all the occurrances of dolog() to qemu_log_mask(). Signed-off-by: John Arbuckle Message-id: 20180201172744.7504-1-programmingkidx@gmail.com Signed-off-by: Gerd Hoffmann --- hw/audio/sb16.c | 79 +++++++++++++++++++++++++++++++----------------------= ---- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index 6ab2f6f89a..31de264ab7 100644 --- a/hw/audio/sb16.c +++ b/hw/audio/sb16.c @@ -29,6 +29,8 @@ #include "hw/qdev.h" #include "qemu/timer.h" #include "qemu/host-utils.h" +#include "qemu/log.h" +#include "qapi/error.h" =20 #define dolog(...) AUD_log ("sb16", __VA_ARGS__) =20 @@ -123,7 +125,7 @@ static int magic_of_irq (int irq) case 10: return 8; default: - dolog ("bad irq %d\n", irq); + qemu_log_mask(LOG_GUEST_ERROR, "bad irq %d\n", irq); return 2; } } @@ -140,7 +142,7 @@ static int irq_of_magic (int magic) case 8: return 10; default: - dolog ("bad irq magic %d\n", magic); + qemu_log_mask(LOG_GUEST_ERROR, "bad irq magic %d\n", magic); return -1; } } @@ -258,8 +260,8 @@ static void dma_cmd8 (SB16State *s, int mask, int dma_l= en) s->align =3D (1 << s->fmt_stereo) - 1; =20 if (s->block_size & s->align) { - dolog ("warning: misaligned block size %d, alignment %d\n", - s->block_size, s->align + 1); + qemu_log_mask(LOG_GUEST_ERROR, "warning: misaligned block size %d," + " alignment %d\n", s->block_size, s->align + 1); } =20 ldebug ("freq %d, stereo %d, sign %d, bits %d, " @@ -338,8 +340,8 @@ static void dma_cmd (SB16State *s, uint8_t cmd, uint8_t= d0, int dma_len) s->highspeed =3D 0; s->align =3D (1 << (s->fmt_stereo + (s->fmt_bits =3D=3D 16))) - 1; if (s->block_size & s->align) { - dolog ("warning: misaligned block size %d, alignment %d\n", - s->block_size, s->align + 1); + qemu_log_mask(LOG_GUEST_ERROR, "warning: misaligned block size %d," + " alignment %d\n", s->block_size, s->align + 1); } =20 if (s->freq) { @@ -391,7 +393,8 @@ static void command (SB16State *s, uint8_t cmd) =20 if (cmd > 0xaf && cmd < 0xd0) { if (cmd & 8) { - dolog ("ADC not yet supported (command %#x)\n", cmd); + qemu_log_mask(LOG_UNIMP, "ADC not yet supported (command %#x)\= n", + cmd); } =20 switch (cmd >> 4) { @@ -399,7 +402,7 @@ static void command (SB16State *s, uint8_t cmd) case 12: break; default: - dolog ("%#x wrong bits\n", cmd); + qemu_log_mask(LOG_GUEST_ERROR, "%#x wrong bits\n", cmd); } s->needed_bytes =3D 3; } @@ -453,7 +456,7 @@ static void command (SB16State *s, uint8_t cmd) goto warn; =20 case 0x35: - dolog ("0x35 - MIDI command not implemented\n"); + qemu_log_mask(LOG_UNIMP, "0x35 - MIDI command not implemented\= n"); break; =20 case 0x40: @@ -487,34 +490,38 @@ static void command (SB16State *s, uint8_t cmd) =20 case 0x74: s->needed_bytes =3D 2; /* DMA DAC, 4-bit ADPCM */ - dolog ("0x75 - DMA DAC, 4-bit ADPCM not implemented\n"); + qemu_log_mask(LOG_UNIMP, "0x75 - DMA DAC, 4-bit ADPCM not" + " implemented\n"); break; =20 case 0x75: /* DMA DAC, 4-bit ADPCM Reference */ s->needed_bytes =3D 2; - dolog ("0x74 - DMA DAC, 4-bit ADPCM Reference not implemented\= n"); + qemu_log_mask(LOG_UNIMP, "0x74 - DMA DAC, 4-bit ADPCM Referenc= e not" + " implemented\n"); break; =20 case 0x76: /* DMA DAC, 2.6-bit ADPCM */ s->needed_bytes =3D 2; - dolog ("0x74 - DMA DAC, 2.6-bit ADPCM not implemented\n"); + qemu_log_mask(LOG_UNIMP, "0x74 - DMA DAC, 2.6-bit ADPCM not" + " implemented\n"); break; =20 case 0x77: /* DMA DAC, 2.6-bit ADPCM Reference */ s->needed_bytes =3D 2; - dolog ("0x74 - DMA DAC, 2.6-bit ADPCM Reference not implemente= d\n"); + qemu_log_mask(LOG_UNIMP, "0x74 - DMA DAC, 2.6-bit ADPCM Refere= nce" + " not implemented\n"); break; =20 case 0x7d: - dolog ("0x7d - Autio-Initialize DMA DAC, 4-bit ADPCM Reference= \n"); - dolog ("not implemented\n"); + qemu_log_mask(LOG_UNIMP, "0x7d - Autio-Initialize DMA DAC, 4-b= it" + " ADPCM Reference\n"); + qemu_log_mask(LOG_UNIMP, "not implemented\n"); break; =20 case 0x7f: - dolog ( - "0x7d - Autio-Initialize DMA DAC, 2.6-bit ADPCM Reference\= n" - ); - dolog ("not implemented\n"); + qemu_log_mask(LOG_UNIMP, "0x7d - Autio-Initialize DMA DAC, 2.6= -bit" + " ADPCM Reference\n"); + qemu_log_mask(LOG_UNIMP, "not implemented\n"); break; =20 case 0x80: @@ -586,7 +593,7 @@ static void command (SB16State *s, uint8_t cmd) break; =20 case 0xe7: - dolog ("Attempt to probe for ESS (0xe7)?\n"); + qemu_log_mask(LOG_UNIMP, "Attempt to probe for ESS (0xe7)?\n"); break; =20 case 0xe8: /* read test reg */ @@ -613,7 +620,7 @@ static void command (SB16State *s, uint8_t cmd) goto warn; =20 default: - dolog ("Unrecognized command %#x\n", cmd); + qemu_log_mask(LOG_UNIMP, "Unrecognized command %#x\n", cmd); break; } } @@ -632,8 +639,8 @@ static void command (SB16State *s, uint8_t cmd) return; =20 warn: - dolog ("warning: command %#x,%d is not truly understood yet\n", - cmd, s->needed_bytes); + qemu_log_mask(LOG_UNIMP, "warning: command %#x,%d is not truly underst= ood" + " yet\n", cmd, s->needed_bytes); goto exit; =20 } @@ -735,9 +742,8 @@ static void complete (SB16State *s) break; =20 case 0x42: /* FT2 sets output freq with this, go figu= re */ -#if 0 - dolog ("cmd 0x42 might not do what it think it should\n"); -#endif + qemu_log_mask(LOG_UNIMP, "cmd 0x42 might not do what it think = it" + " should\n"); case 0x41: s->freq =3D dsp_get_hilo (s); ldebug ("set freq %d\n", s->freq); @@ -820,7 +826,8 @@ static void complete (SB16State *s) break; =20 default: - dolog ("complete: unrecognized command %#x\n", s->cmd); + qemu_log_mask(LOG_UNIMP, "complete: unrecognized command %#x\n= ", + s->cmd); return; } } @@ -1095,10 +1102,9 @@ static void mixer_write_datab(void *opaque, uint32_t= nport, uint32_t val) dma =3D ctz32 (val & 0xf); hdma =3D ctz32 (val & 0xf0); if (dma !=3D s->dma || hdma !=3D s->hdma) { - dolog ( - "attempt to change DMA " - "8bit %d(%d), 16bit %d(%d) (val=3D%#x)\n", - dma, s->dma, hdma, s->hdma, val); + qemu_log_mask(LOG_GUEST_ERROR, "attempt to change DMA 8bit" + " %d(%d), 16bit %d(%d) (val=3D%#x)\n", dma, = s->dma, + hdma, s->hdma, val); } #if 0 s->dma =3D dma; @@ -1108,8 +1114,8 @@ static void mixer_write_datab(void *opaque, uint32_t = nport, uint32_t val) break; =20 case 0x82: - dolog ("attempt to write into IRQ status register (val=3D%#x)\n", - val); + qemu_log_mask(LOG_GUEST_ERROR, "attempt to write into IRQ status" + " register (val=3D%#x)\n", val); return; =20 default: @@ -1181,8 +1187,9 @@ static int SB_read_DMA (void *opaque, int nchan, int = dma_pos, int dma_len) int till, copy, written, free; =20 if (s->block_size <=3D 0) { - dolog ("invalid block size=3D%d nchan=3D%d dma_pos=3D%d dma_len=3D= %d\n", - s->block_size, nchan, dma_pos, dma_len); + qemu_log_mask(LOG_GUEST_ERROR, "invalid block size=3D%d nchan=3D%d" + " dma_pos=3D%d dma_len=3D%d\n", s->block_size, nchan, + dma_pos, dma_len); return dma_pos; } =20 @@ -1376,7 +1383,7 @@ static void sb16_realizefn (DeviceState *dev, Error *= *errp) reset_mixer (s); s->aux_ts =3D timer_new_ns(QEMU_CLOCK_VIRTUAL, aux_timer, s); if (!s->aux_ts) { - dolog ("warning: Could not create auxiliary timer\n"); + error_setg(errp, "warning: Could not create auxiliary timer"); } =20 isa_register_portio_list(isadev, &s->portio_list, s->port, --=20 2.9.3