From nobody Mon Feb 9 12:04:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1566169992; cv=none; d=zoho.com; s=zohoarc; b=HI43EF+jcoNg1R/SPqGa3sl9lgJi5GtxpqY8P6dXhZrtnS1BO+O7XZ21qNpfM1olYnhoLTIbDzCxpOckm8VaFv4abAOfb/iDCvxSJu9DY8J0OjaEBNBIpBxjXuJn+ere6RfsCCAJdBgK/KkRgfWjiyhRLmpwotC7DqITgp6TYcQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566169992; 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:ARC-Authentication-Results; bh=MC5OBi2ZKOOmkFl5C2VVnsgxIzYWjfoInmdM2v3Cze8=; b=fMHCiYsPHCSKXnJbDU5RxxmQXhcoTjaZIVcbdTP17qfxHvB7FZaRz25MZUAh7JdPC4/g+rhtYrZRDUXDVKRxhn/kEUzpTN0dmUfOms9sVM1CnRykf843TxYaIrze82IfSnKWiwSq8MENKHNkLbcT7OpHuCvEmFKRPkIyOAl5V70= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1566169992367827.8666970476677; Sun, 18 Aug 2019 16:13:12 -0700 (PDT) Received: from localhost ([::1]:43546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzUMH-0004Pf-0r for importer@patchew.org; Sun, 18 Aug 2019 19:13:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49702) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzUGR-0006Rw-KB for qemu-devel@nongnu.org; Sun, 18 Aug 2019 19:07:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzUGQ-0005I5-G5 for qemu-devel@nongnu.org; Sun, 18 Aug 2019 19:07:07 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:56227) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hzUGQ-0005HY-9w for qemu-devel@nongnu.org; Sun, 18 Aug 2019 19:07:06 -0400 Received: by mail-wm1-x342.google.com with SMTP id f72so3532wmf.5 for ; Sun, 18 Aug 2019 16:07:06 -0700 (PDT) Received: from nullptr.home.dirty-ice.org (2a01-036c-0113-49c9-0000-0000-0000-0005.pool6.digikabel.hu. [2a01:36c:113:49c9::5]) by smtp.gmail.com with ESMTPSA id c15sm33657152wrb.80.2019.08.18.16.07.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Aug 2019 16:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MC5OBi2ZKOOmkFl5C2VVnsgxIzYWjfoInmdM2v3Cze8=; b=UsuOOaXmTczy80F8wbUoqzhQiUICFu75SELHegUHSzSKOkm3Uxx5oAj15CvCUuQ9xn 8wXRs3XmcijEPnzlA7R+Ktk/TE7e/y4kfwqPbKXqNxKHueqM7zwRVeL/EQbvehXZ2lF9 V8Jrzsh6jV8UtlXlJDl4ypnI8H/fRpBDbWZsBFetnEzij4RdnnayI+aie7aPsBEQQMT3 kdMSUG/diphhFFwM361wVmAQzU4fxybN0bm0X2oK9m7ejG8bZ/jWXsyqbr4Tv+U5phuQ BP7M40x6XLjgjo17alSzc2isTc0zcUlAz71WX33Id7InXwmKi6u9ZxMFCsYsSSVPReyY RPgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MC5OBi2ZKOOmkFl5C2VVnsgxIzYWjfoInmdM2v3Cze8=; b=LmqSshWS/LFtjjVA4Y4OxuEoWa7dyiV8GwwAqZ3OVVq0W2uykDThKksEJf0SjaocEh acYDsLe/VqphgzdPISdlUHofL3U+dPZdtTb0t9HhxJgo956Y0o1hmodTGNPXgken9W1d fsVdXS+bh563e921wYBxyTKLUsbiJDr27W799yInz54FFNBR33yLxY5QNfOcCVXaelBv W6lBGBQKKxbKKEWJ1In7JMeqARYARsWx4VSRh6KX8EXc769eqYz64OHAS5uIPycsftSs Vu45lWVbDwFM4pR9JBzAfqESqESw5w7F9hD0MsnExrU/hbI4+4LYrQBMiJ0ig29+MkTj fzPw== X-Gm-Message-State: APjAAAXtXLcRtZwJznSD98mmtV/CsuYmb2gKnXCazWqKFnLmZGUybokP g0Is3/rAUzipgnfwQmTj8KLJy4ib X-Google-Smtp-Source: APXvYqzn2YOp7nH//zWfPOO/oGy0czHT7HY+tAkV12V+YD/enBcYLtAZCsUaWsbCT00vL+FmvvEtPw== X-Received: by 2002:a1c:a852:: with SMTP id r79mr16366961wme.36.1566169625207; Sun, 18 Aug 2019 16:07:05 -0700 (PDT) From: "=?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?=" X-Google-Original-From: =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= To: qemu-devel@nongnu.org Date: Mon, 19 Aug 2019 01:06:51 +0200 Message-Id: <9072b955acffda13976bca7b61f86d7f708c9269.1566168923.git.DirtY.iCE.hu@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PATCH v4 06/14] audio: audiodev= parameters no longer optional when -audiodev present 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This means you should probably stop using -soundhw (as it doesn't allow you to specify any options) and add the device manually with -device. The exception is pcspk, it's currently not possible to manually add it. To use it with audiodev, use something like this: -audiodev id=3Dfoo,... -global isa-pcspk.audiodev=3Dfoo -soundhw pcspk Signed-off-by: K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n --- Notes: Changes from v1: =20 * Split off paaudio changes to a different commit. audio/audio.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index 8e9ccd0ac4..7267cab9d7 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -101,6 +101,8 @@ const struct mixeng_volume nominal_volume =3D { #endif }; =20 +static bool legacy_config =3D true; + #ifdef AUDIO_IS_FLAWLESS_AND_NO_CHECKS_ARE_REQURIED #error No its not #else @@ -1392,7 +1394,7 @@ static AudiodevListEntry *audiodev_find( * if dev =3D=3D NULL =3D> legacy implicit initialization, return the alre= ady created * state or create a new one */ -static AudioState *audio_init(Audiodev *dev) +static AudioState *audio_init(Audiodev *dev, const char *name) { static bool atexit_registered; size_t i; @@ -1406,12 +1408,13 @@ static AudioState *audio_init(Audiodev *dev) =20 if (dev) { /* -audiodev option */ + legacy_config =3D false; drvname =3D AudiodevDriver_str(dev->driver); } else if (!QTAILQ_EMPTY(&audio_states)) { - /* - * todo: check for -audiodev once we have normal audiodev selection - * support - */ + if (!legacy_config) { + dolog("You must specify an audiodev=3D for the device %s\n", n= ame); + exit(1); + } return QTAILQ_FIRST(&audio_states); } else { /* legacy implicit initialization */ @@ -1518,7 +1521,7 @@ void audio_free_audiodev_list(AudiodevListHead *head) void AUD_register_card (const char *name, QEMUSoundCard *card) { if (!card->state) { - card->state =3D audio_init(NULL); + card->state =3D audio_init(NULL, name); } =20 card->name =3D g_strdup (name); @@ -1544,8 +1547,11 @@ CaptureVoiceOut *AUD_add_capture( struct capture_callback *cb; =20 if (!s) { - /* todo: remove when we have normal audiodev selection support */ - s =3D audio_init(NULL); + if (!legacy_config) { + dolog("You must specify audiodev when trying to capture\n"); + return NULL; + } + s =3D audio_init(NULL, NULL); } =20 if (audio_validate_settings (as)) { @@ -1776,7 +1782,7 @@ void audio_init_audiodevs(void) AudiodevListEntry *e; =20 QSIMPLEQ_FOREACH(e, &audiodevs, next) { - audio_init(e->dev); + audio_init(e->dev, NULL); } } =20 --=20 2.22.0