From nobody Fri Nov 14 20:44:37 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590479872; cv=none; d=zohomail.com; s=zohoarc; b=Pzy6XC206pBB2GTdrySCHnoFSV/gYH8dF5OxQaiRwQabgN6czKR8m4xQj4zIQDaORRZHH/7JFI7YCM+nWnu1jSjyI1PAgK+OopR0GKoPo3VZyC0VLiG2Gvx8/ylhUAOgFcviGTAtmgaYuOJ/uCdRRjPkLDIQPwS3ofcyDRDo4Zc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590479872; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=XKjVgjzeHfNNiDkPKkAQa1ppfJfg/MOx2HQs/UenFpQ=; b=nVp9yIafjbK+Y7ERsazx0uNu4A4aQQxjA2dph50SkZC/OfeK/b9ZI888QLLOgW+zR8/c84RX7bGZmo6qSfH9abGt75hrixEqpBu8Gp3AGXNdcypBCFnPU4m8r6OP2e7YnVQSetmhITUoRBYMTZPCGLAUhNGjEb0xkGzhhI1uyUw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590479872149804.2664183571686; Tue, 26 May 2020 00:57:52 -0700 (PDT) Received: from localhost ([::1]:33746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdUT8-0004iD-P6 for importer@patchew.org; Tue, 26 May 2020 03:57:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdUSB-0002wb-V3 for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:51 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:23250 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdUSA-0002rf-G4 for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:51 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-418-6kBLZwY9PcSqOPBNPjShQA-1; Tue, 26 May 2020 03:56:47 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id A95AE464; Tue, 26 May 2020 07:56:46 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1BA2360CD0; Tue, 26 May 2020 07:56:42 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E276B1753B; Tue, 26 May 2020 09:56:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590479809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=XKjVgjzeHfNNiDkPKkAQa1ppfJfg/MOx2HQs/UenFpQ=; b=ST908Tf7UTc1G1z6F611gHUImEsmOvnbeDb1FwxNbG6O9V3PbJYyimkITvlFAL4JaC2h2L yMPVI9wz3jVEXAn/9cmh1dbqirCQ7fWROROIrp7JvyveOhqhqX0dXkzk+PsEd/I5FkE2Ti vRGQjHFZj+IfHJ+PLs6RiGIGaHTxNTU= X-MC-Unique: 6kBLZwY9PcSqOPBNPjShQA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 1/8] es1370: check total frame count against current frame Date: Tue, 26 May 2020 09:56:32 +0200 Message-Id: <20200526075639.27949-2-kraxel@redhat.com> In-Reply-To: <20200526075639.27949-1-kraxel@redhat.com> References: <20200526075639.27949-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=205.139.110.120; envelope-from=kraxel@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/26 01:19:28 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Prasad J Pandit , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster , Aleksandar Markovic , Gerd Hoffmann , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Prasad J Pandit A guest user may set channel frame count via es1370_write() such that, in es1370_transfer_audio(), total frame count 'size' is lesser than the number of frames that are processed 'cnt'. int cnt =3D d->frame_cnt >> 16; int size =3D d->frame_cnt & 0xffff; if (size < cnt), it results in incorrect calculations leading to OOB access issue(s). Add check to avoid it. Reported-by: Ren Ding Reported-by: Hanqing Zhao Signed-off-by: Prasad J Pandit Message-id: 20200514200608.1744203-1-ppandit@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/es1370.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index 89c4dabcd44f..5f8a83ff5624 100644 --- a/hw/audio/es1370.c +++ b/hw/audio/es1370.c @@ -643,6 +643,9 @@ static void es1370_transfer_audio (ES1370State *s, stru= ct chan *d, int loop_sel, int csc_bytes =3D (csc + 1) << d->shift; int cnt =3D d->frame_cnt >> 16; int size =3D d->frame_cnt & 0xffff; + if (size < cnt) { + return; + } int left =3D ((size - cnt + 1) << 2) + d->leftover; int transferred =3D 0; int temp =3D MIN (max, MIN (left, csc_bytes)); @@ -651,7 +654,7 @@ static void es1370_transfer_audio (ES1370State *s, stru= ct chan *d, int loop_sel, addr +=3D (cnt << 2) + d->leftover; =20 if (index =3D=3D ADC_CHANNEL) { - while (temp) { + while (temp > 0) { int acquired, to_copy; =20 to_copy =3D MIN ((size_t) temp, sizeof (tmpbuf)); @@ -669,7 +672,7 @@ static void es1370_transfer_audio (ES1370State *s, stru= ct chan *d, int loop_sel, else { SWVoiceOut *voice =3D s->dac_voice[index]; =20 - while (temp) { + while (temp > 0) { int copied, to_copy; =20 to_copy =3D MIN ((size_t) temp, sizeof (tmpbuf)); --=20 2.18.4 From nobody Fri Nov 14 20:44:37 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590480003; cv=none; d=zohomail.com; s=zohoarc; b=BGNzyMNLFPwRqVDTRnRUDvP8DEgg+MOzObh2tM+MK2OG1YDNHRNWpy4nHL1153A2eO0VC0mavB31ZgOSucfKSBg+zW4PVLX20bYg/Zo8KT7xEff3c+RzyyMW8yie0yX5UjS0hxbnPjnWXLgSFa3FAMThNQ4dUSC/IbqbCNpp6Do= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590480003; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PbTWMANGxxGjExdCznT/6GBQypuYquAYCFX6/seJpv0=; b=YzqN1SV6UNSDW2vvOMEypSyNmmCPyGNWaAI9ur9GLwY0BYltXodiQHecIvjGYI+TnHY8SwYRKceqMNExIDgHKX6O2MSQiCFcmoL/gZNPRgB8kOFCXfTstCmbvjk23dtMfoj5lCUZHX0lE6fbypk4BYoZsVIfR3xF2Xx6wcFoLR4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590480003009418.3592943250152; Tue, 26 May 2020 01:00:03 -0700 (PDT) Received: from localhost ([::1]:42510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdUVC-0008G4-M4 for importer@patchew.org; Tue, 26 May 2020 03:59:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdUSC-0002xQ-5F for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:52 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:52655 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdUSB-0002rq-7I for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:51 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-197-cA5ofGWuMQGkH662YnJzxA-1; Tue, 26 May 2020 03:56:46 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EE4751009440; Tue, 26 May 2020 07:56:44 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 261275C1BB; Tue, 26 May 2020 07:56:41 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EBA0F9DAD; Tue, 26 May 2020 09:56:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590479810; 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=PbTWMANGxxGjExdCznT/6GBQypuYquAYCFX6/seJpv0=; b=Afux99nYH2qbOqdvL5CYXY5PfAzPkTE8MsR6qS49FmsBpefmT70Amtn5cA2xHw5yBN1ATL /Z76/VNs7+UG5Zr7s8hrufHuaL9hW9oCavQlsg+AkSUDbVmHizZQ0Oo0fRWD/DbYWV4P30 SlVJzcFnaMrrSo1TlcP2eD9JAcmxtsU= X-MC-Unique: cA5ofGWuMQGkH662YnJzxA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 2/8] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h' Date: Tue, 26 May 2020 09:56:33 +0200 Message-Id: <20200526075639.27949-3-kraxel@redhat.com> In-Reply-To: <20200526075639.27949-1-kraxel@redhat.com> References: <20200526075639.27949-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=207.211.31.120; envelope-from=kraxel@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/26 01:51:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Gerd Hoffmann , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Use the generic AUDIO_HOST_ENDIANNESS definition instead of a custom one. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200505100750.27332-1-f4bug@amsat.org Signed-off-by: Gerd Hoffmann --- hw/audio/gus.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/audio/gus.c b/hw/audio/gus.c index eb4a803fb53b..c8df2bde6b32 100644 --- a/hw/audio/gus.c +++ b/hw/audio/gus.c @@ -41,12 +41,6 @@ #define ldebug(...) #endif =20 -#ifdef HOST_WORDS_BIGENDIAN -#define GUS_ENDIANNESS 1 -#else -#define GUS_ENDIANNESS 0 -#endif - #define TYPE_GUS "gus" #define GUS(obj) OBJECT_CHECK (GUSState, (obj), TYPE_GUS) =20 @@ -256,7 +250,7 @@ static void gus_realizefn (DeviceState *dev, Error **er= rp) as.freq =3D s->freq; as.nchannels =3D 2; as.fmt =3D AUDIO_FORMAT_S16; - as.endianness =3D GUS_ENDIANNESS; + as.endianness =3D AUDIO_HOST_ENDIANNESS; =20 s->voice =3D AUD_open_out ( &s->card, --=20 2.18.4 From nobody Fri Nov 14 20:44:37 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590480014; cv=none; d=zohomail.com; s=zohoarc; b=C36uHCTD8SKuQz2fyn65LzonfM5PJL1tSB034rlYXzLmRje30QzyGOFp1Y2cMD3IXmYit0rXwIQfAm/HqXRVmLxcYvisHObv2gB70wRKNWwwRAI5Zv+U19Se76XiVERvZDzyg11kvvM3ua/blyt3r4Jg/1uIpyi/lenA/7gm2NY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590480014; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=LBM+tuNOgzdf/lSW/tiDMPX6QyYBpvvPElpmO9vC6/Y=; b=EWIenc1fWAXvr4p1dlVDXMFj3NYgXp6DehYaw4nN+FKuucsG+iK/tk/oMqTclhx9e0HYTCAa59tMNErqHI+vBcmQfwjvijnP0unVF/F/6E7yZeRMk9yxdSJvKJqZrCxly5tcJzHxgTFPKugNhXA0Plfj3LwfXS47CkkHRXLrRhk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590480014419727.0321860667211; Tue, 26 May 2020 01:00:14 -0700 (PDT) Received: from localhost ([::1]:43472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdUVN-0000J8-RS for importer@patchew.org; Tue, 26 May 2020 04:00:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdUSL-0003JX-8I for qemu-devel@nongnu.org; Tue, 26 May 2020 03:57:01 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:56561 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdUSH-0002sj-6g for qemu-devel@nongnu.org; Tue, 26 May 2020 03:57:00 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-91-0-Zis9G9OWixdSncE-vCFA-1; Tue, 26 May 2020 03:56:51 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 91AE1107ACCA; Tue, 26 May 2020 07:56:50 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1FEA76AD00; Tue, 26 May 2020 07:56:42 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 09C2E9DAF; Tue, 26 May 2020 09:56:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590479816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=LBM+tuNOgzdf/lSW/tiDMPX6QyYBpvvPElpmO9vC6/Y=; b=VJVs5UadgOV1BqfSKvD00HL70uinzCe4lqlKdgxARUeRmZwju6WPBCTUBDbiiQCMBfsVkm AOnkjRHyJF6RRZDc3EkmD15vP74rNJdIlMQAEp45gZtfyky3gsMnGab84e0vF5Y1jHz4eH QJ+EknEmqnJ7qKAHSb3l8Npfov0W4oI= X-MC-Unique: 0-Zis9G9OWixdSncE-vCFA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 3/8] audio/jack: add JACK client audiodev Date: Tue, 26 May 2020 09:56:34 +0200 Message-Id: <20200526075639.27949-4-kraxel@redhat.com> In-Reply-To: <20200526075639.27949-1-kraxel@redhat.com> References: <20200526075639.27949-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=207.211.31.120; envelope-from=kraxel@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/26 01:51:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Geoffrey McRae , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster , Aleksandar Markovic , Gerd Hoffmann , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Geoffrey McRae This commit adds a new audiodev backend to allow QEMU to use JACK as both an audio sink and source. Signed-off-by: Geoffrey McRae Message-Id: <20200512101603.E3DB73A038E@moya.office.hostfission.com> Signed-off-by: Gerd Hoffmann --- configure | 17 ++ audio/audio_template.h | 2 + audio/audio.c | 1 + audio/jackaudio.c | 667 +++++++++++++++++++++++++++++++++++++++++ audio/Makefile.objs | 5 + qapi/audio.json | 56 +++- 6 files changed, 746 insertions(+), 2 deletions(-) create mode 100644 audio/jackaudio.c diff --git a/configure b/configure index 2fc05c4465cb..b969dee675bb 100755 --- a/configure +++ b/configure @@ -3629,6 +3629,22 @@ for drv in $audio_drv_list; do oss_libs=3D"$oss_lib" ;; =20 + jack | try-jack) + if $pkg_config jack --exists; then + jack_libs=3D$($pkg_config jack --libs) + if test "$drv" =3D "try-jack"; then + audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-jack= /jack/') + fi + else + if test "$drv" =3D "try-jack"; then + audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-jack= //') + else + error_exit "$drv check failed" \ + "Make sure to have the $drv libs and headers installed." + fi + fi + ;; + *) echo "$audio_possible_drivers" | grep -q "\<$drv\>" || { error_exit "Unknown driver '$drv' selected" \ @@ -6904,6 +6920,7 @@ echo "PULSE_LIBS=3D$pulse_libs" >> $config_host_mak echo "COREAUDIO_LIBS=3D$coreaudio_libs" >> $config_host_mak echo "DSOUND_LIBS=3D$dsound_libs" >> $config_host_mak echo "OSS_LIBS=3D$oss_libs" >> $config_host_mak +echo "JACK_LIBS=3D$jack_libs" >> $config_host_mak if test "$audio_win_int" =3D "yes" ; then echo "CONFIG_AUDIO_WIN_INT=3Dy" >> $config_host_mak fi diff --git a/audio/audio_template.h b/audio/audio_template.h index 7013d3041f91..8dd48ce14e9d 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -330,6 +330,8 @@ AudiodevPerDirectionOptions *glue(audio_get_pdo_, TYPE)= (Audiodev *dev) dev->u.coreaudio.TYPE); case AUDIODEV_DRIVER_DSOUND: return dev->u.dsound.TYPE; + case AUDIODEV_DRIVER_JACK: + return qapi_AudiodevJackPerDirectionOptions_base(dev->u.jack.TYPE); case AUDIODEV_DRIVER_OSS: return qapi_AudiodevOssPerDirectionOptions_base(dev->u.oss.TYPE); case AUDIODEV_DRIVER_PA: diff --git a/audio/audio.c b/audio/audio.c index 7a9e6803558b..95d9fb16caa5 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1969,6 +1969,7 @@ void audio_create_pdos(Audiodev *dev) CASE(ALSA, alsa, Alsa); CASE(COREAUDIO, coreaudio, Coreaudio); CASE(DSOUND, dsound, ); + CASE(JACK, jack, Jack); CASE(OSS, oss, Oss); CASE(PA, pa, Pa); CASE(SDL, sdl, ); diff --git a/audio/jackaudio.c b/audio/jackaudio.c new file mode 100644 index 000000000000..722ddb1dfe43 --- /dev/null +++ b/audio/jackaudio.c @@ -0,0 +1,667 @@ +/* + * QEMU JACK Audio Connection Kit Client + * + * Copyright (c) 2020 Geoffrey McRae (gnif) + * + * Permission is hereby granted, free of charge, to any person obtaining a= copy + * of this software and associated documentation files (the "Software"), t= o deal + * in the Software without restriction, including without limitation the r= ights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or se= ll + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included= in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS= OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OT= HER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING= FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS = IN + * THE SOFTWARE. + */ + +#include "qemu/osdep.h" +#include "qemu/module.h" +#include "qemu/atomic.h" +#include "qemu-common.h" +#include "audio.h" + +#define AUDIO_CAP "jack" +#include "audio_int.h" + +#include +#include + +struct QJack; + +typedef enum QJackState { + QJACK_STATE_DISCONNECTED, + QJACK_STATE_STOPPED, + QJACK_STATE_RUNNING, + QJACK_STATE_SHUTDOWN +} +QJackState; + +typedef struct QJackBuffer { + int channels; + int frames; + uint32_t used; + int rptr, wptr; + float **data; +} +QJackBuffer; + +typedef struct QJackClient { + AudiodevJackPerDirectionOptions *opt; + + bool out; + bool finished; + bool connect_ports; + int packets; + + QJackState state; + jack_client_t *client; + jack_nframes_t freq; + + struct QJack *j; + int nchannels; + int buffersize; + jack_port_t **port; + QJackBuffer fifo; +} +QJackClient; + +typedef struct QJackOut { + HWVoiceOut hw; + QJackClient c; +} +QJackOut; + +typedef struct QJackIn { + HWVoiceIn hw; + QJackClient c; +} +QJackIn; + +static int qjack_client_init(QJackClient *c); +static void qjack_client_connect_ports(QJackClient *c); +static void qjack_client_fini(QJackClient *c); + +static void qjack_buffer_create(QJackBuffer *buffer, int channels, int fra= mes) +{ + buffer->channels =3D channels; + buffer->frames =3D frames; + buffer->used =3D 0; + buffer->rptr =3D 0; + buffer->wptr =3D 0; + buffer->data =3D g_malloc(channels * sizeof(float *)); + for (int i =3D 0; i < channels; ++i) { + buffer->data[i] =3D g_malloc(frames * sizeof(float)); + } +} + +static void qjack_buffer_clear(QJackBuffer *buffer) +{ + assert(buffer->data); + atomic_store_release(&buffer->used, 0); + buffer->rptr =3D 0; + buffer->wptr =3D 0; +} + +static void qjack_buffer_free(QJackBuffer *buffer) +{ + if (!buffer->data) { + return; + } + + for (int i =3D 0; i < buffer->channels; ++i) { + g_free(buffer->data[i]); + } + + g_free(buffer->data); + buffer->data =3D NULL; +} + +/* write PCM interleaved */ +static int qjack_buffer_write(QJackBuffer *buffer, float *data, int size) +{ + assert(buffer->data); + const int samples =3D size / sizeof(float); + int frames =3D samples / buffer->channels; + const int avail =3D buffer->frames - atomic_load_acquire(&buffer->us= ed); + + if (frames > avail) { + frames =3D avail; + } + + int copy =3D frames; + int wptr =3D buffer->wptr; + + while (copy) { + + for (int c =3D 0; c < buffer->channels; ++c) { + buffer->data[c][wptr] =3D *data++; + } + + if (++wptr =3D=3D buffer->frames) { + wptr =3D 0; + } + + --copy; + } + + buffer->wptr =3D wptr; + + atomic_add(&buffer->used, frames); + return frames * buffer->channels * sizeof(float); +}; + +/* write PCM linear */ +static int qjack_buffer_write_l(QJackBuffer *buffer, float **dest, int fra= mes) +{ + assert(buffer->data); + const int avail =3D buffer->frames - atomic_load_acquire(&buffer->us= ed); + int wptr =3D buffer->wptr; + + if (frames > avail) { + frames =3D avail; + } + + int right =3D buffer->frames - wptr; + if (right > frames) { + right =3D frames; + } + + const int left =3D frames - right; + for (int c =3D 0; c < buffer->channels; ++c) { + memcpy(buffer->data[c] + wptr, dest[c] , right * sizeof(flo= at)); + memcpy(buffer->data[c] , dest[c] + right, left * sizeof(flo= at)); + } + + wptr +=3D frames; + if (wptr >=3D buffer->frames) { + wptr -=3D buffer->frames; + } + buffer->wptr =3D wptr; + + atomic_add(&buffer->used, frames); + return frames; +} + +/* read PCM interleaved */ +static int qjack_buffer_read(QJackBuffer *buffer, float *dest, int size) +{ + assert(buffer->data); + const int samples =3D size / sizeof(float); + int frames =3D samples / buffer->channels; + const int avail =3D atomic_load_acquire(&buffer->used); + + if (frames > avail) { + frames =3D avail; + } + + int copy =3D frames; + int rptr =3D buffer->rptr; + + while (copy) { + + for (int c =3D 0; c < buffer->channels; ++c) { + *dest++ =3D buffer->data[c][rptr]; + } + + if (++rptr =3D=3D buffer->frames) { + rptr =3D 0; + } + + --copy; + } + + buffer->rptr =3D rptr; + + atomic_sub(&buffer->used, frames); + return frames * buffer->channels * sizeof(float); +} + +/* read PCM linear */ +static int qjack_buffer_read_l(QJackBuffer *buffer, float **dest, int fram= es) +{ + assert(buffer->data); + int copy =3D frames; + const int used =3D atomic_load_acquire(&buffer->used); + int rptr =3D buffer->rptr; + + if (copy > used) { + copy =3D used; + } + + int right =3D buffer->frames - rptr; + if (right > copy) { + right =3D copy; + } + + const int left =3D copy - right; + for (int c =3D 0; c < buffer->channels; ++c) { + memcpy(dest[c] , buffer->data[c] + rptr, right * sizeof(flo= at)); + memcpy(dest[c] + right, buffer->data[c] , left * sizeof(flo= at)); + } + + rptr +=3D copy; + if (rptr >=3D buffer->frames) { + rptr -=3D buffer->frames; + } + buffer->rptr =3D rptr; + + atomic_sub(&buffer->used, copy); + return copy; +} + +static int qjack_process(jack_nframes_t nframes, void *arg) +{ + QJackClient *c =3D (QJackClient *)arg; + + if (c->state !=3D QJACK_STATE_RUNNING) { + return 0; + } + + /* get the buffers for the ports */ + float *buffers[c->nchannels]; + for (int i =3D 0; i < c->nchannels; ++i) { + buffers[i] =3D jack_port_get_buffer(c->port[i], nframes); + } + + if (c->out) { + qjack_buffer_read_l(&c->fifo, buffers, nframes); + } else { + qjack_buffer_write_l(&c->fifo, buffers, nframes); + } + + return 0; +} + +static void qjack_port_registration(jack_port_id_t port, int reg, void *ar= g) +{ + if (reg) { + QJackClient *c =3D (QJackClient *)arg; + c->connect_ports =3D true; + } +} + +static int qjack_xrun(void *arg) +{ + QJackClient *c =3D (QJackClient *)arg; + if (c->state !=3D QJACK_STATE_RUNNING) { + return 0; + } + + qjack_buffer_clear(&c->fifo); + return 0; +} + +static void qjack_shutdown(void *arg) +{ + QJackClient *c =3D (QJackClient *)arg; + c->state =3D QJACK_STATE_SHUTDOWN; +} + +static void qjack_client_recover(QJackClient *c) +{ + if (c->state =3D=3D QJACK_STATE_SHUTDOWN) { + qjack_client_fini(c); + } + + /* packets is used simply to throttle this */ + if (c->state =3D=3D QJACK_STATE_DISCONNECTED && + c->packets % 100 =3D=3D 0) { + + /* if not finished then attempt to recover */ + if (!c->finished) { + dolog("attempting to reconnect to server\n"); + qjack_client_init(c); + } + } +} + +static size_t qjack_write(HWVoiceOut *hw, void *buf, size_t len) +{ + QJackOut *jo =3D (QJackOut *)hw; + ++jo->c.packets; + + if (jo->c.state !=3D QJACK_STATE_RUNNING) { + qjack_client_recover(&jo->c); + return len; + } + + qjack_client_connect_ports(&jo->c); + return qjack_buffer_write(&jo->c.fifo, buf, len); +} + +static size_t qjack_read(HWVoiceIn *hw, void *buf, size_t len) +{ + QJackIn *ji =3D (QJackIn *)hw; + ++ji->c.packets; + + if (ji->c.state !=3D QJACK_STATE_RUNNING) { + qjack_client_recover(&ji->c); + return len; + } + + qjack_client_connect_ports(&ji->c); + return qjack_buffer_read(&ji->c.fifo, buf, len); +} + +static void qjack_client_connect_ports(QJackClient *c) +{ + if (!c->connect_ports || !c->opt->connect_ports) { + return; + } + + c->connect_ports =3D false; + const char **ports; + ports =3D jack_get_ports(c->client, c->opt->connect_ports, NULL, + c->out ? JackPortIsInput : JackPortIsOutput); + + if (!ports) { + return; + } + + for (int i =3D 0; i < c->nchannels && ports[i]; ++i) { + const char *p =3D jack_port_name(c->port[i]); + if (jack_port_connected_to(c->port[i], ports[i])) { + continue; + } + + if (c->out) { + dolog("connect %s -> %s\n", p, ports[i]); + jack_connect(c->client, p, ports[i]); + } else { + dolog("connect %s -> %s\n", ports[i], p); + jack_connect(c->client, ports[i], p); + } + } +} + +static int qjack_client_init(QJackClient *c) +{ + jack_status_t status; + char client_name[jack_client_name_size()]; + jack_options_t options =3D JackNullOption; + + c->finished =3D false; + c->connect_ports =3D true; + + snprintf(client_name, sizeof(client_name), "%s-%s", + c->out ? "out" : "in", + c->opt->client_name ? c->opt->client_name : qemu_get_vm_name()); + + if (c->opt->exact_name) { + options |=3D JackUseExactName; + } + + if (!c->opt->start_server) { + options |=3D JackNoStartServer; + } + + if (c->opt->server_name) { + options |=3D JackServerName; + } + + c->client =3D jack_client_open(client_name, options, &status, + c->opt->server_name); + + if (c->client =3D=3D NULL) { + dolog("jack_client_open failed: status =3D 0x%2.0x\n", status); + if (status & JackServerFailed) { + dolog("unable to connect to JACK server\n"); + } + return -1; + } + + c->freq =3D jack_get_sample_rate(c->client); + + if (status & JackServerStarted) { + dolog("JACK server started\n"); + } + + if (status & JackNameNotUnique) { + dolog("JACK unique name assigned %s\n", + jack_get_client_name(c->client)); + } + + jack_set_process_callback(c->client, qjack_process , c); + jack_set_port_registration_callback(c->client, qjack_port_registration= , c); + jack_set_xrun_callback(c->client, qjack_xrun, c); + jack_on_shutdown(c->client, qjack_shutdown, c); + + /* + * ensure the buffersize is no smaller then 512 samples, some (all?) q= emu + * virtual devices do not work correctly otherwise + */ + if (c->buffersize < 512) { + c->buffersize =3D 512; + } + + /* create a 2 period buffer */ + qjack_buffer_create(&c->fifo, c->nchannels, c->buffersize * 2); + + /* allocate and register the ports */ + c->port =3D g_malloc(sizeof(jack_port_t *) * c->nchannels); + for (int i =3D 0; i < c->nchannels; ++i) { + + char port_name[16]; + snprintf( + port_name, + sizeof(port_name), + c->out ? "output %d" : "input %d", + i); + + c->port[i] =3D jack_port_register( + c->client, + port_name, + JACK_DEFAULT_AUDIO_TYPE, + c->out ? JackPortIsOutput : JackPortIsInput, + 0); + } + + /* activate the session */ + jack_activate(c->client); + c->buffersize =3D jack_get_buffer_size(c->client); + + qjack_client_connect_ports(c); + c->state =3D QJACK_STATE_RUNNING; + return 0; +} + +static int qjack_init_out(HWVoiceOut *hw, struct audsettings *as, + void *drv_opaque) +{ + QJackOut *jo =3D (QJackOut *)hw; + Audiodev *dev =3D (Audiodev *)drv_opaque; + + if (jo->c.state !=3D QJACK_STATE_DISCONNECTED) { + return 0; + } + + jo->c.out =3D true; + jo->c.nchannels =3D as->nchannels; + jo->c.opt =3D dev->u.jack.out; + int ret =3D qjack_client_init(&jo->c); + if (ret !=3D 0) { + return ret; + } + + /* report the buffer size to qemu */ + hw->samples =3D jo->c.buffersize; + + /* report the audio format we support */ + struct audsettings os =3D { + .freq =3D jo->c.freq, + .nchannels =3D jo->c.nchannels, + .fmt =3D AUDIO_FORMAT_F32, + .endianness =3D 0 + }; + audio_pcm_init_info(&hw->info, &os); + + dolog("JACK output configured for %dHz (%d samples)\n", + jo->c.freq, jo->c.buffersize); + + return 0; +} + +static int qjack_init_in(HWVoiceIn *hw, struct audsettings *as, + void *drv_opaque) +{ + QJackIn *ji =3D (QJackIn *)hw; + Audiodev *dev =3D (Audiodev *)drv_opaque; + + if (ji->c.state !=3D QJACK_STATE_DISCONNECTED) { + return 0; + } + + ji->c.out =3D false; + ji->c.nchannels =3D as->nchannels; + ji->c.opt =3D dev->u.jack.in; + int ret =3D qjack_client_init(&ji->c); + if (ret !=3D 0) { + return ret; + } + + /* report the buffer size to qemu */ + hw->samples =3D ji->c.buffersize; + + /* report the audio format we support */ + struct audsettings is =3D { + .freq =3D ji->c.freq, + .nchannels =3D ji->c.nchannels, + .fmt =3D AUDIO_FORMAT_F32, + .endianness =3D 0 + }; + audio_pcm_init_info(&hw->info, &is); + + dolog("JACK input configured for %dHz (%d samples)\n", + ji->c.freq, ji->c.buffersize); + + return 0; +} + +static void qjack_client_fini(QJackClient *c) +{ + switch (c->state) { + case QJACK_STATE_RUNNING: + /* fallthrough */ + + case QJACK_STATE_STOPPED: + for (int i =3D 0; i < c->nchannels; ++i) { + jack_port_unregister(c->client, c->port[i]); + } + jack_deactivate(c->client); + /* fallthrough */ + + case QJACK_STATE_SHUTDOWN: + jack_client_close(c->client); + /* fallthrough */ + + case QJACK_STATE_DISCONNECTED: + break; + } + + qjack_buffer_free(&c->fifo); + g_free(c->port); + + c->state =3D QJACK_STATE_DISCONNECTED; +} + +static void qjack_fini_out(HWVoiceOut *hw) +{ + QJackOut *jo =3D (QJackOut *)hw; + jo->c.finished =3D true; + qjack_client_fini(&jo->c); +} + +static void qjack_fini_in(HWVoiceIn *hw) +{ + QJackIn *ji =3D (QJackIn *)hw; + ji->c.finished =3D true; + qjack_client_fini(&ji->c); +} + +static void qjack_enable_out(HWVoiceOut *hw, bool enable) +{ +} + +static void qjack_enable_in(HWVoiceIn *hw, bool enable) +{ +} + +static int qjack_thread_creator(jack_native_thread_t *thread, + const pthread_attr_t *attr, void *(*function)(void *), void *arg) +{ + int ret =3D pthread_create(thread, attr, function, arg); + if (ret !=3D 0) { + return ret; + } + + /* set the name of the thread */ + pthread_setname_np(*thread, "jack-client"); + + return ret; +} + +static void *qjack_init(Audiodev *dev) +{ + assert(dev->driver =3D=3D AUDIODEV_DRIVER_JACK); + + dev->u.jack.has_in =3D false; + + return dev; +} + +static void qjack_fini(void *opaque) +{ +} + +static struct audio_pcm_ops jack_pcm_ops =3D { + .init_out =3D qjack_init_out, + .fini_out =3D qjack_fini_out, + .write =3D qjack_write, + .run_buffer_out =3D audio_generic_run_buffer_out, + .enable_out =3D qjack_enable_out, + + .init_in =3D qjack_init_in, + .fini_in =3D qjack_fini_in, + .read =3D qjack_read, + .enable_in =3D qjack_enable_in +}; + +static struct audio_driver jack_driver =3D { + .name =3D "jack", + .descr =3D "JACK Audio Connection Kit Client", + .init =3D qjack_init, + .fini =3D qjack_fini, + .pcm_ops =3D &jack_pcm_ops, + .can_be_default =3D 1, + .max_voices_out =3D INT_MAX, + .max_voices_in =3D INT_MAX, + .voice_size_out =3D sizeof(QJackOut), + .voice_size_in =3D sizeof(QJackIn) +}; + +static void qjack_error(const char *msg) +{ + dolog("E: %s\n", msg); +} + +static void qjack_info(const char *msg) +{ + dolog("I: %s\n", msg); +} + +static void register_audio_jack(void) +{ + audio_driver_register(&jack_driver); + jack_set_thread_creator(qjack_thread_creator); + jack_set_error_function(qjack_error); + jack_set_info_function(qjack_info); +} +type_init(register_audio_jack); diff --git a/audio/Makefile.objs b/audio/Makefile.objs index d7490a379f3e..b4a4c11f3122 100644 --- a/audio/Makefile.objs +++ b/audio/Makefile.objs @@ -28,3 +28,8 @@ common-obj-$(CONFIG_AUDIO_SDL) +=3D sdl.mo sdl.mo-objs =3D sdlaudio.o sdl.mo-cflags :=3D $(SDL_CFLAGS) sdl.mo-libs :=3D $(SDL_LIBS) + +# jack module +common-obj-$(CONFIG_AUDIO_JACK) +=3D jack.mo +jack.mo-objs =3D jackaudio.o +jack.mo-libs :=3D $(JACK_LIBS) diff --git a/qapi/audio.json b/qapi/audio.json index c31251f45b57..f62bd0d7f6ec 100644 --- a/qapi/audio.json +++ b/qapi/audio.json @@ -152,6 +152,55 @@ '*out': 'AudiodevPerDirectionOptions', '*latency': 'uint32' } } =20 +## +# @AudiodevJackPerDirectionOptions: +# +# Options of the JACK backend that are used for both playback and +# recording. +# +# @server-name: select from among several possible concurrent server insta= nces +# (default: environment variable $JACK_DEFAULT_SERVER if set, else "defaul= t") +# +# @client-name: the client name to use. The server will modify this name to +# create a unique variant, if needed unless @exact-name is true (default: = the +# guest's name) +# +# @connect-ports: if set, a regular expression of JACK client port name(s)= to +# monitor for and automatically connect to +# +# @start-server: start a jack server process if one is not already present +# (default: false) +# +# @exact-name: use the exact name requested otherwise JACK automatically +# generates a unique one, if needed (default: false) +# +# Since: 5.1 +## +{ 'struct': 'AudiodevJackPerDirectionOptions', + 'base': 'AudiodevPerDirectionOptions', + 'data': { + '*server-name': 'str', + '*client-name': 'str', + '*connect-ports': 'str', + '*start-server': 'bool', + '*exact-name': 'bool' } } + +## +# @AudiodevJackOptions: +# +# Options of the JACK audio backend. +# +# @in: options of the capture stream +# +# @out: options of the playback stream +# +# Since: 5.1 +## +{ 'struct': 'AudiodevJackOptions', + 'data': { + '*in': 'AudiodevJackPerDirectionOptions', + '*out': 'AudiodevJackPerDirectionOptions' } } + ## # @AudiodevOssPerDirectionOptions: # @@ -297,11 +346,13 @@ # # An enumeration of possible audio backend drivers. # +# @jack: JACK audio backend (since 5.1) +# # Since: 4.0 ## { 'enum': 'AudiodevDriver', - 'data': [ 'none', 'alsa', 'coreaudio', 'dsound', 'oss', 'pa', 'sdl', - 'spice', 'wav' ] } + 'data': [ 'none', 'alsa', 'coreaudio', 'dsound', 'jack', 'oss', 'pa', + 'sdl', 'spice', 'wav' ] } =20 ## # @Audiodev: @@ -327,6 +378,7 @@ 'alsa': 'AudiodevAlsaOptions', 'coreaudio': 'AudiodevCoreaudioOptions', 'dsound': 'AudiodevDsoundOptions', + 'jack': 'AudiodevJackOptions', 'oss': 'AudiodevOssOptions', 'pa': 'AudiodevPaOptions', 'sdl': 'AudiodevGenericOptions', --=20 2.18.4 From nobody Fri Nov 14 20:44:37 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590480114; cv=none; d=zohomail.com; s=zohoarc; b=EQ1ShPFZJ5a/AxViQ1+JHnwRyH3i/SoWUt8pkhE+RVioWOWs4QxvM1VvH64Xd7M9tVj6spREkTxPPEAmq0IO6Kb/IdKp4RI++4ToSa81vqk52Hykzxi0120te4wbLXJYdEqmXmwYSERkw1MMob1fu2O2tluZVlBHSKZAOrOwTsU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590480114; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ceuKaaK8VxDsRKmPx9fOojyazY5GYeQnwzsqN7EyL+U=; b=BECtYjU10PcSK040V6gLDYaqAoIThzpfsmdzolu2BkKfBXLhshtSM5vPlrXfh/ie4w2Er2d2wNxDErY1qc5nzS99aohWw/P9TrLWQWd4dZ4sxh5up+tCC1bXOACaSUYBsl4HIP+jn3NX23/C1dlAKZjl1TyKqN7vTsERLUnjerY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590480114205234.17296725243193; Tue, 26 May 2020 01:01:54 -0700 (PDT) Received: from localhost ([::1]:50192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdUX3-0003fz-0I for importer@patchew.org; Tue, 26 May 2020 04:01:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdUSH-00039J-AS for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:57 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:48104 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdUSG-0002sT-C1 for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:56 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-460-F5y16VB3ONqapqe9eu4Icg-1; Tue, 26 May 2020 03:56:47 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 95AC4107ACCD; Tue, 26 May 2020 07:56:46 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 540F76ED99; Tue, 26 May 2020 07:56:42 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 12AFD9DB0; Tue, 26 May 2020 09:56:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590479815; 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=ceuKaaK8VxDsRKmPx9fOojyazY5GYeQnwzsqN7EyL+U=; b=F7HQlrk4og1+PurcrHTkcCypXdexFwf+kTIyVDm/WdhtpE9f/oSHVmzt8f7H6si2SYy6mW C1kkPzSVzJIe0TUE9gdk4vA53TEmcdn0K4rAji/T+eL9Ez2DVljxV4szP9MvZ9Y5eqDko+ IRm6z8RlFliUgjHbI2GKLLrG1XRaNEg= X-MC-Unique: F5y16VB3ONqapqe9eu4Icg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 4/8] audio/mixeng: fix clang 10+ warning Date: Tue, 26 May 2020 09:56:35 +0200 Message-Id: <20200526075639.27949-5-kraxel@redhat.com> In-Reply-To: <20200526075639.27949-1-kraxel@redhat.com> References: <20200526075639.27949-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=205.139.110.120; envelope-from=kraxel@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/26 01:19:28 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Volker=20R=C3=BCmelin?= , Markus Armbruster , Aleksandar Markovic , Gerd Hoffmann , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Volker R=C3=BCmelin The code in CONV_NATURAL_FLOAT() and CLIP_NATURAL_FLOAT() seems to use the constant 2^31-0.5 to convert float to integer and back. But the float type lacks the required precision and the constant used for the conversion is 2^31. This is equiva- lent to a [-1.f, 1.f] <-> [INT32_MIN, INT32_MAX + 1] mapping. This patch explicitly writes down the used constant. The compiler generated code doesn't change. The constant 2^31 has an exact float representation and the clang 10 compiler stops complaining about an implicit int to float conversion with a changed value. A few notes: - The conversion of 1.f to INT32_MAX + 1 doesn't overflow. The type of the destination variable is int64_t. - At a later stage one of the clip_* functions in audio/mixeng_template.h limits INT32_MAX + 1 to the integer range. - The clip_natural_float_* functions in audio/mixeng.c convert INT32_MAX and INT32_MAX + 1 to 1.f. Buglink: https://bugs.launchpad.net/bugs/1878627 Signed-off-by: Volker R=C3=BCmelin Message-id: 20200523201712.23908-1-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann --- audio/mixeng.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/audio/mixeng.c b/audio/mixeng.c index 739a500449ce..924dcb858af5 100644 --- a/audio/mixeng.c +++ b/audio/mixeng.c @@ -271,11 +271,12 @@ f_sample *mixeng_clip[2][2][2][3] =3D { #define CONV_NATURAL_FLOAT(x) (x) #define CLIP_NATURAL_FLOAT(x) (x) #else -static const float float_scale =3D UINT_MAX / 2.f; +/* macros to map [-1.f, 1.f] <-> [INT32_MIN, INT32_MAX + 1] */ +static const float float_scale =3D (int64_t)INT32_MAX + 1; #define CONV_NATURAL_FLOAT(x) ((x) * float_scale) =20 #ifdef RECIPROCAL -static const float float_scale_reciprocal =3D 2.f / UINT_MAX; +static const float float_scale_reciprocal =3D 1.f / ((int64_t)INT32_MAX + = 1); #define CLIP_NATURAL_FLOAT(x) ((x) * float_scale_reciprocal) #else #define CLIP_NATURAL_FLOAT(x) ((x) / float_scale) --=20 2.18.4 From nobody Fri Nov 14 20:44:37 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590479870; cv=none; d=zohomail.com; s=zohoarc; b=ILAtHmQbVneqwpZDBMv7U9CSS89ZaE8QX2F0oDYmYLQw6J321Bo9htZxYhbKUG3EwQXHHX5OJRUPIhCuP0npCldtVF5aIKel8WjMiY55xog6q3K1pwKJFoL+ZfgPQul1CuWmNryxm1w1QcFTdeUzan2kzJeKoPvZuKoILNzIMWM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590479870; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Y8ddwg+s++ttioTNU7tIg5LAx1dAmXncXhQwk06rGsM=; b=mdV03WbACiXlWV6JpOf69kaUKSCtrK4BvCtVni+j0PSp87Jcn61Sr5FcIcsFuzni+HI24OxthmLDryFerA8MC9uMYfVoqvRkyjITf/4OFV6rkU4sdSNAMUSHLv6DhOp0Hc8Uk3rRg/9Om0Z0CTClyNE2D7spZGoKO4A8u0aJG38= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590479870086662.3043804942611; Tue, 26 May 2020 00:57:50 -0700 (PDT) Received: from localhost ([::1]:33538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdUT6-0004d7-Cd for importer@patchew.org; Tue, 26 May 2020 03:57:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdUSB-0002v9-8B for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:51 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:54691 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdUSA-0002rh-Fd for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:50 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-TgElYrxqPpuFr_--udHHgA-1; Tue, 26 May 2020 03:56:47 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A56751005510; Tue, 26 May 2020 07:56:46 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C0C110013D2; Tue, 26 May 2020 07:56:46 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 21DD19D54; Tue, 26 May 2020 09:56:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590479809; 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=Y8ddwg+s++ttioTNU7tIg5LAx1dAmXncXhQwk06rGsM=; b=LInLqpjT+w/1/Gl1r/nOvtbnpi5JXCcn/LJ1lhflxRv9VobP/mtSMTANzoUJDDOGdS95dm 69uYJ8T/9ycfkv0QylQYS0l9w3Q6Vr3RcQtMaSdesQp76deNQSrqvbKW6+LbkDn62bX1GM rsLzAduNwMYw26FXPxxkRd1rXv8yiSQ= X-MC-Unique: TgElYrxqPpuFr_--udHHgA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 5/8] audio: fix wavcapture segfault Date: Tue, 26 May 2020 09:56:36 +0200 Message-Id: <20200526075639.27949-6-kraxel@redhat.com> In-Reply-To: <20200526075639.27949-1-kraxel@redhat.com> References: <20200526075639.27949-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=207.211.31.120; envelope-from=kraxel@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/26 01:51:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster , Bruce Rogers , Aleksandar Markovic , Gerd Hoffmann , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bruce Rogers Commit 571a8c522e caused the HMP wavcapture command to segfault when processing audio data in audio_pcm_sw_write(), where a NULL sw->hw->pcm_ops is dereferenced. This fix checks that the pointer is valid before dereferincing it. A similar fix is also made in the parallel function audio_pcm_sw_read(). Fixes: 571a8c522e (audio: split ctl_* functions into enable_* and volume_*) Signed-off-by: Bruce Rogers Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200521172931.121903-1-brogers@suse.com Signed-off-by: Gerd Hoffmann --- audio/audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index 95d9fb16caa5..ce8c6dec5f47 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -649,7 +649,7 @@ static size_t audio_pcm_sw_read(SWVoiceIn *sw, void *bu= f, size_t size) total +=3D isamp; } =20 - if (!hw->pcm_ops->volume_in) { + if (hw->pcm_ops && !hw->pcm_ops->volume_in) { mixeng_volume (sw->buf, ret, &sw->vol); } =20 @@ -736,7 +736,7 @@ static size_t audio_pcm_sw_write(SWVoiceOut *sw, void *= buf, size_t size) if (swlim) { sw->conv (sw->buf, buf, swlim); =20 - if (!sw->hw->pcm_ops->volume_out) { + if (sw->hw->pcm_ops && !sw->hw->pcm_ops->volume_out) { mixeng_volume (sw->buf, swlim, &sw->vol); } } --=20 2.18.4 From nobody Fri Nov 14 20:44:37 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590480116; cv=none; d=zohomail.com; s=zohoarc; b=UwpiXj87GGu7nqPEidisZ6FRgi2wA0SK6vZo7yNlGDPhiGa0KEGcIOos8KYxeAuBJ75PzyVUQuXV58VTu/YgcVuDy6SloSUc/DYJJkkxLTfpIp02as3yP6CzSHlemMFogb+/bOtDL86xanpBmRNyBwGADnnB1xMaVACErjCmXVM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590480116; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=E1sY3mfx2Yw13wW91prCp33esF3YrPFcDUbzCOeiRVM=; b=HfZ6cgnwZCWstpZZCn/8wt7c9LacshMS7eAdMKr5mPwQlEkj6/7jTrNZCQFN9cW1jDCvdKa/TpTa91wFN00It7M6Sk7BvHwLbtLx9Vtjy4hrl9drYWE5hoN9QM1yGmYX51r43tf2LZuex7r3vTcjQZqwJPvSIXh3b/3ogtBFzis= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590480116519770.7777168096372; Tue, 26 May 2020 01:01:56 -0700 (PDT) Received: from localhost ([::1]:50230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdUX5-0003h4-BG for importer@patchew.org; Tue, 26 May 2020 04:01:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdUSH-00039w-IE for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:57 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:22477 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdUSG-0002sW-MK for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:57 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-378-yv8EQpzZP8C5Gc4IYjRzUA-1; Tue, 26 May 2020 03:56:51 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9E4E0800053; Tue, 26 May 2020 07:56:50 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D89779C45; Tue, 26 May 2020 07:56:46 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2C0029D55; Tue, 26 May 2020 09:56:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590479816; 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=E1sY3mfx2Yw13wW91prCp33esF3YrPFcDUbzCOeiRVM=; b=edskdfxLOB3uxGanp6zGWghCog9uKNsQ0W4SxlHtwDdTQxwXpebVNekOqTZPM70bUaVBSW yXHSZDVTBa1H7jtUNdkpjq5204JQiUid/EV7W64896xuXZy430WnadyzdThd0lcluDJcQS X50tUHDayIcn+5ntMv9eHDAMqsuHTeo= X-MC-Unique: yv8EQpzZP8C5Gc4IYjRzUA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 6/8] audio: Let audio_sample_to_uint64() use const samples argument Date: Tue, 26 May 2020 09:56:37 +0200 Message-Id: <20200526075639.27949-7-kraxel@redhat.com> In-Reply-To: <20200526075639.27949-1-kraxel@redhat.com> References: <20200526075639.27949-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=205.139.110.120; envelope-from=kraxel@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/26 01:19:28 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Gerd Hoffmann , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 The samples are the input to convert to u64. As we should not modify them, mark the argument const. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200505132603.8575-2-f4bug@amsat.org> Signed-off-by: Gerd Hoffmann --- audio/audio.h | 2 +- audio/mixeng.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/audio/audio.h b/audio/audio.h index 0db3c7dd5e06..f27a12298fe5 100644 --- a/audio/audio.h +++ b/audio/audio.h @@ -163,7 +163,7 @@ int wav_start_capture(AudioState *state, CaptureState *= s, const char *path, bool audio_is_cleaning_up(void); void audio_cleanup(void); =20 -void audio_sample_to_uint64(void *samples, int pos, +void audio_sample_to_uint64(const void *samples, int pos, uint64_t *left, uint64_t *right); void audio_sample_from_uint64(void *samples, int pos, uint64_t left, uint64_t right); diff --git a/audio/mixeng.c b/audio/mixeng.c index 924dcb858af5..f27deb165b67 100644 --- a/audio/mixeng.c +++ b/audio/mixeng.c @@ -339,10 +339,10 @@ f_sample *mixeng_clip_float[2] =3D { clip_natural_float_from_stereo, }; =20 -void audio_sample_to_uint64(void *samples, int pos, +void audio_sample_to_uint64(const void *samples, int pos, uint64_t *left, uint64_t *right) { - struct st_sample *sample =3D samples; + const struct st_sample *sample =3D samples; sample +=3D pos; #ifdef FLOAT_MIXENG error_report( --=20 2.18.4 From nobody Fri Nov 14 20:44:37 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590479999; cv=none; d=zohomail.com; s=zohoarc; b=hyNezwqF7kJCpeAdQ115uqX/+Kw0+pkKCeJlXUlfuihs4KK9MYux62BmtkBNX//GycQhdsN9Sa9g4M/f8DXkmYao2NE+3aHp/tRd9nxa6SC0Z85C181vk+XA/kpXrn/x1WKPYC9oo5T5Ccu4A7qLuwiMKB4zz2Bk9Zv+TcAEO4Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590479999; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nAnIFVMBOy0omXP3sWTo/UUsmM8hMwNCz8GOBpVX8+g=; b=fFefj9Hg7u62HgOIajEB9A7NwGKJOd2PWeDhAeAQVbz/w0iqlUzQrqd+Dd6pS/R+ZCbkmA8VSV7idqZjzxnbf0jHiF8XeknkbRES7NGOFPWC87U0MtfDD+uyYoPBbryix3G86628yTvXE0IXGgDXFQ9SPygCyePcp/XlA33deg0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590479999697330.241056305783; Tue, 26 May 2020 00:59:59 -0700 (PDT) Received: from localhost ([::1]:42310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdUVB-0008Aw-0M for importer@patchew.org; Tue, 26 May 2020 03:59:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdUSE-00031u-Iy for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:54 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:59993 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdUSD-0002sB-Or for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:54 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-278-oZZMjt7DMzm9A91HeOg_zQ-1; Tue, 26 May 2020 03:56:48 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 97AD918C35A0; Tue, 26 May 2020 07:56:47 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38E675C1BB; Tue, 26 May 2020 07:56:47 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 37EC59D56; Tue, 26 May 2020 09:56:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590479812; 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=nAnIFVMBOy0omXP3sWTo/UUsmM8hMwNCz8GOBpVX8+g=; b=GK6CzKoyQN05ZA7DuWXkzwWEVDQOEdaxYnHgRwOF9eqffnEFq99LYWO7F11YA119Q8dkRb dt29si0++AdH+WV25c4WfihkVpfNrnOam0Yok8UMQ0tW7qbHfYoeaz8g1xJz948CRoeR0H 2lvCVdN2yXz/ea20gEWLgbp28vYqfkI= X-MC-Unique: oZZMjt7DMzm9A91HeOg_zQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 7/8] audio: Let capture_callback handler use const buffer argument Date: Tue, 26 May 2020 09:56:38 +0200 Message-Id: <20200526075639.27949-8-kraxel@redhat.com> In-Reply-To: <20200526075639.27949-1-kraxel@redhat.com> References: <20200526075639.27949-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=205.139.110.61; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/26 01:14:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Gerd Hoffmann , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 The buffer is the captured input to pass to backends. As we should not modify it, mark the argument const. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200505132603.8575-3-f4bug@amsat.org> Signed-off-by: Gerd Hoffmann --- audio/audio.h | 2 +- audio/wavcapture.c | 2 +- ui/vnc.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/audio/audio.h b/audio/audio.h index f27a12298fe5..b883ebfb1f8e 100644 --- a/audio/audio.h +++ b/audio/audio.h @@ -60,7 +60,7 @@ typedef enum { =20 struct audio_capture_ops { void (*notify) (void *opaque, audcnotification_e cmd); - void (*capture) (void *opaque, void *buf, int size); + void (*capture) (void *opaque, const void *buf, int size); void (*destroy) (void *opaque); }; =20 diff --git a/audio/wavcapture.c b/audio/wavcapture.c index 8d7ce2eda145..17e87ed6f45e 100644 --- a/audio/wavcapture.c +++ b/audio/wavcapture.c @@ -71,7 +71,7 @@ static void wav_destroy (void *opaque) g_free (wav->path); } =20 -static void wav_capture (void *opaque, void *buf, int size) +static void wav_capture(void *opaque, const void *buf, int size) { WAVState *wav =3D opaque; =20 diff --git a/ui/vnc.c b/ui/vnc.c index 1d7138a3a073..12a12714e129 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1177,7 +1177,7 @@ static void audio_capture_destroy(void *opaque) { } =20 -static void audio_capture(void *opaque, void *buf, int size) +static void audio_capture(void *opaque, const void *buf, int size) { VncState *vs =3D opaque; =20 --=20 2.18.4 From nobody Fri Nov 14 20:44:37 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590479878; cv=none; d=zohomail.com; s=zohoarc; b=gEZqbBcbI7EFG0D3atAzijBBvXuPtU+bgfuGJUIjIhCo257qsvyist+0nKatULnKEZGXWrJYr2MIIBIrfV7mz9QBIRM8kly19pQ6RBhiDTrCBzRM1SsV0jN56xbTlv5DYu8mp2+Tn5aBmnZcZwotg5mCjSkVPCUuSaN3SaoSd9g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590479878; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oOUkV/qUnXrfrNOGAgJYl2APppkkiRofTcffne67/Lk=; b=i4jy1QBlufU96Ss/M8rDzbi7pbLELhqWbbeuMfEsUCgLkT77J84poA1CheL339x6CSLFm74hjYanOQrjkHV0KApMCHPHr6ZuVRuJzH92FusEQ2HuVPoFSBPtAZ7fuh8UEEA19gqqF8chR8om+3YADwy7PNNqSF0jMmDY72F+cJc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590479878479576.8865669686761; Tue, 26 May 2020 00:57:58 -0700 (PDT) Received: from localhost ([::1]:34570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdUTF-00051l-81 for importer@patchew.org; Tue, 26 May 2020 03:57:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdUSI-0003BX-3y for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:58 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:38446 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdUSG-0002sZ-PK for qemu-devel@nongnu.org; Tue, 26 May 2020 03:56:57 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-290-USHyAsVIP9CNH1X7phLk6Q-1; Tue, 26 May 2020 03:56:51 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AD77E1005512; Tue, 26 May 2020 07:56:50 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4722E5D9E5; Tue, 26 May 2020 07:56:46 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 412F39D57; Tue, 26 May 2020 09:56:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590479816; 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=oOUkV/qUnXrfrNOGAgJYl2APppkkiRofTcffne67/Lk=; b=XlsjWaKyO0zmheKeg0TVZrpIQjQ4IseL+YlSVntRvpKnuqPAj/vrj8DfHocBDRYG97gPWn P/7tQaRicYrBHSEkj7IEPDtlI18cxqFICadaTzRbXCrjJ3CkuJcEE8cWnOrtwk8aHyh+Fz wOAeUBovHZ1y24RTAdnatLV8FA5ZKNM= X-MC-Unique: USHyAsVIP9CNH1X7phLk6Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 8/8] hw/mips/mips_fulong2e: Remove unused 'audio/audio.h' include Date: Tue, 26 May 2020 09:56:39 +0200 Message-Id: <20200526075639.27949-9-kraxel@redhat.com> In-Reply-To: <20200526075639.27949-1-kraxel@redhat.com> References: <20200526075639.27949-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=205.139.110.61; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/26 01:14:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Gerd Hoffmann , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 The Fuloong machine never had to use "audio/audio.h", remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Huacai Chen Message-id: 20200515084209.9419-1-f4bug@amsat.org Signed-off-by: Gerd Hoffmann --- hw/mips/mips_fulong2e.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index ef02d54b335c..05b9efa516cf 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -33,7 +33,6 @@ #include "hw/mips/mips.h" #include "hw/mips/cpudevs.h" #include "hw/pci/pci.h" -#include "audio/audio.h" #include "qemu/log.h" #include "hw/loader.h" #include "hw/ide/pci.h" --=20 2.18.4