~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/virtio/virtio_ctl_msg.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /sound/virtio/virtio_ctl_msg.h (Architecture sparc64) and /sound/virtio/virtio_ctl_msg.h (Architecture mips)


  1 /* SPDX-License-Identifier: GPL-2.0+ */             1 /* SPDX-License-Identifier: GPL-2.0+ */
  2 /*                                                  2 /*
  3  * virtio-snd: Virtio sound device                  3  * virtio-snd: Virtio sound device
  4  * Copyright (C) 2021 OpenSynergy GmbH              4  * Copyright (C) 2021 OpenSynergy GmbH
  5  */                                                 5  */
  6 #ifndef VIRTIO_SND_MSG_H                            6 #ifndef VIRTIO_SND_MSG_H
  7 #define VIRTIO_SND_MSG_H                            7 #define VIRTIO_SND_MSG_H
  8                                                     8 
  9 #include <linux/atomic.h>                           9 #include <linux/atomic.h>
 10 #include <linux/virtio.h>                          10 #include <linux/virtio.h>
 11                                                    11 
 12 struct virtio_snd;                                 12 struct virtio_snd;
 13 struct virtio_snd_msg;                             13 struct virtio_snd_msg;
 14                                                    14 
 15 void virtsnd_ctl_msg_ref(struct virtio_snd_msg     15 void virtsnd_ctl_msg_ref(struct virtio_snd_msg *msg);
 16                                                    16 
 17 void virtsnd_ctl_msg_unref(struct virtio_snd_m     17 void virtsnd_ctl_msg_unref(struct virtio_snd_msg *msg);
 18                                                    18 
 19 void *virtsnd_ctl_msg_request(struct virtio_sn     19 void *virtsnd_ctl_msg_request(struct virtio_snd_msg *msg);
 20                                                    20 
 21 void *virtsnd_ctl_msg_response(struct virtio_s     21 void *virtsnd_ctl_msg_response(struct virtio_snd_msg *msg);
 22                                                    22 
 23 struct virtio_snd_msg *virtsnd_ctl_msg_alloc(s     23 struct virtio_snd_msg *virtsnd_ctl_msg_alloc(size_t request_size,
 24                                              s     24                                              size_t response_size, gfp_t gfp);
 25                                                    25 
 26 int virtsnd_ctl_msg_send(struct virtio_snd *sn     26 int virtsnd_ctl_msg_send(struct virtio_snd *snd, struct virtio_snd_msg *msg,
 27                          struct scatterlist *o     27                          struct scatterlist *out_sgs,
 28                          struct scatterlist *i     28                          struct scatterlist *in_sgs, bool nowait);
 29                                                    29 
 30 /**                                                30 /**
 31  * virtsnd_ctl_msg_send_sync() - Simplified se     31  * virtsnd_ctl_msg_send_sync() - Simplified sending of synchronous message.
 32  * @snd: VirtIO sound device.                      32  * @snd: VirtIO sound device.
 33  * @msg: Control message.                          33  * @msg: Control message.
 34  *                                                 34  *
 35  * After returning from this function, the mes     35  * After returning from this function, the message will be deleted. If message
 36  * content is still needed, the caller must ad     36  * content is still needed, the caller must additionally to
 37  * virtsnd_ctl_msg_ref/unref() it.                 37  * virtsnd_ctl_msg_ref/unref() it.
 38  *                                                 38  *
 39  * The msg_timeout_ms module parameter defines     39  * The msg_timeout_ms module parameter defines the message completion timeout.
 40  * If the message is not completed within this     40  * If the message is not completed within this time, the function will return an
 41  * error.                                          41  * error.
 42  *                                                 42  *
 43  * Context: Any context that permits to sleep.     43  * Context: Any context that permits to sleep.
 44  * Return: 0 on success, -errno on failure.        44  * Return: 0 on success, -errno on failure.
 45  *                                                 45  *
 46  * The return value is a message status code (     46  * The return value is a message status code (VIRTIO_SND_S_XXX) converted to an
 47  * appropriate -errno value.                       47  * appropriate -errno value.
 48  */                                                48  */
 49 static inline int virtsnd_ctl_msg_send_sync(st     49 static inline int virtsnd_ctl_msg_send_sync(struct virtio_snd *snd,
 50                                             st     50                                             struct virtio_snd_msg *msg)
 51 {                                                  51 {
 52         return virtsnd_ctl_msg_send(snd, msg,      52         return virtsnd_ctl_msg_send(snd, msg, NULL, NULL, false);
 53 }                                                  53 }
 54                                                    54 
 55 /**                                                55 /**
 56  * virtsnd_ctl_msg_send_async() - Simplified s     56  * virtsnd_ctl_msg_send_async() - Simplified sending of asynchronous message.
 57  * @snd: VirtIO sound device.                      57  * @snd: VirtIO sound device.
 58  * @msg: Control message.                          58  * @msg: Control message.
 59  *                                                 59  *
 60  * Context: Any context.                           60  * Context: Any context.
 61  * Return: 0 on success, -errno on failure.        61  * Return: 0 on success, -errno on failure.
 62  */                                                62  */
 63 static inline int virtsnd_ctl_msg_send_async(s     63 static inline int virtsnd_ctl_msg_send_async(struct virtio_snd *snd,
 64                                              s     64                                              struct virtio_snd_msg *msg)
 65 {                                                  65 {
 66         return virtsnd_ctl_msg_send(snd, msg,      66         return virtsnd_ctl_msg_send(snd, msg, NULL, NULL, true);
 67 }                                                  67 }
 68                                                    68 
 69 void virtsnd_ctl_msg_cancel_all(struct virtio_     69 void virtsnd_ctl_msg_cancel_all(struct virtio_snd *snd);
 70                                                    70 
 71 void virtsnd_ctl_msg_complete(struct virtio_sn     71 void virtsnd_ctl_msg_complete(struct virtio_snd_msg *msg);
 72                                                    72 
 73 int virtsnd_ctl_query_info(struct virtio_snd *     73 int virtsnd_ctl_query_info(struct virtio_snd *snd, int command, int start_id,
 74                            int count, size_t s     74                            int count, size_t size, void *info);
 75                                                    75 
 76 void virtsnd_ctl_notify_cb(struct virtqueue *v     76 void virtsnd_ctl_notify_cb(struct virtqueue *vqueue);
 77                                                    77 
 78 #endif /* VIRTIO_SND_MSG_H */                      78 #endif /* VIRTIO_SND_MSG_H */
 79                                                    79 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php