udev-detect, alsa-card: Adopt avoid resampling option from daemon.conf

Previously, the "avoid-resampling" option of daemon.conf is to make the
daemon try to use the stream sample rate if possible for all sinks or
sources.

This patch applies this option to module-udev-detect and module-alsa-card
as a module argument in order to override the default value of daemon.conf.

As a result, user can use this argument for more fine-grained control.
e.g.) set it false in daemon.conf and set it true for module-udev-detect
or a particular module-alsa-card in default.pa.(or vice versa)

To set it, use "avoid_resampling=true or false" as the module argument.

Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
This commit is contained in:
Sangchul Lee 2018-05-25 01:29:53 +09:00 committed by Arun Raghavan
parent 3b2a5bdc10
commit ef094638f5
8 changed files with 64 additions and 8 deletions

View file

@ -84,6 +84,7 @@ struct pa_source {
pa_channel_map channel_map;
uint32_t default_sample_rate;
uint32_t alternate_sample_rate;
bool avoid_resampling:1;
pa_idxset *outputs;
unsigned n_corked;
@ -314,6 +315,7 @@ typedef struct pa_source_new_data {
pa_sample_spec sample_spec;
pa_channel_map channel_map;
uint32_t alternate_sample_rate;
bool avoid_resampling:1;
pa_cvolume volume;
bool muted:1;