[AE] ALSA: Do not try to bypass dmix for other sample rates #2422

Merged
1 commit merged into from Apr 5, 2013

Projects

None yet

2 participants

Member
anssih commented Mar 11, 2013

Currently the ALSA sink tries to bypass ALSA dmix when the audio sample
rate is different from dmix sample rate (usually 48000). This is done by
opening "front" device instead of "default" (or "sysdefault").

However, this has the effect that stereo audio is only played on the
front speakers, while "default" device might have routed the audio to
multiple speakers on a multichannel system. This effect is triggered
even on systems that have a hardware mixer and therefore no dmix in the
first place.

To avoid this issue, remove the bypass behavior that was added between
11.0 and 12.0. This change affects stereo audio only as multichannel
audio does not normally have ALSA dmix in the first place.

It would not have been feasible to limit the previous behavior to dmix
systems only, since the ALSA design does not allow us to easily detect
dmix, since user applications should not care about that. If dmix is not
wanted, the user should not have it enabled in the first place.

This supersedes PR #1909.

@anssih anssih [AE] ALSA: Do not try to bypass dmix for other sample rates
Currently the ALSA sink tries to bypass ALSA dmix when the audio sample
rate is different from dmix sample rate (usually 48000). This is done by
opening "front" device instead of "default" (or "sysdefault").

However, this has the effect that stereo audio is only played on the
front speakers, while "default" device might have routed the audio to
multiple speakers on a multichannel system. This effect is triggered
even on systems that have a hardware mixer and therefore no dmix in the
first place.

To avoid this issue, remove the bypass behavior that was added between
11.0 and 12.0. This change affects stereo audio only as multichannel
audio does not normally have ALSA dmix in the first place.

It would not have been feasible to limit the previous behavior to dmix
systems only, since the ALSA design does not allow us to easily detect
dmix, since user applications should not care about that. If dmix is not
wanted, the user should not have it enabled in the first place.
f5dcb94
Contributor
manio commented Mar 11, 2013

Tested on my SB Audigy. Works as expected! Thank you very much!

@ghost ghost merged commit fa78d51 into xbmc:master Apr 5, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment