common: Use more generic stream property for audio source.
[common] Use more generic stream property for audio source. JB#55711
This commit is contained in:
parent
98d2c7358a
commit
1781dab3b8
2 changed files with 5 additions and 4 deletions
|
|
@ -1771,7 +1771,7 @@ bool pa_droid_stream_reconfigure_input(pa_droid_stream *s,
|
|||
if (proplist) {
|
||||
const char *source;
|
||||
/* If audio source is defined in source-output proplist use that instead. */
|
||||
if ((source = pa_proplist_gets(proplist, PROP_DROID_INPUT_AUDIO_SOURCE)))
|
||||
if ((source = pa_proplist_gets(proplist, EXT_PROP_AUDIO_SOURCE)))
|
||||
pa_string_convert_str_to_num(CONV_STRING_AUDIO_SOURCE_FANCY, source, &audio_source);
|
||||
}
|
||||
|
||||
|
|
@ -1817,12 +1817,12 @@ bool pa_droid_stream_reconfigure_input_needed(pa_droid_stream *s,
|
|||
audio_source_t audio_source;
|
||||
|
||||
/* If audio source is defined in source-output proplist use that instead. */
|
||||
if ((source = pa_proplist_gets(proplist, PROP_DROID_INPUT_AUDIO_SOURCE))) {
|
||||
if ((source = pa_proplist_gets(proplist, EXT_PROP_AUDIO_SOURCE))) {
|
||||
if (pa_string_convert_str_to_num(CONV_STRING_AUDIO_SOURCE_FANCY, source, &audio_source) &&
|
||||
s->module->state.audio_source != audio_source) {
|
||||
|
||||
reconfigure_needed = true;
|
||||
pa_log_debug("input reconfigure needed: " PROP_DROID_INPUT_AUDIO_SOURCE " changes");
|
||||
pa_log_debug("input reconfigure needed: " EXT_PROP_AUDIO_SOURCE " changes");
|
||||
}
|
||||
} else {
|
||||
if (pa_input_device_default_audio_source(s->module->state.input_device, &audio_source) &&
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@
|
|||
#define PROP_DROID_OUTPUT_OFFLOAD "droid.output.offload"
|
||||
#define PROP_DROID_INPUT_BUILTIN "droid.input.builtin"
|
||||
#define PROP_DROID_INPUT_EXTERNAL "droid.input.external"
|
||||
#define PROP_DROID_INPUT_AUDIO_SOURCE "droid.input.source"
|
||||
|
||||
#define EXT_PROP_AUDIO_SOURCE "audio.source"
|
||||
|
||||
#define PA_DROID_PRIMARY_DEVICE "primary"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue