output/alsa: set up the ALSA channel map
This is necessary for proper multi-channel support because many ALSA drivers do not use the channel maps from surround*.conf. Closes https://github.com/MusicPlayerDaemon/MPD/issues/2063
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "config.h"
|
||||
#include "AlsaOutputPlugin.hxx"
|
||||
#include "lib/alsa/AllowedFormat.hxx"
|
||||
#include "lib/alsa/ChannelMap.hxx"
|
||||
#include "lib/alsa/Error.hxx"
|
||||
#include "lib/alsa/HwSetup.hxx"
|
||||
#include "lib/alsa/NonBlock.hxx"
|
||||
@@ -551,6 +552,8 @@ AlsaOutput::Setup(AudioFormat &audio_format,
|
||||
hw_result.buffer_size,
|
||||
hw_result.period_size);
|
||||
|
||||
Alsa::SetupChannelMap(pcm, audio_format.channels, params);
|
||||
|
||||
AlsaSetupSw(pcm, hw_result.buffer_size - hw_result.period_size,
|
||||
hw_result.period_size);
|
||||
|
||||
@@ -820,7 +823,6 @@ AlsaOutput::Open(AudioFormat &audio_format)
|
||||
#endif
|
||||
|
||||
PcmExport::Params params;
|
||||
params.alsa_channel_order = true;
|
||||
|
||||
try {
|
||||
SetupOrDop(audio_format, params
|
||||
|
||||
Reference in New Issue
Block a user