]> git.proxmox.com Git - mirror_qemu.git/commitdiff
audio: add pcm_ops function table for capture backend
authorVolker Rümelin <vr_qemu@t-online.de>
Tue, 1 Mar 2022 19:13:04 +0000 (20:13 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 4 Mar 2022 10:05:13 +0000 (11:05 +0100)
Add a pcm_ops function table for the capture backend. This avoids
additional code in the next patches to test if the pcm_ops table
is available.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20220301191311.26695-8-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
audio/audio.c

index 9e2d7fb209784a9a9707aff4056317c61f92cc4e..55f885f8e9cf4e31e572c2755048a8896e8343a3 100644 (file)
@@ -1804,6 +1804,7 @@ void AUD_remove_card (QEMUSoundCard *card)
     g_free (card->name);
 }
 
+static struct audio_pcm_ops capture_pcm_ops;
 
 CaptureVoiceOut *AUD_add_capture(
     AudioState *s,
@@ -1849,6 +1850,7 @@ CaptureVoiceOut *AUD_add_capture(
 
         hw = &cap->hw;
         hw->s = s;
+        hw->pcm_ops = &capture_pcm_ops;
         QLIST_INIT (&hw->sw_head);
         QLIST_INIT (&cap->cb_head);