Skip to content

Commit a3ca3b3

Browse files
committed
ALSA: seq: Add UMP group number to snd_seq_port_info
Add yet more new filed "ump_group" to snd_seq_port_info for specifying the associated UMP Group number for each sequencer port. This will be referred in the upcoming automatic UMP conversion in sequencer core. Reviewed-by: Jaroslav Kysela <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent ff166a9 commit a3ca3b3

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

include/uapi/sound/asequencer.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,8 @@ struct snd_seq_port_info {
478478
unsigned int flags; /* misc. conditioning */
479479
unsigned char time_queue; /* queue # for timestamping */
480480
unsigned char direction; /* port usage direction (r/w/bidir) */
481-
char reserved[58]; /* for future use */
481+
unsigned char ump_group; /* 0 = UMP EP (no conversion), 1-16 = UMP group number */
482+
char reserved[57]; /* for future use */
482483
};
483484

484485

sound/core/seq/seq_ports.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,12 @@ int snd_seq_set_port_info(struct snd_seq_client_port * port,
356356
port->time_real = (info->flags & SNDRV_SEQ_PORT_FLG_TIME_REAL) ? 1 : 0;
357357
port->time_queue = info->time_queue;
358358

359-
/* direction */
359+
/* UMP direction and group */
360360
port->direction = info->direction;
361+
port->ump_group = info->ump_group;
362+
if (port->ump_group > SNDRV_UMP_MAX_GROUPS)
363+
port->ump_group = 0;
364+
361365
/* fill default port direction */
362366
if (!port->direction) {
363367
if (info->capability & SNDRV_SEQ_PORT_CAP_READ)
@@ -403,8 +407,9 @@ int snd_seq_get_port_info(struct snd_seq_client_port * port,
403407
info->time_queue = port->time_queue;
404408
}
405409

406-
/* direction */
410+
/* UMP direction and group */
407411
info->direction = port->direction;
412+
info->ump_group = port->ump_group;
408413

409414
return 0;
410415
}

sound/core/seq/seq_ports.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ struct snd_seq_client_port {
7272
int midi_voices;
7373
int synth_voices;
7474

75-
/* direction */
75+
/* UMP direction and group */
7676
unsigned char direction;
77+
unsigned char ump_group;
7778
};
7879

7980
struct snd_seq_client;

0 commit comments

Comments
 (0)