mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
alsa-seq: configure pool sizes better
The default kernel pool size on the input is 200 cells. A cell is about 28 bytes long so the maximum message that can be received in one go is about 5600 bytes. This causes problems when using amidi to upload larger sysex messages because they simply can't be received by the sequencer. It if however possible to increase this limit with the set_client_pool() function. Increase the pool size to at least the quantum_limit * 2. This ensures we can receive and send at least 2 quantums of raw data, which should be a fairly long sysex message. Make a min and max value for the pool size. There is an upper limit of 2000 in the kernel but make this configurable and clamp the final pool size to the min/max. Make the MAX_EVENT_SIZE 256, because this is how the sequencer seems to splits the input data as well and it results in less wasted space in the output buffer. See #4005
This commit is contained in:
parent
ea0ba1162e
commit
37224ac84c
3 changed files with 44 additions and 2 deletions
|
|
@ -35,7 +35,7 @@ struct props {
|
|||
bool disable_longname;
|
||||
};
|
||||
|
||||
#define MAX_EVENT_SIZE 1024
|
||||
#define MAX_EVENT_SIZE 256
|
||||
#define MAX_PORTS 256
|
||||
#define MAX_BUFFERS 32
|
||||
|
||||
|
|
@ -132,6 +132,8 @@ struct seq_state {
|
|||
struct spa_io_position *position;
|
||||
|
||||
uint32_t quantum_limit;
|
||||
uint32_t min_pool_size;
|
||||
uint32_t max_pool_size;
|
||||
|
||||
int rate_denom;
|
||||
uint32_t duration;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue