aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2023-05-23 09:53:50 +0200
committerTakashi Iwai <tiwai@suse.de>2023-05-23 12:11:27 +0200
commita3ca3b30800da0a334e2d6eb68d123ec8e2d2bf6 (patch)
tree6cbfd219026b4f29be157f9cfd3c9984d1ac98f0 /sound/core
parentff166a9d19fab3d77f50e9413df046fb1d7c01cc (diff)
downloadlinux-a3ca3b30800da0a334e2d6eb68d123ec8e2d2bf6.tar.gz
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 <perex@perex.cz> Link: https://lore.kernel.org/r/20230523075358.9672-30-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/seq/seq_ports.c9
-rw-r--r--sound/core/seq/seq_ports.h3
2 files changed, 9 insertions, 3 deletions
diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c
index 5574341f49eb6..9b80f8275026b 100644
--- a/sound/core/seq/seq_ports.c
+++ b/sound/core/seq/seq_ports.c
@@ -356,8 +356,12 @@ int snd_seq_set_port_info(struct snd_seq_client_port * port,
port->time_real = (info->flags & SNDRV_SEQ_PORT_FLG_TIME_REAL) ? 1 : 0;
port->time_queue = info->time_queue;
- /* direction */
+ /* UMP direction and group */
port->direction = info->direction;
+ port->ump_group = info->ump_group;
+ if (port->ump_group > SNDRV_UMP_MAX_GROUPS)
+ port->ump_group = 0;
+
/* fill default port direction */
if (!port->direction) {
if (info->capability & SNDRV_SEQ_PORT_CAP_READ)
@@ -403,8 +407,9 @@ int snd_seq_get_port_info(struct snd_seq_client_port * port,
info->time_queue = port->time_queue;
}
- /* direction */
+ /* UMP direction and group */
info->direction = port->direction;
+ info->ump_group = port->ump_group;
return 0;
}
diff --git a/sound/core/seq/seq_ports.h b/sound/core/seq/seq_ports.h
index dce733ab2398a..c6c138edceabe 100644
--- a/sound/core/seq/seq_ports.h
+++ b/sound/core/seq/seq_ports.h
@@ -72,8 +72,9 @@ struct snd_seq_client_port {
int midi_voices;
int synth_voices;
- /* direction */
+ /* UMP direction and group */
unsigned char direction;
+ unsigned char ump_group;
};
struct snd_seq_client;