Use "8 bit raw midi" for control ports again

There is no need to encode the potential format in the format.dsp of
control ports, this is just for legacy compatibility with JACK apps. The
actual format can be negotiated with the types field.

Fixes midi port visibility with apps compiled against 1.2, such as JACK
apps in flatpaks.
This commit is contained in:
Wim Taymans 2025-05-23 16:46:13 +02:00
parent 617f1b8a38
commit 564c9b1ba5
15 changed files with 18 additions and 34 deletions

View file

@ -3466,24 +3466,6 @@ static const char* type_to_string(jack_port_type_id_t type_id)
}
}
static const char* type_to_format_dsp(jack_port_type_id_t type_id)
{
switch(type_id) {
case TYPE_ID_AUDIO:
return JACK_DEFAULT_AUDIO_TYPE;
case TYPE_ID_VIDEO:
return JACK_DEFAULT_VIDEO_TYPE;
case TYPE_ID_OSC:
return JACK_DEFAULT_OSC_TYPE;
case TYPE_ID_MIDI:
return JACK_DEFAULT_MIDI_TYPE;
case TYPE_ID_UMP:
return JACK_DEFAULT_UMP_TYPE;
default:
return NULL;
}
}
static bool type_is_dsp(jack_port_type_id_t type_id)
{
switch(type_id) {
@ -5546,7 +5528,7 @@ jack_port_t * jack_port_register (jack_client_t *client,
spa_list_init(&p->mix);
pw_properties_set(p->props, PW_KEY_FORMAT_DSP, type_to_format_dsp(type_id));
pw_properties_set(p->props, PW_KEY_FORMAT_DSP, type_to_string(type_id));
pw_properties_set(p->props, PW_KEY_PORT_NAME, port_name);
if (flags > 0x1f) {
pw_properties_setf(p->props, PW_KEY_PORT_EXTRA,