Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: seq: Print UMP Endpoint and Block information in proc outputs

This patch enhances the /proc/asound/seq/clients output to show a few
more information about the assigned UMP Endpoint and Blocks.

The "Groups" are shown in 1-based group number to align with the
sequencer client name and port number.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20230523075358.9672-36-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+30
+30
sound/core/seq/seq_clientmgr.c
··· 2120 2120 } 2121 2121 } 2122 2122 2123 + #ifdef CONFIG_SND_PROC_FS 2124 + static void dump_ump_info(struct snd_info_buffer *buffer, 2125 + struct snd_seq_client *client) 2126 + { 2127 + struct snd_ump_endpoint_info *ep; 2128 + struct snd_ump_block_info *bp; 2129 + int i; 2130 + 2131 + if (!client->ump_info) 2132 + return; 2133 + ep = client->ump_info[SNDRV_SEQ_CLIENT_UMP_INFO_ENDPOINT]; 2134 + if (ep && *ep->name) 2135 + snd_iprintf(buffer, " UMP Endpoint: \"%s\"\n", ep->name); 2136 + for (i = 0; i < SNDRV_UMP_MAX_BLOCKS; i++) { 2137 + bp = client->ump_info[i + 1]; 2138 + if (bp && *bp->name) { 2139 + snd_iprintf(buffer, " UMP Block %d: \"%s\" [%s]\n", 2140 + i, bp->name, 2141 + bp->active ? "Active" : "Inactive"); 2142 + snd_iprintf(buffer, " Groups: %d-%d\n", 2143 + bp->first_group + 1, 2144 + bp->first_group + bp->num_groups); 2145 + } 2146 + } 2147 + } 2148 + #endif 2149 + 2123 2150 /* UMP-specific ioctls -- called directly without data copy */ 2124 2151 static int snd_seq_ioctl_client_ump_info(struct snd_seq_client *caller, 2125 2152 unsigned int cmd, ··· 2681 2654 c, client->name, 2682 2655 client->type == USER_CLIENT ? "User" : "Kernel", 2683 2656 midi_version_string(client->midi_version)); 2657 + #if IS_ENABLED(CONFIG_SND_SEQ_UMP) 2658 + dump_ump_info(buffer, client); 2659 + #endif 2684 2660 snd_seq_info_dump_ports(buffer, client); 2685 2661 if (snd_seq_write_pool_allocated(client)) { 2686 2662 snd_iprintf(buffer, " Output pool :\n");