Skip to content

Commit

Permalink
[ALSA] ymfpci: fix swapped channels in SPDIF output
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Clemens Ladisch authored and Jaroslav Kysela committed Mar 22, 2006
1 parent 2734616 commit 153abaa
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sound/pci/ymfpci/ymfpci_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit 153abaa

Please sign in to comment.