summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Courtier-Dutton <jcdutton@users.sourceforge.net>2001-08-26 15:24:24 +0000
committerJames Courtier-Dutton <jcdutton@users.sourceforge.net>2001-08-26 15:24:24 +0000
commite47dedb1ac490fdb61a076aa2cc540af9dfd8a84 (patch)
tree1d795485d0dc9d4557177893b2eff0c0752b3e5a
parent495eee9aab20803634083129178b6bd8ab8565bf (diff)
downloadxine-lib-e47dedb1ac490fdb61a076aa2cc540af9dfd8a84.tar.gz
xine-lib-e47dedb1ac490fdb61a076aa2cc540af9dfd8a84.tar.bz2
MONO, STEREO, 4CHANNEL, 5CHANNEL and 5.1CHANNEL analogue audio out now work.
CVS patchset: 502 CVS date: 2001/08/26 15:24:24
-rw-r--r--src/audio_out/audio_alsa_out.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c
index 5e952710e..e20a636fe 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.21 2001/08/26 13:10:07 jcdutton Exp $
+ * $Id: audio_alsa_out.c,v 1.22 2001/08/26 15:24:24 jcdutton Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -460,12 +460,12 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
this = (alsa_driver_t *) malloc (sizeof (alsa_driver_t));
snd_pcm_hw_params_alloca(&params);
- pcm_device = config->lookup_str(config,"alsa_pcm_device", "hw:0,0");
+ pcm_device = config->lookup_str(config,"alsa_pcm_device", "default");
ac3_device = config->lookup_str(config,"alsa_ac3_device", "hw:0,2");
strcpy(this->audio_dev,pcm_device);
-
+ printf("audio_alsa_out: devicename=%s\n",pcm_device);
/*
* find best device driver/channel
*/
@@ -499,12 +499,15 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
this->capabilities |= AO_CAP_MODE_MONO;
if (!(snd_pcm_hw_params_test_channels(this->audio_fd, params, 2)))
this->capabilities |= AO_CAP_MODE_STEREO;
- if (!(snd_pcm_hw_params_test_channels(this->audio_fd, params, 4)))
- this->capabilities |= AO_CAP_MODE_4CHANNEL;
- if (!(snd_pcm_hw_params_test_channels(this->audio_fd, params, 5)))
- this->capabilities |= AO_CAP_MODE_5CHANNEL;
- if (!(snd_pcm_hw_params_test_channels(this->audio_fd, params, 6)))
- this->capabilities |= AO_CAP_MODE_5_1CHANNEL;
+ if (!(snd_pcm_hw_params_test_channels(this->audio_fd, params, 4)) &&
+ config->lookup_int (config, "four_channel", 0) )
+ this->capabilities |= AO_CAP_MODE_4CHANNEL;
+ if (!(snd_pcm_hw_params_test_channels(this->audio_fd, params, 5)) &&
+ config->lookup_int (config, "five_channel", 0) )
+ this->capabilities |= AO_CAP_MODE_5CHANNEL;
+ if (!(snd_pcm_hw_params_test_channels(this->audio_fd, params, 6)) &&
+ config->lookup_int (config, "five_lfe_channel", 0) )
+ this->capabilities |= AO_CAP_MODE_5_1CHANNEL;
snd_pcm_close (this->audio_fd);
this->audio_fd=NULL;
@@ -514,7 +517,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
strcpy(this->audio_dev,ac3_device);
printf("AC3 pass through activated\n");
}
- printf("Audio_alsa_out: Capabilities 0x%X\n",this->capabilities);
+ printf("audio_alsa_out: Capabilities 0x%X\n",this->capabilities);
this->ao_driver.get_capabilities = ao_alsa_get_capabilities;
this->ao_driver.get_property = ao_alsa_get_property;