diff options
author | James Courtier-Dutton <jcdutton@users.sourceforge.net> | 2003-09-01 04:08:41 +0000 |
---|---|---|
committer | James Courtier-Dutton <jcdutton@users.sourceforge.net> | 2003-09-01 04:08:41 +0000 |
commit | b822540787bcecffb5170ac808ebb7df9f01a0d1 (patch) | |
tree | c018376325e4705c9ea428bd55d95269bc364e1f /src/audio_out/audio_alsa_out.c | |
parent | b9eb785a112c0a759fc30152a88ee2e9f38a11f2 (diff) | |
download | xine-lib-b822540787bcecffb5170ac808ebb7df9f01a0d1.tar.gz xine-lib-b822540787bcecffb5170ac808ebb7df9f01a0d1.tar.bz2 |
Add proper support for 4.1 and 5 channel setups.
For 4.1, the output comes out on 3 stereo jacks, but the Center has been mixed with the Front speakers.
For 5, the LFE channel has been dropped.
CVS patchset: 5324
CVS date: 2003/09/01 04:08:41
Diffstat (limited to 'src/audio_out/audio_alsa_out.c')
-rw-r--r-- | src/audio_out/audio_alsa_out.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 09a13fe15..c88e1291c 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -26,7 +26,7 @@ * (c) 2001 James Courtier-Dutton <James@superbug.demon.co.uk> * * - * $Id: audio_alsa_out.c,v 1.105 2003/09/01 00:51:45 jcdutton Exp $ + * $Id: audio_alsa_out.c,v 1.106 2003/09/01 04:08:41 jcdutton Exp $ */ #ifdef HAVE_CONFIG_H @@ -321,22 +321,14 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int 10, NULL, NULL); break; + case AO_CAP_MODE_4_1CHANNEL: case AO_CAP_MODE_5CHANNEL: - this->num_channels = 5; - pcm_device = config->register_string(config, - "audio.alsa_surround50_device", - "surround51", - _("device used for 5-channel output"), - NULL, - 10, NULL, - NULL); - break; case AO_CAP_MODE_5_1CHANNEL: this->num_channels = 6; pcm_device = config->register_string(config, "audio.alsa_surround51_device", "surround51", - _("device used for 5.1-channel output"), + _("device used for 5+ channel output"), NULL, 10, NULL, NULL); @@ -1205,13 +1197,6 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da 10, NULL, NULL); pcm_device = config->register_string(config, - "audio.alsa_surround50_device", - "surround51", - _("device used for 5-channel output"), - NULL, - 10, NULL, - NULL); - pcm_device = config->register_string(config, "audio.alsa_surround51_device", "surround51", _("device used for 5.1-channel output"), @@ -1298,7 +1283,21 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da } else if (class->xine->verbosity >= XINE_VERBOSITY_LOG) { printf ("(4-channel not enabled in xine config) " ); } - if (!(snd_pcm_hw_params_test_channels(this->audio_fd, params, 5)) && + if (!(snd_pcm_hw_params_test_channels(this->audio_fd, params, 6)) && + config->register_bool (config, + "audio.four_lfe_channel", + 0, + _("used to inform xine about what the sound card can do"), + NULL, + 0, NULL, + NULL) ) { + this->capabilities |= AO_CAP_MODE_4_1CHANNEL; + if (class->xine->verbosity >= XINE_VERBOSITY_LOG) + printf ("4.1-channel "); + } else if (class->xine->verbosity >= XINE_VERBOSITY_LOG) { + printf ("(4.1-channel not enabled in xine config) " ); + } + if (!(snd_pcm_hw_params_test_channels(this->audio_fd, params, 6)) && config->register_bool (config, "audio.five_channel", 0, |