@@ -37,6 +37,7 @@ static int process_legacy_output(struct snd_ump_endpoint *ump,
37
37
u32 * buffer , int count );
38
38
static void process_legacy_input (struct snd_ump_endpoint * ump , const u32 * src ,
39
39
int words );
40
+ static void update_legacy_names (struct snd_ump_endpoint * ump );
40
41
#else
41
42
static inline int process_legacy_output (struct snd_ump_endpoint * ump ,
42
43
u32 * buffer , int count )
@@ -47,6 +48,9 @@ static inline void process_legacy_input(struct snd_ump_endpoint *ump,
47
48
const u32 * src , int words )
48
49
{
49
50
}
51
+ static inline void update_legacy_names (struct snd_ump_endpoint * ump )
52
+ {
53
+ }
50
54
#endif
51
55
52
56
static const struct snd_rawmidi_global_ops snd_ump_rawmidi_ops = {
@@ -861,6 +865,7 @@ static int ump_handle_fb_info_msg(struct snd_ump_endpoint *ump,
861
865
fill_fb_info (ump , & fb -> info , buf );
862
866
if (ump -> parsed ) {
863
867
snd_ump_update_group_attrs (ump );
868
+ update_legacy_names (ump );
864
869
seq_notify_fb_change (ump , fb );
865
870
}
866
871
}
@@ -893,6 +898,7 @@ static int ump_handle_fb_name_msg(struct snd_ump_endpoint *ump,
893
898
/* notify the FB name update to sequencer, too */
894
899
if (ret > 0 && ump -> parsed ) {
895
900
snd_ump_update_group_attrs (ump );
901
+ update_legacy_names (ump );
896
902
seq_notify_fb_change (ump , fb );
897
903
}
898
904
return ret ;
@@ -1262,6 +1268,14 @@ static void fill_substream_names(struct snd_ump_endpoint *ump,
1262
1268
}
1263
1269
}
1264
1270
1271
+ static void update_legacy_names (struct snd_ump_endpoint * ump )
1272
+ {
1273
+ struct snd_rawmidi * rmidi = ump -> legacy_rmidi ;
1274
+
1275
+ fill_substream_names (ump , rmidi , SNDRV_RAWMIDI_STREAM_INPUT );
1276
+ fill_substream_names (ump , rmidi , SNDRV_RAWMIDI_STREAM_OUTPUT );
1277
+ }
1278
+
1265
1279
int snd_ump_attach_legacy_rawmidi (struct snd_ump_endpoint * ump ,
1266
1280
char * id , int device )
1267
1281
{
@@ -1298,10 +1312,7 @@ int snd_ump_attach_legacy_rawmidi(struct snd_ump_endpoint *ump,
1298
1312
rmidi -> ops = & snd_ump_legacy_ops ;
1299
1313
rmidi -> private_data = ump ;
1300
1314
ump -> legacy_rmidi = rmidi ;
1301
- if (input )
1302
- fill_substream_names (ump , rmidi , SNDRV_RAWMIDI_STREAM_INPUT );
1303
- if (output )
1304
- fill_substream_names (ump , rmidi , SNDRV_RAWMIDI_STREAM_OUTPUT );
1315
+ update_legacy_names (ump );
1305
1316
1306
1317
ump_dbg (ump , "Created a legacy rawmidi #%d (%s)\n" , device , id );
1307
1318
return 0 ;
0 commit comments