aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-09-09 06:24:35 -0400
committerTakashi Iwai <tiwai@suse.de>2010-09-09 04:53:37 -0400
commit2dbf0ea29c1e4dff4ee5f0c59b367168fa2e5a40 (patch)
treef8dbd6df7e2cbaaf397fc65a15f284ba540e5c01 /sound/pci/oxygen
parent84cf83a28d4a3cd1fac1384cbaa4ed0ba650d309 (diff)
ALSA: virtuoso: Xonar DS: add stereo upmixing to center/LFE channels
Add the possibility to route a mix of the two channels of stereo data to the center and LFE outputs. Due to a WM8766 restriction, all surround and back channels also get the mixed L/R signal in this case. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/oxygen')
-rw-r--r--sound/pci/oxygen/xonar_wm87x6.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sound/pci/oxygen/xonar_wm87x6.c b/sound/pci/oxygen/xonar_wm87x6.c
index cee07fe3aa36..aceaaa036da6 100644
--- a/sound/pci/oxygen/xonar_wm87x6.c
+++ b/sound/pci/oxygen/xonar_wm87x6.c
@@ -377,6 +377,24 @@ static void update_wm87x6_mute(struct oxygen *chip)
377 (chip->dac_mute ? WM8766_DMUTE_MASK : 0)); 377 (chip->dac_mute ? WM8766_DMUTE_MASK : 0));
378} 378}
379 379
380static void update_wm8766_center_lfe_mix(struct oxygen *chip, bool mixed)
381{
382 struct xonar_wm87x6 *data = chip->model_data;
383 unsigned int reg;
384
385 /*
386 * The WM8766 can mix left and right channels, but this setting
387 * applies to all three stereo pairs.
388 */
389 reg = data->wm8766_regs[WM8766_DAC_CTRL] &
390 ~(WM8766_PL_LEFT_MASK | WM8766_PL_RIGHT_MASK);
391 if (mixed)
392 reg |= WM8766_PL_LEFT_LRMIX | WM8766_PL_RIGHT_LRMIX;
393 else
394 reg |= WM8766_PL_LEFT_LEFT | WM8766_PL_RIGHT_RIGHT;
395 wm8766_write_cached(chip, WM8766_DAC_CTRL, reg);
396}
397
380static void xonar_ds_gpio_changed(struct oxygen *chip) 398static void xonar_ds_gpio_changed(struct oxygen *chip)
381{ 399{
382 xonar_ds_handle_hp_jack(chip); 400 xonar_ds_handle_hp_jack(chip);
@@ -1067,6 +1085,7 @@ static const struct oxygen_model model_xonar_ds = {
1067 .set_adc_params = set_wm8776_adc_params, 1085 .set_adc_params = set_wm8776_adc_params,
1068 .update_dac_volume = update_wm87x6_volume, 1086 .update_dac_volume = update_wm87x6_volume,
1069 .update_dac_mute = update_wm87x6_mute, 1087 .update_dac_mute = update_wm87x6_mute,
1088 .update_center_lfe_mix = update_wm8766_center_lfe_mix,
1070 .gpio_changed = xonar_ds_gpio_changed, 1089 .gpio_changed = xonar_ds_gpio_changed,
1071 .dac_tlv = wm87x6_dac_db_scale, 1090 .dac_tlv = wm87x6_dac_db_scale,
1072 .model_data_size = sizeof(struct xonar_wm87x6), 1091 .model_data_size = sizeof(struct xonar_wm87x6),