alsa-pcm: add dsd bit order parameter

Signed-off-by: Martin Geier <martin.geier@streamunlimited.com>
This commit is contained in:
Martin Geier 2024-11-27 16:23:24 +01:00
parent 9afa0cd270
commit 4976ac7ef9
2 changed files with 4 additions and 1 deletions

View file

@ -208,6 +208,8 @@ static int alsa_set_param(struct state *state, const char *k, const char *s)
state->htimestamp_max_errors = atoi(s);
} else if (spa_streq(k, "api.alsa.auto-link")) {
state->auto_link = spa_atob(s);
} else if (spa_streq(k, "api.alsa.dsd-lsb")) {
state->dsd_lsb = spa_atob(s);
} else if (spa_streq(k, "latency.internal.rate")) {
state->process_latency.rate = atoi(s);
} else if (spa_streq(k, "latency.internal.ns")) {
@ -1918,7 +1920,7 @@ static int enum_dsd_formats(struct state *state, uint32_t index, uint32_t *next,
0);
spa_pod_builder_prop(b, SPA_FORMAT_AUDIO_bitorder, 0);
spa_pod_builder_id(b, SPA_PARAM_BITORDER_msb);
spa_pod_builder_id(b, state->dsd_lsb ? SPA_PARAM_BITORDER_lsb : SPA_PARAM_BITORDER_msb);
spa_pod_builder_prop(b, SPA_FORMAT_AUDIO_interleave, 0);
spa_pod_builder_int(b, interleave);

View file

@ -228,6 +228,7 @@ struct state {
unsigned int is_pro:1;
unsigned int sources_added:1;
unsigned int auto_link:1;
unsigned int dsd_lsb:1;
unsigned int linked:1;
unsigned int is_batch:1;
unsigned int force_rate:1;