aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2006-01-13 01:48:59 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:23:00 -0500
commit153abaa4ff0500070a282dd0868367d69388d527 (patch)
treee4b06f6631bc92ea3b2e976b6721932e8f965936
parent27346166a9b3b9eee586bce212502cddf9685a07 (diff)
[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 <clemens@ladisch.de>
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index a1aa74b79b3..30ee53adb49 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
536 } 536 }
537 } 537 }
538 if (ypcm->output_rear) { 538 if (ypcm->output_rear) {
539 /* The SPDIF out channels seem to be swapped, so we have
540 * to swap them here, too. The rear analog out channels
541 * will be wrong, but otherwise AC3 would not work.
542 */
539 if (use_left) { 543 if (use_left) {
540 bank->eff2_gain = 544 bank->eff3_gain =
541 bank->eff2_gain_end = vol_left; 545 bank->eff3_gain_end = vol_left;
542 } 546 }
543 if (use_right) { 547 if (use_right) {
544 bank->eff3_gain = 548 bank->eff2_gain =
545 bank->eff3_gain_end = vol_right; 549 bank->eff2_gain_end = vol_right;
546 } 550 }
547 } 551 }
548 } 552 }