From: Clemens Ladisch Date: Fri, 13 Jan 2006 06:48:59 +0000 (+0100) Subject: [ALSA] ymfpci: fix swapped channels in SPDIF output X-Git-Tag: firefly_0821_release~37155^2~18^2~117 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=153abaa4ff0500070a282dd0868367d69388d527;p=firefly-linux-kernel-4.4.55.git [ALSA] ymfpci: fix swapped channels in SPDIF output Modules: YMFPCI driver The routing of the effect 2/3 channels to the digital output is the opposite of the rear analog output (left/right swapped). We make the order correct for the digital output (which will make the analog rear have the channels swapped) to make AC3 output work. Signed-off-by: Clemens Ladisch --- diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index a1aa74b79b3d..30ee53adb494 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c @@ -536,13 +536,17 @@ static void snd_ymfpci_pcm_init_voice(struct snd_ymfpci_pcm *ypcm, unsigned int } } if (ypcm->output_rear) { + /* The SPDIF out channels seem to be swapped, so we have + * to swap them here, too. The rear analog out channels + * will be wrong, but otherwise AC3 would not work. + */ if (use_left) { - bank->eff2_gain = - bank->eff2_gain_end = vol_left; + bank->eff3_gain = + bank->eff3_gain_end = vol_left; } if (use_right) { - bank->eff3_gain = - bank->eff3_gain_end = vol_right; + bank->eff2_gain = + bank->eff2_gain_end = vol_right; } } }