summaryrefslogtreecommitdiffstats
path: root/src/pulse/stream.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@intel.com>2010-07-16 16:46:28 -0500
committerColin Guthrie <cguthrie@mandriva.org>2010-08-12 18:20:27 +0100
commit9b6c84ad6e572854f199379177226e24c317d0d8 (patch)
tree78f42ead5de58e510b75407e3d1d8e99c15055b3 /src/pulse/stream.c
parent021aa306aa614385ff2029fd152008d4f9107414 (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/pulse/stream.c')
-rw-r--r--src/pulse/stream.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/pulse/stream.c b/src/pulse/stream.c
index 36514e0e..87c24ba8 100644
--- a/src/pulse/stream.c
+++ b/src/pulse/stream.c
@@ -1065,7 +1065,9 @@ static int create_stream(
PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND|
PA_STREAM_START_UNMUTED|
PA_STREAM_FAIL_ON_SUSPEND|
- PA_STREAM_RELATIVE_VOLUME)), PA_ERR_INVALID);
+ PA_STREAM_RELATIVE_VOLUME|
+ PA_STREAM_PASSTHROUGH)), PA_ERR_INVALID);
+
PA_CHECK_VALIDITY(s->context, s->context->version >= 12 || !(flags & PA_STREAM_VARIABLE_RATE), PA_ERR_NOTSUPPORTED);
PA_CHECK_VALIDITY(s->context, s->context->version >= 13 || !(flags & PA_STREAM_PEAK_DETECT), PA_ERR_NOTSUPPORTED);
@@ -1206,6 +1208,12 @@ static int create_stream(
}
+ if (s->context->version >= 18) {
+
+ if (s->direction == PA_STREAM_PLAYBACK)
+ pa_tagstruct_put_boolean(t, flags & (PA_STREAM_PASSTHROUGH));
+ }
+
pa_pstream_send_tagstruct(s->context->pstream, t);
pa_pdispatch_register_reply(s->context->pdispatch, tag, DEFAULT_TIMEOUT, pa_create_stream_callback, s, NULL);