From nobody Fri Nov 14 19:25:41 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589553383; cv=none; d=zohomail.com; s=zohoarc; b=Z5pcUqtBfcv2uZOexKH8+BppF7pc5DzqNZGRHG2Ptz6hf3xlr/ooPDMvTEX3pyoV9DBhSU+hYMCqfzjg8Xhdw+LVAZQYD2/UPyjzX57xqIFJltjCAQyxhSZtbYUkJIQ4YbTn60AqE8Qap1g6QTxbq/xGsF15RNNJ+YekxA+FiYM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589553383; 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=NmdaC9JHs/YHm3neHDthQeJiGoa6Z8QbY6Dv0VNSyec=; b=EvfIjFmYdDQJlYXE5UMmoJ4ny6AlURBlR4/DQbeUa8SllROLGGWyGWUrV+jR1lMY7EybAbTYalpNoOrHzM8nrt0i4iciI+R/u1YdRkWHT2n4SCWbpRcnw6I2zDYTubQhTZFZ4AQth9nqMP48Mofakt3bFMzfsDqRQyVtQ4fWu78= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1589553383221191.46680730854337; Fri, 15 May 2020 07:36:23 -0700 (PDT) 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-kOA2M93nNv220JELFPJ3Yg-1; Fri, 15 May 2020 10:36:19 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 967D380B72A; Fri, 15 May 2020 14:36:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 748A22E17A; Fri, 15 May 2020 14:36:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 486D34E9FA; Fri, 15 May 2020 14:36:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 04FEZfaF004877 for ; Fri, 15 May 2020 10:35:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 41C4F2E187; Fri, 15 May 2020 14:35:41 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-115-145.ams2.redhat.com [10.36.115.145]) by smtp.corp.redhat.com (Postfix) with ESMTP id E6ED22E16D; Fri, 15 May 2020 14:35:40 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 43B349D59; Fri, 15 May 2020 16:35:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589553381; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NmdaC9JHs/YHm3neHDthQeJiGoa6Z8QbY6Dv0VNSyec=; b=fgYc+xbyxdmnM7pGt7IIbrYb5s0PlZRPLhisG/NrwE8JWz2x0JPNWnHtp+RCB0Wh1Vp35z dXRm1BMixRaHyiks5InX1NcASz2BP+kAiQMaVIP6YM3WXStMla9viRRPNuJUdk/fg1bxxc qbGFjDixwf4OOAN9qYbwubLuRII5wHU= X-MC-Unique: kOA2M93nNv220JELFPJ3Yg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 13/13] [RFC] audio: try use onboard audiodev for pcspk Date: Fri, 15 May 2020 16:35:28 +0200 Message-Id: <20200515143528.13591-14-kraxel@redhat.com> In-Reply-To: <20200515143528.13591-1-kraxel@redhat.com> References: <20200515143528.13591-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, Paolo Bonzini , Eduardo Habkost , Gerd Hoffmann X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" New naming convention: Use "onboard" audiodev for onboard audio devices, using "-audiodev pa,id=3Donboard" for example. This patchs implements it for pcspk, it will try to use "onboard" by default. Setting another name using "-global pcspk.audiodev=3D" continues to work. If we want go this route we should do the same for other onboard audio devices too (arm boards, ...). Signed-off-by: Gerd Hoffmann --- hw/audio/pcspk.c | 3 +++ docs/system/deprecated.rst | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c index ab290e686783..9a08e9d8e05b 100644 --- a/hw/audio/pcspk.c +++ b/hw/audio/pcspk.c @@ -190,6 +190,9 @@ static void pcspk_realizefn(DeviceState *dev, Error **e= rrp) =20 isa_register_ioport(isadev, &s->ioport, s->iobase); =20 + if (!s->card.state) { + s->card.state =3D audio_state_by_name("onboard"); + } if (s->card.state) { pcspk_audio_init(s); } diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 7de1045b7e27..34312fc0a963 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -94,8 +94,8 @@ Creating sound card devices using ``-soundhw`` (since 5.1) Sound card devices should be created using ``-device`` instead. The names are the same for most devices. The exceptions are ``hda`` which needs two devices (``-device intel-hda --device hda-duplex``) and -``pcspk`` which can be activated using ``-global -pcspk.audiodev=3D``. +``pcspk`` which can be activated by creating an audiodev named +``onboard``. =20 ``-mon ...,control=3Dreadline,pretty=3Don|off`` (since 4.1) ''''''''''''''''''''''''''''''''''''''''''''''''''''''' --=20 2.18.4