@@ -274,6 +274,7 @@ typedef int __bitwise snd_pcm_subformat_t;
274
274
#define SNDRV_PCM_INFO_DOUBLE 0x00000004 /* Double buffering needed for PCM start/stop */
275
275
#define SNDRV_PCM_INFO_BATCH 0x00000010 /* double buffering */
276
276
#define SNDRV_PCM_INFO_SYNC_APPLPTR 0x00000020 /* need the explicit sync of appl_ptr update */
277
+ #define SNDRV_PCM_INFO_PERFECT_DRAIN 0x00000040 /* silencing at the end of stream is not required */
277
278
#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 /* channels are interleaved */
278
279
#define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200 /* channels are not interleaved */
279
280
#define SNDRV_PCM_INFO_COMPLEX 0x00000400 /* complex frame organization (mmap only) */
@@ -383,6 +384,9 @@ typedef int snd_pcm_hw_param_t;
383
384
#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1<<0) /* avoid rate resampling */
384
385
#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1<<1) /* export buffer */
385
386
#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1<<2) /* disable period wakeups */
387
+ #define SNDRV_PCM_HW_PARAMS_NO_DRAIN_SILENCE (1<<3) /* suppress drain with the filling
388
+ * of the silence samples
389
+ */
386
390
387
391
struct snd_interval {
388
392
unsigned int min , max ;
@@ -708,7 +712,7 @@ enum {
708
712
* Raw MIDI section - /dev/snd/midi??
709
713
*/
710
714
711
- #define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 2 )
715
+ #define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 4 )
712
716
713
717
enum {
714
718
SNDRV_RAWMIDI_STREAM_OUTPUT = 0 ,
@@ -719,6 +723,7 @@ enum {
719
723
#define SNDRV_RAWMIDI_INFO_OUTPUT 0x00000001
720
724
#define SNDRV_RAWMIDI_INFO_INPUT 0x00000002
721
725
#define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004
726
+ #define SNDRV_RAWMIDI_INFO_UMP 0x00000008
722
727
723
728
struct snd_rawmidi_info {
724
729
unsigned int device ; /* RO/WR (control): device number */
@@ -779,13 +784,82 @@ struct snd_rawmidi_status {
779
784
};
780
785
#endif
781
786
787
+ /* UMP EP info flags */
788
+ #define SNDRV_UMP_EP_INFO_STATIC_BLOCKS 0x01
789
+
790
+ /* UMP EP Protocol / JRTS capability bits */
791
+ #define SNDRV_UMP_EP_INFO_PROTO_MIDI_MASK 0x0300
792
+ #define SNDRV_UMP_EP_INFO_PROTO_MIDI1 0x0100 /* MIDI 1.0 */
793
+ #define SNDRV_UMP_EP_INFO_PROTO_MIDI2 0x0200 /* MIDI 2.0 */
794
+ #define SNDRV_UMP_EP_INFO_PROTO_JRTS_MASK 0x0003
795
+ #define SNDRV_UMP_EP_INFO_PROTO_JRTS_TX 0x0001 /* JRTS Transmit */
796
+ #define SNDRV_UMP_EP_INFO_PROTO_JRTS_RX 0x0002 /* JRTS Receive */
797
+
798
+ /* UMP Endpoint information */
799
+ struct snd_ump_endpoint_info {
800
+ int card ; /* card number */
801
+ int device ; /* device number */
802
+ unsigned int flags ; /* additional info */
803
+ unsigned int protocol_caps ; /* protocol capabilities */
804
+ unsigned int protocol ; /* current protocol */
805
+ unsigned int num_blocks ; /* # of function blocks */
806
+ unsigned short version ; /* UMP major/minor version */
807
+ unsigned short family_id ; /* MIDI device family ID */
808
+ unsigned short model_id ; /* MIDI family model ID */
809
+ unsigned int manufacturer_id ; /* MIDI manufacturer ID */
810
+ unsigned char sw_revision [4 ]; /* software revision */
811
+ unsigned short padding ;
812
+ unsigned char name [128 ]; /* endpoint name string */
813
+ unsigned char product_id [128 ]; /* unique product id string */
814
+ unsigned char reserved [32 ];
815
+ } __packed ;
816
+
817
+ /* UMP direction */
818
+ #define SNDRV_UMP_DIR_INPUT 0x01
819
+ #define SNDRV_UMP_DIR_OUTPUT 0x02
820
+ #define SNDRV_UMP_DIR_BIDIRECTION 0x03
821
+
822
+ /* UMP block info flags */
823
+ #define SNDRV_UMP_BLOCK_IS_MIDI1 (1U << 0) /* MIDI 1.0 port w/o restrict */
824
+ #define SNDRV_UMP_BLOCK_IS_LOWSPEED (1U << 1) /* 31.25Kbps B/W MIDI1 port */
825
+
826
+ /* UMP block user-interface hint */
827
+ #define SNDRV_UMP_BLOCK_UI_HINT_UNKNOWN 0x00
828
+ #define SNDRV_UMP_BLOCK_UI_HINT_RECEIVER 0x01
829
+ #define SNDRV_UMP_BLOCK_UI_HINT_SENDER 0x02
830
+ #define SNDRV_UMP_BLOCK_UI_HINT_BOTH 0x03
831
+
832
+ /* UMP groups and blocks */
833
+ #define SNDRV_UMP_MAX_GROUPS 16
834
+ #define SNDRV_UMP_MAX_BLOCKS 32
835
+
836
+ /* UMP Block information */
837
+ struct snd_ump_block_info {
838
+ int card ; /* card number */
839
+ int device ; /* device number */
840
+ unsigned char block_id ; /* block ID (R/W) */
841
+ unsigned char direction ; /* UMP direction */
842
+ unsigned char active ; /* Activeness */
843
+ unsigned char first_group ; /* first group ID */
844
+ unsigned char num_groups ; /* number of groups */
845
+ unsigned char midi_ci_version ; /* MIDI-CI support version */
846
+ unsigned char sysex8_streams ; /* max number of sysex8 streams */
847
+ unsigned char ui_hint ; /* user interface hint */
848
+ unsigned int flags ; /* various info flags */
849
+ unsigned char name [128 ]; /* block name string */
850
+ unsigned char reserved [32 ];
851
+ } __packed ;
852
+
782
853
#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int)
783
854
#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info)
784
855
#define SNDRV_RAWMIDI_IOCTL_USER_PVERSION _IOW('W', 0x02, int)
785
856
#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params)
786
857
#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status)
787
858
#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int)
788
859
#define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int)
860
+ /* Additional ioctls for UMP rawmidi devices */
861
+ #define SNDRV_UMP_IOCTL_ENDPOINT_INFO _IOR('W', 0x40, struct snd_ump_endpoint_info)
862
+ #define SNDRV_UMP_IOCTL_BLOCK_INFO _IOR('W', 0x41, struct snd_ump_block_info)
789
863
790
864
/*
791
865
* Timer section - /dev/snd/timer
@@ -961,7 +1035,7 @@ struct snd_timer_tread {
961
1035
* *
962
1036
****************************************************************************/
963
1037
964
- #define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 8 )
1038
+ #define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 9 )
965
1039
966
1040
struct snd_ctl_card_info {
967
1041
int card ; /* card number */
@@ -1122,6 +1196,9 @@ struct snd_ctl_tlv {
1122
1196
#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)
1123
1197
#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info)
1124
1198
#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
1199
+ #define SNDRV_CTL_IOCTL_UMP_NEXT_DEVICE _IOWR('U', 0x43, int)
1200
+ #define SNDRV_CTL_IOCTL_UMP_ENDPOINT_INFO _IOWR('U', 0x44, struct snd_ump_endpoint_info)
1201
+ #define SNDRV_CTL_IOCTL_UMP_BLOCK_INFO _IOWR('U', 0x45, struct snd_ump_block_info)
1125
1202
#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int)
1126
1203
#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int)
1127
1204
0 commit comments