Skip to contentSkip to conversation

ALSA: ump: Update substream name from assigned FB names

PATCH New Takashi Iwai 1 participant 1 message Jul 29, 2024 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: ump: Update substream name from assigned FB names

We had a nice name scheme in ALSA sequencer UMP binding for each sequencer port referring to each assigned Function Block name, while the legacy rawmidi refers only to the UMP Endpoint name. It's better to align both.

This patch moves the UMP Group attribute update functions into the core UMP code from the sequencer binding code, and improve the substream name of the legacy rawmidi.

---
 include/sound/ump.h             | 10 +++++
 sound/core/seq/seq_ump_client.c | 75 +++------------------------------
 sound/core/ump.c                | 74 ++++++++++++++++++++++++++++++--
 3 files changed, 86 insertions(+), 73 deletions(-)
include/sound/ump.h +10 -0
index 91238dabe307..7f68056acdff 100644
@@ -13,6 +13,14 @@ struct snd_ump_ops;
 struct ump_cvt_to_ump;
 struct snd_seq_ump_ops;
 
+struct snd_ump_group {
+	int group;			/* group index (0-based) */
+	unsigned int dir_bits;		/* directions */
+	bool active;			/* activeness */
+	bool valid;			/* valid group (referred by blocks) */
+	char name[64];			/* group name */
+};
+
 struct snd_ump_endpoint {
 	struct snd_rawmidi core;	/* raw UMP access */
 
@@ -41,6 +49,8 @@ struct snd_ump_endpoint {
 
 	struct mutex open_mutex;
 
+	struct snd_ump_group groups[SNDRV_UMP_MAX_GROUPS]; /* table of groups */
+
 #if IS_ENABLED(CONFIG_SND_UMP_LEGACY_RAWMIDI)
 	spinlock_t legacy_locks[2];
 	struct snd_rawmidi *legacy_rmidi;
sound/core/seq/seq_ump_client.c +6 -69

141 lines not on this page · raw message

sound/core/ump.c +70 -4

108 lines not on this page · raw message

Signature · 1 line
2.43.0