diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@intel.com> | 2010-07-16 16:46:28 -0500 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2010-08-12 18:20:27 +0100 |
commit | 9b6c84ad6e572854f199379177226e24c317d0d8 (patch) | |
tree | 78f42ead5de58e510b75407e3d1d8e99c15055b3 /src/pulsecore/protocol-native.c | |
parent | 021aa306aa614385ff2029fd152008d4f9107414 (diff) |
AC3 passthrough support
Second version after Tanu's feedback
TODO:
- notify client that volume control is disabled
- change sink rate in passthrough mode if needed
- automatic detection of passthrough mode instead of hard
coded profile names
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Diffstat (limited to 'src/pulsecore/protocol-native.c')
-rw-r--r-- | src/pulsecore/protocol-native.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index f3d240b3..adb995f0 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -1873,7 +1873,9 @@ static void command_create_playback_stream(pa_pdispatch *pd, uint32_t command, u dont_inhibit_auto_suspend = FALSE, muted_set = FALSE, fail_on_suspend = FALSE, - relative_volume = FALSE; + relative_volume = FALSE, + passthrough = FALSE; + pa_sink_input_flags_t flags = 0; pa_proplist *p; pa_bool_t volume_set = TRUE; @@ -1975,6 +1977,15 @@ static void command_create_playback_stream(pa_pdispatch *pd, uint32_t command, u } } + if (c->version >= 18) { + + if (pa_tagstruct_get_boolean(t, &passthrough) < 0 ) { + protocol_error(c); + pa_proplist_free(p); + return; + } + } + if (!pa_tagstruct_eof(t)) { protocol_error(c); pa_proplist_free(p); @@ -2008,7 +2019,8 @@ static void command_create_playback_stream(pa_pdispatch *pd, uint32_t command, u (no_move ? PA_SINK_INPUT_DONT_MOVE : 0) | (variable_rate ? PA_SINK_INPUT_VARIABLE_RATE : 0) | (dont_inhibit_auto_suspend ? PA_SINK_INPUT_DONT_INHIBIT_AUTO_SUSPEND : 0) | - (fail_on_suspend ? PA_SINK_INPUT_NO_CREATE_ON_SUSPEND|PA_SINK_INPUT_KILL_ON_SUSPEND : 0); + (fail_on_suspend ? PA_SINK_INPUT_NO_CREATE_ON_SUSPEND|PA_SINK_INPUT_KILL_ON_SUSPEND : 0) | + (passthrough ? PA_SINK_INPUT_PASSTHROUGH : 0); /* Only since protocol version 15 there's a seperate muted_set * flag. For older versions we synthesize it here */ |