[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 02/27] virtio-snd: Add jack control structures
From: |
Shreyansh Chouhan |
Subject: |
[RFC PATCH 02/27] virtio-snd: Add jack control structures |
Date: |
Thu, 29 Apr 2021 17:34:20 +0530 |
Added structures for handling jack control requests
to the header file.
Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com>
---
include/hw/virtio/virtio-snd.h | 40 ++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/include/hw/virtio/virtio-snd.h b/include/hw/virtio/virtio-snd.h
index bbbf174c51..f58b06a949 100644
--- a/include/hw/virtio/virtio-snd.h
+++ b/include/hw/virtio/virtio-snd.h
@@ -94,4 +94,44 @@ typedef struct virtio_snd_info {
uint32_t hda_fn_nid;
} virtio_snd_info;
+/* JACK CONTROL MESSAGES */
+
+typedef struct virtio_snd_jack_hdr {
+ /* VIRTIO_SND_R_JACK_* */
+ virtio_snd_hdr hdr;
+ /* 0 to (virtio_snd_config.jacks - 1) */
+ uint32_t jack_id;
+} virtio_snd_jack_hdr;
+
+/* Supported jack features */
+enum {
+ VIRTIO_SND_F_JACK_REMAP = 0
+};
+
+/* jack information structure */
+typedef struct virtio_snd_jack_info {
+ /* common header */
+ virtio_snd_info hdr;
+ /* 1 << VIRTIO_SND_JACK_F_* */
+ uint32_t features;
+ /* pin default configuration from HDA spec */
+ uint32_t hda_reg_defconf;
+ /* pin capabilities from HDA spec */
+ uint32_t hda_reg_caps;
+ /* connection status (0: disconnected, 1: connected) */
+ uint8_t connected;
+
+ uint8_t padding[7];
+} virtio_snd_jack_info;
+
+/* jack remapping control request */
+typedef struct virtio_snd_jack_remap {
+ /* .code = VIRTIO_SND_R_JACK_REMAP */
+ virtio_snd_jack_hdr hdr;
+ /* selected association number */
+ uint32_t association;
+ /* selected sequence number */
+ uint32_t sequence;
+} virtio_snd_jack_remap;
+
#endif
--
2.25.1
- [RFC PATCH 00/27] Virtio sound card implementation, Shreyansh Chouhan, 2021/04/29
- [RFC PATCH 01/27] virtio-snd: Add virtio sound header file, Shreyansh Chouhan, 2021/04/29
- [RFC PATCH 02/27] virtio-snd: Add jack control structures,
Shreyansh Chouhan <=
- [RFC PATCH 04/27] virtio-snd: Add chmap control structures, Shreyansh Chouhan, 2021/04/29
- [RFC PATCH 03/27] virtio-snd: Add PCM control structures, Shreyansh Chouhan, 2021/04/29
- [RFC PATCH 05/27] virtio-snd: Add device implementation structures, Shreyansh Chouhan, 2021/04/29
- [RFC PATCH 06/27] virtio-snd: Add PCI wrapper code for VirtIOSound, Shreyansh Chouhan, 2021/04/29
- [RFC PATCH 07/27] virtio-snd: Add properties for class init, Shreyansh Chouhan, 2021/04/29
- [RFC PATCH 08/27] virtio-snd: Add code for get config function, Shreyansh Chouhan, 2021/04/29
- [RFC PATCH 09/27] virtio-snd: Add code for set config function, Shreyansh Chouhan, 2021/04/29
- [RFC PATCH 10/27] virtio-snd: Add code for the realize function, Shreyansh Chouhan, 2021/04/29
- [RFC PATCH 12/27] virtio-snd: Add control virtqueue handler, Shreyansh Chouhan, 2021/04/29