spa: alsa: support also MIDI-1.0 IO for ALSA seq

Support also non-UMP IO with ALSA seq, in case either alsa-lib or the
kernel does not have UMP enabled.

Add configuration option "api.alsa.seq.ump" for optionally turning UMP
I/O off, for easier debugging.
This commit is contained in:
Pauli Virtanen 2025-03-09 19:38:01 +02:00 committed by P V
parent 6620c6cde1
commit 4379cf446f
3 changed files with 163 additions and 85 deletions

View file

@ -931,6 +931,7 @@ impl_init(const struct spa_handle_factory *factory,
this->quantum_limit = 8192;
this->min_pool_size = 500;
this->max_pool_size = 2000;
this->ump = true;
for (i = 0; info && i < info->n_items; i++) {
const char *k = info->items[i].key;
@ -949,6 +950,8 @@ impl_init(const struct spa_handle_factory *factory,
spa_atou32(s, &this->min_pool_size, 0);
} else if (spa_streq(k, "api.alsa.seq.max-pool")) {
spa_atou32(s, &this->max_pool_size, 0);
} else if (spa_streq(k, "api.alsa.seq.ump")) {
this->ump = spa_atob(s);
}
}
@ -992,6 +995,7 @@ static const struct spa_dict_item info_items[] = {
"["SPA_KEY_API_ALSA_DISABLE_LONGNAME"=<bool, default false>] "
"[ api.alsa.seq.min-pool=<min-pool, default 500>] "
"[ api.alsa.seq.max-pool=<max-pool, default 2000>]"
"[ api.alsa.seq.ump = <boolean> ]"
},
};