pulse-server: Handle formats of virtual devices better

Virtual devices tend to start with partial fields set in the EnumFormat
param (usually rate is missing). This causes virtual devices to be
invisible until they are used in some way.

Fix this by relaxing the parsing of EnumFormat and by falling back to
the server defaults for the unspecified fields.

Fixes #1413
This commit is contained in:
Wim Taymans 2021-08-25 17:33:22 +02:00
parent 3526e33fe1
commit a9169cf491
6 changed files with 58 additions and 19 deletions

View file

@ -205,7 +205,8 @@ void channel_map_parse(const char *str, struct channel_map *map);
bool channel_map_valid(const struct channel_map *map);
int format_parse_param(const struct spa_pod *param, struct sample_spec *ss,
struct channel_map *map);
struct channel_map *map, const struct sample_spec *def_ss,
const struct channel_map *def_map);
const struct spa_pod *format_build_param(struct spa_pod_builder *b, uint32_t id,
const struct sample_spec *spec, const struct channel_map *map);