alsa: expose all config options as params

Add PropInfo for all the params that we can configure at construct
time and also add them as PROP_params.

This way you can configure the headroom at runtime with this:

pw-cli s <id> Props '{ params = [ "api.alsa.headroom" 1024 ] }'
This commit is contained in:
Wim Taymans 2021-11-30 17:43:07 +01:00
parent 2f82661966
commit d673158db1
4 changed files with 286 additions and 67 deletions

View file

@ -221,8 +221,12 @@ struct state {
struct spa_process_latency_info process_latency;
};
int
spa_alsa_enum_format(struct state *state, int seq,
struct spa_pod *spa_alsa_enum_propinfo(struct state *state,
uint32_t idx, uint32_t id, struct spa_pod_builder *b);
int spa_alsa_add_prop_params(struct state *state, struct spa_pod_builder *b);
int spa_alsa_parse_prop_params(struct state *state, struct spa_pod *params);
int spa_alsa_enum_format(struct state *state, int seq,
uint32_t start, uint32_t num,
const struct spa_pod *filter);