diff options
author | wm4 <wm4@nowhere> | 2015-01-09 03:58:47 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-09 03:58:47 +0100 |
commit | 7f2b78846b1335f399ec93b578431e87e03a229c (patch) | |
tree | d793e3fb589f8081a93787f1dcb8ab1aea7f5152 /audio | |
parent | f2fd0c48cca1ccad5ea19fe3e76db382f76fd588 (diff) | |
download | mpv-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')
-rw-r--r-- | audio/out/ao_alsa.c | 8 |
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) { |