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.
Unified · Split
| @@ -478,7 +478,8 @@ struct snd_seq_port_info { · 477 unmodified lines | ||
| 478 | 478 | unsigned int flags; /* misc. conditioning */ |
| 479 | 479 | unsigned char time_queue; /* queue # for timestamping */ |
| 480 | 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 | |
| @@ -356,8 +356,12 @@ int snd_seq_set_port_info(struct snd_seq_client_port * port, · 355 unmodified lines | ||
| 356 | 356 | port->time_real = (info->flags & SNDRV_SEQ_PORT_FLG_TIME_REAL) ? 1 : 0; |
| 357 | 357 | port->time_queue = info->time_queue; |
| 358 | 358 | |
| 359 | − /* direction */ | |
| 359 | + /* UMP direction and group */ | |
| 360 | 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 | 365 | /* fill default port direction */ |
| 362 | 366 | if (!port->direction) { |
| 363 | 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 | 407 | info->time_queue = port->time_queue; |
| 404 | 408 | } |
| 405 | 409 | |
| 406 | − /* direction */ | |
| 410 | + /* UMP direction and group */ | |
| 407 | 411 | info->direction = port->direction; |
| 412 | + info->ump_group = port->ump_group; | |
| 408 | 413 | |
| 409 | 414 | return 0; |
| 410 | 415 | } |
| @@ -72,8 +72,9 @@ struct snd_seq_client_port { · 71 unmodified lines | ||
| 72 | 72 | int midi_voices; |
| 73 | 73 | int synth_voices; |
| 74 | 74 | |
| 75 | − /* direction */ | |
| 75 | + /* UMP direction and group */ | |
| 76 | 76 | unsigned char direction; |
| 77 | + unsigned char ump_group; | |
| 77 | 78 | }; |
| 78 | 79 | |
| 79 | 80 | struct snd_seq_client; |