diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-17 20:03:55 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-17 20:03:55 +0000 |
commit | efeaeab3c450bfa3484becb9fe4bdd0d7eb143fa (patch) | |
tree | 5377e0732b8e8d1c0366ce678d39e909b0d40303 | |
parent | 69a5c44698afc17f8f936c426c00a8af8d17fa9c (diff) |
Only use S/PDIF output when no other alsa device is set, allows to use
external ac3 decoders.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13662 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | DOCS/man/en/mplayer.1 | 2 | ||||
-rw-r--r-- | libao2/ao_alsa.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 5c77ac63f2..8eab94737e 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -1752,6 +1752,8 @@ Sets noblock-mode. .IPs device=<device> Sets the device name. Replace any ',' with '.' and any ':' with '=' in the ALSA device name. +Make sure you do not set this when you want hwac3 output via S/PDIF, unless +you really know how to set it correctly. .RE .PD 1 . diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c index 7089e8810f..85a13289a4 100644 --- a/libao2/ao_alsa.c +++ b/libao2/ao_alsa.c @@ -405,6 +405,7 @@ static int init(int rate_hz, int channels, int format, int flags) } } + if (!device_set) { /* switch for spdif * sets opening sequence for SPDIF * sets also the playback and other switches 'on the fly' @@ -430,24 +431,21 @@ static int init(int rate_hz, int channels, int format, int flags) s[0], s[1], s[2], s[3]); mp_msg(MSGT_AO,MSGL_V,"alsa-spdif-init: playing AC3, %i channels\n", channels); - device_set = 1; break; case 4: strncpy(alsa_device, "surround40", ALSA_DEVICE_SIZE); - device_set = 1; break; case 6: strncpy(alsa_device, "surround51", ALSA_DEVICE_SIZE); - device_set = 1; break; default: mp_msg(MSGT_AO,MSGL_ERR,"alsa-spdif-init: %d channels are not supported\n", channels); } } + else - if (!device_set) { int tmp_device, tmp_subdevice, err; @@ -474,6 +472,7 @@ static int init(int rate_hz, int channels, int format, int flags) } mp_msg(MSGT_AO,MSGL_INFO,"alsa-init: %d soundcard%s found, using: %s\n", cards+1,(cards >= 0) ? "" : "s", alsa_device); + } } else { mp_msg(MSGT_AO,MSGL_INFO,"alsa-init: soundcard set to %s\n", alsa_device); } |