summaryrefslogtreecommitdiffstats
path: root/src/modules/alsa/alsa-sink.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/modules/alsa/alsa-sink.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/modules/alsa/alsa-sink.c')
-rw-r--r--src/modules/alsa/alsa-sink.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 2e54dbe7..80fdcaa2 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1616,6 +1616,13 @@ static int setup_mixer(struct userdata *u, pa_bool_t ignore_dB) {
return 0;
}
+ /* FIXME: need automatic detection rather than hard-coded path */
+ if (!strcmp(u->mixer_path->name, "iec958-passthrough-output")) {
+ u->sink->flags |= PA_SINK_PASSTHROUGH;
+ } else {
+ u->sink->flags &= ~PA_SINK_PASSTHROUGH;
+ }
+
if (!u->mixer_path->has_volume)
pa_log_info("Driver does not support hardware volume control, falling back to software volume control.");
else {