Skip to content

Commit

Permalink
seq: Define new events for UMP EP/FB change notifications
Browse files Browse the repository at this point in the history
Two new sequencer event types are added for notifications of UMP info
changes: SND_SEQ_EVENT_UMP_EP_CHANGE (68) and
SND_SEQ_EVENT_UMP_BLOCK_CHANGE (69).

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jan 14, 2025
1 parent cdd5a9f commit 35d2efe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/local.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
#define snd_seq_result sndrv_seq_result
#define snd_seq_queue_skew sndrv_seq_queue_skew
#define snd_seq_ev_queue_control sndrv_seq_ev_queue_control
#define snd_seq_ev_ump_notify sndrv_seq_ev_ump_notify
#define snd_seq_client_t sndrv_seq_client_t
#define snd_seq_client_type_t sndrv_seq_client_type_t

Expand Down
12 changes: 12 additions & 0 deletions include/seq_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ enum snd_seq_event_type {
/** Ports disconnected; event data type = #snd_seq_connect_t */
SND_SEQ_EVENT_PORT_UNSUBSCRIBED,

/** UMP Endpoint info has changed; event data type = #snd_seq_ev_ump_notify_t */
SND_SEQ_EVENT_UMP_EP_CHANGE,
/** UMP Block info has changed; event data type = #snd_seq_ev_ump_notify_t */
SND_SEQ_EVENT_UMP_BLOCK_CHANGE,

/** user-defined event; event data type = any (fixed size) */
SND_SEQ_EVENT_USR0 = 90,
/** user-defined event; event data type = any (fixed size) */
Expand Down Expand Up @@ -294,6 +299,12 @@ typedef struct snd_seq_ev_queue_control {
} param; /**< data value union */
} snd_seq_ev_queue_control_t;

/** UMP info change notify */
typedef struct snd_seq_ev_ump_notify {
unsigned char client; /**< Client number */
unsigned char block; /**< Block number (optional) */
} snd_seq_ev_ump_notify_t;

/** Sequencer event data */
typedef union snd_seq_event_data {
snd_seq_ev_note_t note; /**< note information */
Expand All @@ -306,6 +317,7 @@ typedef union snd_seq_event_data {
snd_seq_addr_t addr; /**< address */
snd_seq_connect_t connect; /**< connect information */
snd_seq_result_t result; /**< operation result code */
snd_seq_ev_ump_notify_t ump_notify; /**< UMP info change notification */
} snd_seq_event_data_t;

/** Sequencer event */
Expand Down

0 comments on commit 35d2efe

Please sign in to comment.