From nobody Sun Feb 8 06:54:19 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1622708364; cv=none; d=zohomail.com; s=zohoarc; b=AeogjWWdIPlN6ZuQ+iandrjPMp4fAOM/n++PH4x4xs9F8tw1mg/WY50loneUYTpJWtou9YsB94jwhTpBYFLlPVw0q/ecBbnypN+IXzqr6NvWqh5JJ45/KtlE3adUoYZQWSJUAJ5bOWXNBii/wTgyvswBOwU1eMpruMAMafZjn6o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622708364; h=Content-Type:Content-Transfer-Encoding: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=D1ZKhNdyRkAaEd8JllzncpkQ2So1CGDaTn2vApPOjhU=; b=jJ5rcJ+8+rPl+zhI/ZT6S9HkkSQtLRTj/bddG9LDgwfjq/YzZzMfKB7ddtAxFUo50FcaPe57CfpgAfs8ItWU6LigRk2YVgYkdi9dbTDDpCnYnHapmJ0Blrl8NiplXzgN7jfDwXxsr0YLboSRPSGcy5DblEcCRMKq4k/wMGaz5rQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1622708364215512.3806648585577; Thu, 3 Jun 2021 01:19:24 -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-545-ofyoMrIGPxyfR8uny2SRyw-1; Thu, 03 Jun 2021 04:19:20 -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 6322F8042A9; Thu, 3 Jun 2021 08:19: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 34085163F0; Thu, 3 Jun 2021 08:19: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 7489044A5C; Thu, 3 Jun 2021 08:19:13 +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 1538IpP9024215 for ; Thu, 3 Jun 2021 04:18:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 08B65163D1; Thu, 3 Jun 2021 08:18:51 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-71.ams2.redhat.com [10.36.112.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 045C7163C2; Thu, 3 Jun 2021 08:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622708363; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=D1ZKhNdyRkAaEd8JllzncpkQ2So1CGDaTn2vApPOjhU=; b=C4cdPkNcS1ffEIboT+U53HEJVjQWvlMYv1FJfCvx4W5O47kek+jf2ZbWxn51K5Nxuk6U4k oy425e8BQWgzy8IMMpFLl4YhtSOzHNRD8yKgOxnk3hfY0fXNOC2KsrrtSwRTePrWLVXAAO rQPAmv+EWMKEpfarl/IJh4adXFvmEQM= X-MC-Unique: ofyoMrIGPxyfR8uny2SRyw-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] qemu: wire up support for timer period audio setting Date: Thu, 3 Jun 2021 09:18:43 +0100 Message-Id: <20210603081843.470330-3-berrange@redhat.com> In-Reply-To: <20210603081843.470330-1-berrange@redhat.com> References: <20210603081843.470330-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Closes: https://gitlab.com/libvirt/libvirt/-/issues/171 Signed-off-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_command.c | 8 ++++++++ tests/qemuxml2argvdata/audio-alsa-best.args | 1 + tests/qemuxml2argvdata/audio-alsa-best.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/audio-alsa-best.xml | 2 +- tests/qemuxml2argvdata/audio-coreaudio-best.args | 1 + .../audio-coreaudio-best.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/audio-coreaudio-best.xml | 2 +- tests/qemuxml2argvdata/audio-file-best.args | 1 + tests/qemuxml2argvdata/audio-file-best.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/audio-file-best.xml | 2 +- tests/qemuxml2argvdata/audio-none-best.args | 1 + tests/qemuxml2argvdata/audio-none-best.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/audio-none-best.xml | 2 +- tests/qemuxml2argvdata/audio-oss-best.args | 1 + tests/qemuxml2argvdata/audio-oss-best.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/audio-oss-best.xml | 2 +- tests/qemuxml2argvdata/audio-pulseaudio-best.args | 1 + .../audio-pulseaudio-best.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/audio-pulseaudio-best.xml | 2 +- tests/qemuxml2argvdata/audio-sdl-best.args | 1 + tests/qemuxml2argvdata/audio-sdl-best.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/audio-sdl-best.xml | 2 +- tests/qemuxml2argvdata/audio-spice-best.args | 1 + .../qemuxml2argvdata/audio-spice-best.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/audio-spice-best.xml | 2 +- 25 files changed, 32 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 4ed82ed570..7834fc2130 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7602,6 +7602,10 @@ qemuBuildAudioCommandLineArg(virCommand *cmd, def->id, qemuAudioDriverTypeToString(def->type)); =20 + if (def->timerPeriod) + virBufferAsprintf(&buf, ",timer-period=3D%u", + def->timerPeriod); + qemuBuildAudioCommonArg(&buf, "in", &def->input); qemuBuildAudioCommonArg(&buf, "out", &def->output); =20 @@ -7791,6 +7795,10 @@ qemuBuildAudioCommandLineEnv(virCommand *cmd, virCommandAddEnvPair(cmd, "QEMU_AUDIO_DRV", qemuAudioDriverTypeToString(audio->type)); =20 + if (audio->timerPeriod) + virCommandAddEnvFormat(cmd, "QEMU_AUDIO_TIMER_PERIOD=3D%u", + audio->timerPeriod); + qemuBuildAudioCommonEnv(cmd, "QEMU_AUDIO_ADC_", &audio->input); qemuBuildAudioCommonEnv(cmd, "QEMU_AUDIO_DAC_", &audio->output); =20 diff --git a/tests/qemuxml2argvdata/audio-alsa-best.args b/tests/qemuxml2ar= gvdata/audio-alsa-best.args index 6db6d3739f..89b0faed0d 100644 --- a/tests/qemuxml2argvdata/audio-alsa-best.args +++ b/tests/qemuxml2argvdata/audio-alsa-best.args @@ -7,6 +7,7 @@ XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ QEMU_AUDIO_DRV=3Dalsa \ +QEMU_AUDIO_TIMER_PERIOD=3D50 \ QEMU_AUDIO_ADC_FIXED_SETTINGS=3Don \ QEMU_AUDIO_ADC_VOICES=3D1 \ QEMU_AUDIO_ADC_FIXED_FREQ=3D44100 \ diff --git a/tests/qemuxml2argvdata/audio-alsa-best.x86_64-latest.args b/te= sts/qemuxml2argvdata/audio-alsa-best.x86_64-latest.args index 9a4456e908..0fd84746db 100644 --- a/tests/qemuxml2argvdata/audio-alsa-best.x86_64-latest.args +++ b/tests/qemuxml2argvdata/audio-alsa-best.x86_64-latest.args @@ -30,6 +30,6 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -blockdev '{"driver":"host_cdrom","filename":"/dev/cdrom","node-name":"lib= virt-1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw"= ,"file":"libvirt-1-storage"}' \ -device ide-cd,bus=3Dide.1,unit=3D0,drive=3Dlibvirt-1-format,id=3Dide0-1-0= ,bootindex=3D1 \ --audiodev id=3Daudio1,driver=3Dalsa,in.mixing-engine=3Don,in.fixed-setting= s=3Don,in.voices=3D1,in.frequency=3D44100,in.channels=3D2,in.format=3Ds16,o= ut.mixing-engine=3Don,out.fixed-settings=3Don,out.voices=3D2,out.frequency= =3D22050,out.channels=3D4,out.format=3Df32,in.dev=3D/dev/dsp0,out.dev=3D/de= v/dsp1 \ +-audiodev id=3Daudio1,driver=3Dalsa,timer-period=3D50,in.mixing-engine=3Do= n,in.fixed-settings=3Don,in.voices=3D1,in.frequency=3D44100,in.channels=3D2= ,in.format=3Ds16,out.mixing-engine=3Don,out.fixed-settings=3Don,out.voices= =3D2,out.frequency=3D22050,out.channels=3D4,out.format=3Df32,in.dev=3D/dev/= dsp0,out.dev=3D/dev/dsp1 \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/audio-alsa-best.xml b/tests/qemuxml2arg= vdata/audio-alsa-best.xml index 1a6d5f4d9f..8fe7b2fe88 100644 --- a/tests/qemuxml2argvdata/audio-alsa-best.xml +++ b/tests/qemuxml2argvdata/audio-alsa-best.xml @@ -30,7 +30,7 @@ -