[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/18] audio: Require AudioState in AUD_add_capture
From: |
Martin Kletzander |
Subject: |
[PATCH 14/18] audio: Require AudioState in AUD_add_capture |
Date: |
Mon, 25 Apr 2022 10:21:57 +0200 |
Since all callers require a valid audiodev this function can now safely
abort in case of missing AudioState.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
---
audio/audio.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/audio/audio.c b/audio/audio.c
index b95aca444382..97eb645764c1 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1855,10 +1855,8 @@ CaptureVoiceOut *AUD_add_capture(
struct capture_callback *cb;
if (!s) {
- if (!legacy_config) {
- dolog("Capturing without setting an audiodev is deprecated\n");
- }
- s = audio_init(NULL, NULL);
+ error_setg(&error_abort,
+ "Capturing without setting an audiodev is not supported");
}
if (!audio_get_pdo_out(s->dev)->mixing_engine) {
--
2.35.1
- Re: [PATCH 03/18] hw/audio: Simplify hda audio init, (continued)
- [PATCH 01/18] hw/audio: Remove -soundhw support, Martin Kletzander, 2022/04/25
- [PATCH 10/18] hw/input/tsc210x.c: Support machine-default audiodev with fallback, Martin Kletzander, 2022/04/25
- [PATCH 08/18] audio: Add easy dummy audio initialiser, Martin Kletzander, 2022/04/25
- [PATCH 07/18] Introduce machine's default-audiodev property, Martin Kletzander, 2022/04/25
- [PATCH 14/18] audio: Require AudioState in AUD_add_capture,
Martin Kletzander <=
- [PATCH 05/18] tests/qtest: Specify audiodev= and -audiodev, Martin Kletzander, 2022/04/25
- [PATCH 18/18] audio/spiceaudio: Fail initialisation when not using spice, Martin Kletzander, 2022/04/25
- Re: [PATCH 00/18] RFC: Remove deprecated audio features, Mark Cave-Ayland, 2022/04/25
- Re: [PATCH 00/18] RFC: Remove deprecated audio features, Stefan Hajnoczi, 2022/04/26