From nobody Tue Feb 10 06:57:56 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1769538668; cv=none; d=zohomail.com; s=zohoarc; b=Mmy63FlJdUkojEPSNxRdD4T/5z+b/OPYSrDGGF/X9fvp1CKuRF0SLYb3+mb8x6USXgWwBBDWC25sze1Evh4mZ5pMX8OfffJgKt99zFlAOMhn0vc739vfJnPEUmjUX3bQSbFFLY8emqSEvbbdfsrrrctQL9M1Z6VGJeecVEa1x5o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769538668; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=tdqFkR++Mx8sP/ibIVMErSUZQuFIsPXgRhBYzMQnBnE=; b=jCItvS8e5COQdsv5+076aBqUQYpSdifLBeIv6fpqo+I17MZx1CY8sVG5V51u6o//dRXD98Ho3s9gVmCIamCiJU8/Fx8WgwpLV/MyxzwPGiTX7evEEbNKY3Uq9LJ7DtRXhapYs565yeXGQTlx92hXZ7tpyh80OxsxqolrIAYWMZM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769538668003321.29551584215517; Tue, 27 Jan 2026 10:31:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vknor-00023t-Cy; Tue, 27 Jan 2026 13:29:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vknn4-0007sy-Ls for qemu-devel@nongnu.org; Tue, 27 Jan 2026 13:27:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vknn2-0003J1-8I for qemu-devel@nongnu.org; Tue, 27 Jan 2026 13:27:50 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-321-2YbPT5gZOaWq3CZb4x6RVA-1; Tue, 27 Jan 2026 13:27:46 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 011411955D84; Tue, 27 Jan 2026 18:27:45 +0000 (UTC) Received: from localhost (unknown [10.45.242.23]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4FE181956095; Tue, 27 Jan 2026 18:27:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769538467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tdqFkR++Mx8sP/ibIVMErSUZQuFIsPXgRhBYzMQnBnE=; b=LIAFYOS04hWv7Kl+kdIsaUPitjVSg5kjKPxEwjpqIWvMdsBXRj66953ipTBb1c1YgNkmvm RkQf6DKr7wgzJxNnFCzdkadKPTjqFL1jk8KBFO6F4KiOSy8DM9aBG+BxfrjDuk+ib3GnzZ GIvnSKv15vYV/B4RoSeI75bDAzrZGW8= X-MC-Unique: 2YbPT5gZOaWq3CZb4x6RVA-1 X-Mimecast-MFC-AGG-ID: 2YbPT5gZOaWq3CZb4x6RVA_1769538465 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH 24/43] audio/oss: replace custom logging with report & trace Date: Tue, 27 Jan 2026 22:24:51 +0400 Message-ID: <20260127182516.289834-25-marcandre.lureau@redhat.com> In-Reply-To: <20260127182516.289834-1-marcandre.lureau@redhat.com> References: <20260127182516.289834-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1769538669879154100 From: Marc-Andr=C3=A9 Lureau Replace the custom audio logging infrastructure with standard QEMU error reporting and tracing. Signed-off-by: Marc-Andr=C3=A9 Lureau --- audio/ossaudio.c | 176 ++++++++++++++++++++------------------------- audio/trace-events | 5 ++ 2 files changed, 81 insertions(+), 100 deletions(-) diff --git a/audio/ossaudio.c b/audio/ossaudio.c index 95b7963ed0c..8388f81343b 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -31,11 +31,10 @@ #include "qemu/host-utils.h" #include "qapi/error.h" #include "qemu/audio.h" +#include "qemu/error-report.h" #include "qom/object.h" -#include "trace.h" - -#define AUDIO_CAP "oss" #include "audio_int.h" +#include "trace.h" =20 #define TYPE_AUDIO_OSS "audio-oss" OBJECT_DECLARE_SIMPLE_TYPE(AudioOss, AUDIO_OSS) @@ -76,43 +75,40 @@ struct oss_params { int fragsize; }; =20 -static void G_GNUC_PRINTF (2, 3) oss_logerr (int err, const char *fmt, ...) +static void G_GNUC_PRINTF(2, 3) oss_logerr(int err, const char *fmt, ...) { va_list ap; =20 - va_start (ap, fmt); - AUD_vlog (AUDIO_CAP, fmt, ap); - va_end (ap); + error_printf("oss: "); + va_start(ap, fmt); + error_vprintf(fmt, ap); + va_end(ap); =20 - AUD_log (AUDIO_CAP, "Reason: %s\n", strerror (err)); + error_printf(" Reason: %s\n", strerror(err)); } =20 -static void G_GNUC_PRINTF (3, 4) oss_logerr2 ( - int err, - const char *typ, - const char *fmt, - ... - ) +static void G_GNUC_PRINTF(3, 4) oss_logerr2(int err, const char *typ, + const char *fmt, ...) { va_list ap; =20 - AUD_log (AUDIO_CAP, "Could not initialize %s\n", typ); + error_printf("oss: Could not initialize %s: ", typ); =20 - va_start (ap, fmt); - AUD_vlog (AUDIO_CAP, fmt, ap); - va_end (ap); + va_start(ap, fmt); + error_vprintf(fmt, ap); + va_end(ap); =20 - AUD_log (AUDIO_CAP, "Reason: %s\n", strerror (err)); + error_printf(" Reason: %s\n", strerror(err)); } =20 -static void oss_anal_close (int *fdp) +static void oss_anal_close(int *fdp) { int err; =20 - qemu_set_fd_handler (*fdp, NULL, NULL, NULL); - err =3D close (*fdp); + qemu_set_fd_handler(*fdp, NULL, NULL, NULL); + err =3D close(*fdp); if (err) { - oss_logerr (errno, "Failed to close file(fd=3D%d)\n", *fdp); + oss_logerr(errno, "Failed to close file(fd=3D%d)", *fdp); } *fdp =3D -1; } @@ -159,10 +155,7 @@ static int aud_to_ossfmt(AudioFormat fmt, bool big_end= ian) return big_endian ? AFMT_U16_BE : AFMT_U16_LE; =20 default: - dolog ("Internal logic error: Bad audio format %d\n", fmt); -#ifdef DEBUG_AUDIO - abort (); -#endif + error_report("oss: Internal logic error: Bad audio format %d", fmt= ); return AFMT_U8; } } @@ -201,27 +194,13 @@ static int oss_to_audfmt (int ossfmt, AudioFormat *fm= t, int *endianness) break; =20 default: - dolog ("Unrecognized audio format %d\n", ossfmt); + error_report("oss: Unrecognized audio format %d", ossfmt); return -1; } =20 return 0; } =20 -#if defined DEBUG_MISMATCHES || defined DEBUG -static void oss_dump_info (struct oss_params *req, struct oss_params *obt) -{ - dolog ("parameter | requested value | obtained value\n"); - dolog ("format | %10d | %10d\n", req->fmt, obt->fmt); - dolog ("channels | %10d | %10d\n", - req->nchannels, obt->nchannels); - dolog ("frequency | %10d | %10d\n", req->freq, obt->freq); - dolog ("nfrags | %10d | %10d\n", req->nfrags, obt->nfrags); - dolog ("fragsize | %10d | %10d\n", - req->fragsize, obt->fragsize); -} -#endif - #ifdef USE_DSP_POLICY static int oss_get_version (int fd, int *version, const char *typ) { @@ -240,7 +219,7 @@ static int oss_get_version (int fd, int *version, const= char *typ) return 0; } #endif - oss_logerr2 (errno, typ, "Failed to get OSS version\n"); + oss_logerr2(errno, typ, "Failed to get OSS version"); return -1; } return 0; @@ -269,7 +248,7 @@ static int oss_open(int in, struct oss_params *req, aud= settings *as, =20 fd =3D open (dspname, oflags | O_NONBLOCK); if (-1 =3D=3D fd) { - oss_logerr2 (errno, typ, "Failed to open `%s'\n", dspname); + oss_logerr2(errno, typ, "Failed to open '%s'", dspname); return -1; } =20 @@ -281,23 +260,23 @@ static int oss_open(int in, struct oss_params *req, a= udsettings *as, qapi_AudiodevOssPerDirectionOptions_base(opdo), as, 23220); =20 if (ioctl (fd, SNDCTL_DSP_SAMPLESIZE, &fmt)) { - oss_logerr2 (errno, typ, "Failed to set sample size %d\n", req->fm= t); + oss_logerr2(errno, typ, "Failed to set sample size %d", req->fmt); goto err; } =20 if (ioctl (fd, SNDCTL_DSP_CHANNELS, &nchannels)) { - oss_logerr2 (errno, typ, "Failed to set number of channels %d\n", - req->nchannels); + oss_logerr2(errno, typ, "Failed to set number of channels %d", + req->nchannels); goto err; } =20 if (ioctl (fd, SNDCTL_DSP_SPEED, &freq)) { - oss_logerr2 (errno, typ, "Failed to set frequency %d\n", req->freq= ); + oss_logerr2(errno, typ, "Failed to set frequency %d", req->freq); goto err; } =20 if (ioctl (fd, SNDCTL_DSP_NONBLOCK, NULL)) { - oss_logerr2 (errno, typ, "Failed to set non-blocking mode\n"); + oss_logerr2(errno, typ, "Failed to set non-blocking mode"); goto err; } =20 @@ -311,9 +290,9 @@ static int oss_open(int in, struct oss_params *req, aud= settings *as, if (version >=3D 0x040000) { int policy2 =3D policy; if (ioctl(fd, SNDCTL_DSP_POLICY, &policy2)) { - oss_logerr2 (errno, typ, - "Failed to set timing policy to %d\n", - policy); + oss_logerr2(errno, typ, + "Failed to set timing policy to %d", + policy); goto err; } setfragment =3D 0; @@ -325,20 +304,20 @@ static int oss_open(int in, struct oss_params *req, a= udsettings *as, if (setfragment) { int mmmmssss =3D (req->nfrags << 16) | ctz32 (req->fragsize); if (ioctl (fd, SNDCTL_DSP_SETFRAGMENT, &mmmmssss)) { - oss_logerr2 (errno, typ, "Failed to set buffer length (%d, %d)= \n", - req->nfrags, req->fragsize); + oss_logerr2(errno, typ, "Failed to set buffer length (%d, %d)", + req->nfrags, req->fragsize); goto err; } } =20 if (ioctl (fd, in ? SNDCTL_DSP_GETISPACE : SNDCTL_DSP_GETOSPACE, &abin= fo)) { - oss_logerr2 (errno, typ, "Failed to get buffer length\n"); + oss_logerr2(errno, typ, "Failed to get buffer length"); goto err; } =20 if (!abinfo.fragstotal || !abinfo.fragsize) { - AUD_log (AUDIO_CAP, "Returned bogus buffer information(%d, %d) for= %s\n", - abinfo.fragstotal, abinfo.fragsize, typ); + error_report("oss: Returned bogus buffer information(%d, %d) for %= s", + abinfo.fragstotal, abinfo.fragsize, typ); goto err; } =20 @@ -349,20 +328,13 @@ static int oss_open(int in, struct oss_params *req, a= udsettings *as, obt->fragsize =3D abinfo.fragsize; *pfd =3D fd; =20 -#ifdef DEBUG_MISMATCHES - if ((req->fmt !=3D obt->fmt) || - (req->nchannels !=3D obt->nchannels) || - (req->freq !=3D obt->freq) || - (req->fragsize !=3D obt->fragsize) || - (req->nfrags !=3D obt->nfrags)) { - dolog ("Audio parameters mismatch\n"); - oss_dump_info (req, obt); - } -#endif + trace_oss_out_params( + req->fmt, obt->fmt, + req->nchannels, obt->nchannels, + req->freq, obt->freq, + req->nfrags, obt->nfrags, + req->fragsize, obt->fragsize); =20 -#ifdef DEBUG - oss_dump_info (req, obt); -#endif return 0; =20 err: @@ -378,7 +350,7 @@ static size_t oss_get_available_bytes(OSSVoiceOut *oss) =20 err =3D ioctl(oss->fd, SNDCTL_DSP_GETOPTR, &cntinfo); if (err < 0) { - oss_logerr(errno, "SNDCTL_DSP_GETOPTR failed\n"); + oss_logerr(errno, "SNDCTL_DSP_GETOPTR failed"); return 0; } =20 @@ -459,8 +431,7 @@ static size_t oss_write(HWVoiceOut *hw, void *buf, size= _t len) bytes_written =3D write(oss->fd, pcm, len); if (bytes_written < 0) { if (errno !=3D EAGAIN) { - oss_logerr(errno, "failed to write %zu bytes\n", - len); + oss_logerr(errno, "failed to write %zu bytes", len); } return pos; } @@ -474,18 +445,18 @@ static size_t oss_write(HWVoiceOut *hw, void *buf, si= ze_t len) return pos; } =20 -static void oss_fini_out (HWVoiceOut *hw) +static void oss_fini_out(HWVoiceOut *hw) { int err; - OSSVoiceOut *oss =3D (OSSVoiceOut *) hw; + OSSVoiceOut *oss =3D (OSSVoiceOut *)hw; =20 - ldebug ("oss_fini\n"); - oss_anal_close (&oss->fd); + trace_oss_fini_out(); + oss_anal_close(&oss->fd); =20 if (oss->mmapped && hw->buf_emul) { err =3D munmap(hw->buf_emul, hw->size_emul); if (err) { - oss_logerr(errno, "Failed to unmap buffer %p, size %zu\n", + oss_logerr(errno, "Failed to unmap buffer %p, size %zu", hw->buf_emul, hw->size_emul); } hw->buf_emul =3D NULL; @@ -526,8 +497,8 @@ static int oss_init_out(HWVoiceOut *hw, struct audsetti= ngs *as) oss->fragsize =3D obt.fragsize; =20 if (obt.nfrags * obt.fragsize % hw->info.bytes_per_frame) { - dolog ("warning: Misaligned DAC buffer, size %d, alignment %d\n", - obt.nfrags * obt.fragsize, hw->info.bytes_per_frame); + warn_report("oss: Misaligned DAC buffer, size %d, alignment %d", + obt.nfrags * obt.fragsize, hw->info.bytes_per_frame); } =20 hw->samples =3D (obt.nfrags * obt.fragsize) / hw->info.bytes_per_frame; @@ -544,20 +515,16 @@ static int oss_init_out(HWVoiceOut *hw, struct audset= tings *as) 0 ); if (hw->buf_emul =3D=3D MAP_FAILED) { - oss_logerr(errno, "Failed to map %zu bytes of DAC\n", - hw->size_emul); + oss_logerr(errno, "Failed to map %zu bytes of DAC", hw->size_e= mul); hw->buf_emul =3D NULL; } else { int trig =3D 0; if (ioctl (fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) { - oss_logerr (errno, "SNDCTL_DSP_SETTRIGGER 0 failed\n"); + oss_logerr(errno, "SNDCTL_DSP_SETTRIGGER 0 failed"); } else { trig =3D PCM_ENABLE_OUTPUT; - if (ioctl (fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) { - oss_logerr ( - errno, - "SNDCTL_DSP_SETTRIGGER PCM_ENABLE_OUTPUT failed\n" - ); + if (ioctl(fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) { + oss_logerr(errno, "SNDCTL_DSP_SETTRIGGER PCM_ENABLE_OU= TPUT failed"); } else { oss->mmapped =3D 1; } @@ -566,7 +533,7 @@ static int oss_init_out(HWVoiceOut *hw, struct audsetti= ngs *as) if (!oss->mmapped) { err =3D munmap(hw->buf_emul, hw->size_emul); if (err) { - oss_logerr(errno, "Failed to unmap buffer %p size %zu\= n", + oss_logerr(errno, "Failed to unmap buffer %p size %zu", hw->buf_emul, hw->size_emul); } hw->buf_emul =3D NULL; @@ -582,13 +549,14 @@ static int oss_init_out(HWVoiceOut *hw, struct audset= tings *as) static void oss_enable_out(HWVoiceOut *hw, bool enable) { int trig; - OSSVoiceOut *oss =3D (OSSVoiceOut *) hw; + OSSVoiceOut *oss =3D (OSSVoiceOut *)hw; AudiodevOssPerDirectionOptions *opdo =3D oss->dev->u.oss.out; =20 + trace_oss_enable_out(enable); + if (enable) { hw->poll_mode =3D opdo->try_poll; =20 - ldebug("enabling voice\n"); if (hw->poll_mode) { oss_poll_out(hw); } @@ -601,12 +569,12 @@ static void oss_enable_out(HWVoiceOut *hw, bool enabl= e) trig =3D PCM_ENABLE_OUTPUT; if (ioctl(oss->fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) { oss_logerr(errno, - "SNDCTL_DSP_SETTRIGGER PCM_ENABLE_OUTPUT failed\n"); + "SNDCTL_DSP_SETTRIGGER PCM_ENABLE_OUTPUT failed"); return; } } else { if (hw->poll_mode) { - qemu_set_fd_handler (oss->fd, NULL, NULL, NULL); + qemu_set_fd_handler(oss->fd, NULL, NULL, NULL); hw->poll_mode =3D 0; } =20 @@ -614,10 +582,9 @@ static void oss_enable_out(HWVoiceOut *hw, bool enable) return; } =20 - ldebug ("disabling voice\n"); trig =3D 0; - if (ioctl (oss->fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) { - oss_logerr (errno, "SNDCTL_DSP_SETTRIGGER 0 failed\n"); + if (ioctl(oss->fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) { + oss_logerr(errno, "SNDCTL_DSP_SETTRIGGER 0 failed"); return; } } @@ -654,9 +621,16 @@ static int oss_init_in(HWVoiceIn *hw, struct audsettin= gs *as) oss->nfrags =3D obt.nfrags; oss->fragsize =3D obt.fragsize; =20 + trace_oss_in_params( + req.fmt, obt.fmt, + req.nchannels, obt.nchannels, + req.freq, obt.freq, + req.nfrags, obt.nfrags, + req.fragsize, obt.fragsize); + if (obt.nfrags * obt.fragsize % hw->info.bytes_per_frame) { - dolog ("warning: Misaligned ADC buffer, size %d, alignment %d\n", - obt.nfrags * obt.fragsize, hw->info.bytes_per_frame); + warn_report("oss: Misaligned ADC buffer, size %d, alignment %d", + obt.nfrags * obt.fragsize, hw->info.bytes_per_frame); } =20 hw->samples =3D (obt.nfrags * obt.fragsize) / hw->info.bytes_per_frame; @@ -690,7 +664,7 @@ static size_t oss_read(HWVoiceIn *hw, void *buf, size_t= len) case EAGAIN: break; default: - oss_logerr(errno, "Failed to read %zu bytes of audio (to %= p)\n", + oss_logerr(errno, "Failed to read %zu bytes of audio (to %= p)", len, dst); break; } @@ -706,9 +680,11 @@ static size_t oss_read(HWVoiceIn *hw, void *buf, size_= t len) =20 static void oss_enable_in(HWVoiceIn *hw, bool enable) { - OSSVoiceIn *oss =3D (OSSVoiceIn *) hw; + OSSVoiceIn *oss =3D (OSSVoiceIn *)hw; AudiodevOssPerDirectionOptions *opdo =3D oss->dev->u.oss.out; =20 + trace_oss_enable_in(enable); + if (enable) { hw->poll_mode =3D opdo->try_poll; =20 diff --git a/audio/trace-events b/audio/trace-events index 79744456cec..f33be2dd8e3 100644 --- a/audio/trace-events +++ b/audio/trace-events @@ -17,6 +17,11 @@ alsa_enable_in(bool enable) "enable=3D%d" =20 # ossaudio.c oss_version(int version) "OSS version =3D 0x%x" +oss_out_params(int req_fmt, int obt_fmt, int req_channels, int obt_channel= s, int req_freq, int obt_freq, int req_nfrags, int obt_nfrags, int req_frag= size, int obt_fragsize) "fmt=3D%d->%d, channels %d->%d, freq=3D%d->%d, nfra= gs=3D%d->%d, fragsize=3D%d->%d" +oss_in_params(int req_fmt, int obt_fmt, int req_channels, int obt_channels= , int req_freq, int obt_freq, int req_nfrags, int obt_nfrags, int req_frags= ize, int obt_fragsize) "fmt=3D%d->%d, channels %d->%d, freq=3D%d->%d, nfrag= s=3D%d->%d, fragsize=3D%d->%d" +oss_fini_out(void) "" +oss_enable_out(bool enable) "enable=3D%d" +oss_enable_in(bool enable) "enable=3D%d" =20 # dbusaudio.c dbus_audio_register(const char *s, const char *dir) "sender =3D %s, dir = =3D %s" --=20 2.52.0