summaryrefslogtreecommitdiffstats
path: root/audio/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-09 03:58:47 +0100
committerwm4 <wm4@nowhere>2015-01-09 03:58:47 +0100
commit7f2b78846b1335f399ec93b578431e87e03a229c (patch)
treed793e3fb589f8081a93787f1dcb8ab1aea7f5152 /audio/out
parentf2fd0c48cca1ccad5ea19fe3e76db382f76fd588 (diff)
downloadmpv-7f2b78846b1335f399ec93b578431e87e03a229c.tar.bz2
mpv-7f2b78846b1335f399ec93b578431e87e03a229c.tar.xz
ao_alsa: fix dtshd passthrough
We must not try to remap channels with this. Whethever ALSA gives us, and whatever we do with it, the result will probably be nonsense. Untested, as I don't have the required hardware.
Diffstat (limited to 'audio/out')
-rw-r--r--audio/out/ao_alsa.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c
index eb9095cbbc..30c7b05a6f 100644
--- a/audio/out/ao_alsa.c
+++ b/audio/out/ao_alsa.c
@@ -478,7 +478,9 @@ static int init_device(struct ao *ao)
CHECK_ALSA_ERROR("Unable to set access type");
struct mp_chmap dev_chmap = ao->channels;
- if (query_chmaps(ao, &dev_chmap)) {
+ if (AF_FORMAT_IS_IEC61937(ao->format)) {
+ dev_chmap.num = 0; // disable chmap API
+ } else if (query_chmaps(ao, &dev_chmap)) {
ao->channels = dev_chmap;
} else {
// Assume only stereo and mono are supported.
@@ -567,7 +569,9 @@ static int init_device(struct ao *ao)
MP_VERBOSE(ao, "which we understand as: %s\n", mp_chmap_to_str(&chmap));
- if (mp_chmap_is_valid(&chmap)) {
+ if (AF_FORMAT_IS_IEC61937(ao->format)) {
+ MP_VERBOSE(ao, "using spdif passthrough; ignoring the channel map.\n");
+ } else if (mp_chmap_is_valid(&chmap)) {
if (mp_chmap_equals(&chmap, &ao->channels)) {
MP_VERBOSE(ao, "which is what we requested.\n");
} else if (chmap.num == ao->channels.num) {