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
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
@@ -356,8 +356,12 @@ int snd_seq_set_port_info(struct snd_seq_client_port * port, · 355 unmodified lines
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, · 39 unmodified lines
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
@@ -72,8 +72,9 @@ struct snd_seq_client_port { · 71 unmodified lines
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;

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