History

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.

Takashi Iwai committed 3 years ago

Commit a3ca3b31 parent ff166a93 files · +11 −4Browse files

Unified · Split

3 files
  1. include/uapi/sound/asequencer.h +2 −1
  2. sound/core/seq/seq_ports.c +7 −2
  3. sound/core/seq/seq_ports.h +2 −1
include/uapi/sound/asequencer.h+2−1
@@ -478,7 +478,8 @@ struct snd_seq_port_info { · 477 unmodified lines
478 unsigned int flags; /* misc. conditioning */478 unsigned int flags; /* misc. conditioning */
479 unsigned char time_queue; /* queue # for timestamping */479 unsigned char time_queue; /* queue # for timestamping */
480 unsigned char direction; /* port usage direction (r/w/bidir) */480 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 */
482};483};
483 484
484 485
sound/core/seq/seq_ports.c+7−2
@@ -356,8 +356,12 @@ int snd_seq_set_port_info(struct snd_seq_client_port * port, · 355 unmodified lines
356 port->time_real = (info->flags & SNDRV_SEQ_PORT_FLG_TIME_REAL) ? 1 : 0;356 port->time_real = (info->flags & SNDRV_SEQ_PORT_FLG_TIME_REAL) ? 1 : 0;
357 port->time_queue = info->time_queue;357 port->time_queue = info->time_queue;
358 358
359 /* direction */359 /* UMP direction and group */
360 port->direction = info->direction;360 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
361 /* fill default port direction */365 /* fill default port direction */
362 if (!port->direction) {366 if (!port->direction) {
363 if (info->capability & SNDRV_SEQ_PORT_CAP_READ)367 if (info->capability & SNDRV_SEQ_PORT_CAP_READ)
@@ -403,8 +407,9 @@ int snd_seq_get_port_info(struct snd_seq_client_port * port, · 39 unmodified lines
403 info->time_queue = port->time_queue;407 info->time_queue = port->time_queue;
404 }408 }
405 409
406 /* direction */410 /* UMP direction and group */
407 info->direction = port->direction;411 info->direction = port->direction;
412 info->ump_group = port->ump_group;
408 413
409 return 0;414 return 0;
410}415}
sound/core/seq/seq_ports.h+2−1
@@ -72,8 +72,9 @@ struct snd_seq_client_port { · 71 unmodified lines
72 int midi_voices;72 int midi_voices;
73 int synth_voices;73 int synth_voices;
74 74
75 /* direction */75 /* UMP direction and group */
76 unsigned char direction;76 unsigned char direction;
77 unsigned char ump_group;
77};78};
78 79
79struct snd_seq_client;80struct snd_seq_client;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t