Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tools include UAPI: Sync sound/asound.h copy with the kernel sources

Picking the changes from:

08fdced60ca08e34 ("ALSA: rawmidi: Add framing mode")

Which entails no changes in the tooling side as it doesn't introduce new
ioctls.

To silence this perf tools build warning:

Warning: Kernel ABI header at 'tools/include/uapi/sound/asound.h' differs from latest version at 'include/uapi/sound/asound.h'
diff -u tools/include/uapi/sound/asound.h include/uapi/sound/asound.h

Cc: David Henningsson <coding@diwic.se>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+28 -2
+28 -2
tools/include/uapi/sound/asound.h
··· 710 710 * Raw MIDI section - /dev/snd/midi?? 711 711 */ 712 712 713 - #define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 1) 713 + #define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 2) 714 714 715 715 enum { 716 716 SNDRV_RAWMIDI_STREAM_OUTPUT = 0, ··· 736 736 unsigned char reserved[64]; /* reserved for future use */ 737 737 }; 738 738 739 + #define SNDRV_RAWMIDI_MODE_FRAMING_MASK (7<<0) 740 + #define SNDRV_RAWMIDI_MODE_FRAMING_SHIFT 0 741 + #define SNDRV_RAWMIDI_MODE_FRAMING_NONE (0<<0) 742 + #define SNDRV_RAWMIDI_MODE_FRAMING_TSTAMP (1<<0) 743 + #define SNDRV_RAWMIDI_MODE_CLOCK_MASK (7<<3) 744 + #define SNDRV_RAWMIDI_MODE_CLOCK_SHIFT 3 745 + #define SNDRV_RAWMIDI_MODE_CLOCK_NONE (0<<3) 746 + #define SNDRV_RAWMIDI_MODE_CLOCK_REALTIME (1<<3) 747 + #define SNDRV_RAWMIDI_MODE_CLOCK_MONOTONIC (2<<3) 748 + #define SNDRV_RAWMIDI_MODE_CLOCK_MONOTONIC_RAW (3<<3) 749 + 750 + #define SNDRV_RAWMIDI_FRAMING_DATA_LENGTH 16 751 + 752 + struct snd_rawmidi_framing_tstamp { 753 + /* For now, frame_type is always 0. Midi 2.0 is expected to add new 754 + * types here. Applications are expected to skip unknown frame types. 755 + */ 756 + __u8 frame_type; 757 + __u8 length; /* number of valid bytes in data field */ 758 + __u8 reserved[2]; 759 + __u32 tv_nsec; /* nanoseconds */ 760 + __u64 tv_sec; /* seconds */ 761 + __u8 data[SNDRV_RAWMIDI_FRAMING_DATA_LENGTH]; 762 + } __packed; 763 + 739 764 struct snd_rawmidi_params { 740 765 int stream; 741 766 size_t buffer_size; /* queue size in bytes */ 742 767 size_t avail_min; /* minimum avail bytes for wakeup */ 743 768 unsigned int no_active_sensing: 1; /* do not send active sensing byte in close() */ 744 - unsigned char reserved[16]; /* reserved for future use */ 769 + unsigned int mode; /* For input data only, frame incoming data */ 770 + unsigned char reserved[12]; /* reserved for future use */ 745 771 }; 746 772 747 773 #ifndef __KERNEL__