summaryrefslogtreecommitdiff
path: root/include/uapi/sound/firewire.h
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2023-02-02 16:37:08 +0300
committerTakashi Iwai <tiwai@suse.de>2023-02-04 11:35:17 +0300
commit0d9eb7ed958a71296c6829869f6304ddfdca64df (patch)
tree4d0edf9c83d12e2636af697b0ba85863f06a1daa /include/uapi/sound/firewire.h
parentd045bceff5a904bd79d71dede9f927c00ce4906f (diff)
downloadlinux-0d9eb7ed958a71296c6829869f6304ddfdca64df.tar.xz
ALSA: fireface: add field for the number of messages copied to user space
Current structure includes no field to express the number of messages copied to user space, thus user space application needs to information out of the structure to parse the content of structure. This commit adds a field to express the number of messages copied to user space since It is more preferable to use self-contained structure. Kees Cook proposed an idea of annotation for bound of flexible arrays in his future improvement for flexible-length array in kernel. The additional field for message count is suitable to the idea as well. Reference: https://people.kernel.org/kees/bounded-flexible-arrays-in-c Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20230202133708.163936-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/uapi/sound/firewire.h')
-rw-r--r--include/uapi/sound/firewire.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/sound/firewire.h b/include/uapi/sound/firewire.h
index 50917581dd2b..1e86872c151f 100644
--- a/include/uapi/sound/firewire.h
+++ b/include/uapi/sound/firewire.h
@@ -78,6 +78,7 @@ struct snd_firewire_event_motu_register_dsp_change {
* operating hardware knob.
*
* @type: Fixed to SNDRV_FIREWIRE_EVENT_FF400_MESSAGE.
+ * @message_count: The number of messages.
* @messages.message: The messages expressing hardware knob operation.
* @messages.tstamp: The isochronous cycle at which the request subaction of asynchronous
* transaction was sent to deliver the message. It has 16 bit unsigned integer
@@ -89,6 +90,7 @@ struct snd_firewire_event_motu_register_dsp_change {
*/
struct snd_firewire_event_ff400_message {
unsigned int type;
+ unsigned int message_count;
struct {
__u32 message;
__u32 tstamp;