ALSA: virtuoso: use headphone gain setting only on front DAC
authorClemens Ladisch <clemens@ladisch.de>
Mon, 10 Jan 2011 15:11:32 +0000 (16:11 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 10 Jan 2011 15:46:28 +0000 (16:46 +0100)
Do not apply the headphone gain offset to any but the front DAC.  These
DACs would not be used in headphone mode, so this saves a few register
writes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/oxygen/xonar_pcm179x.c

index 2d0a634a7239d5afe74e4107148e2ac532f3afdb..e15ecee2ccf72e18d9f4f72469f6af288072d21d 100644 (file)
@@ -319,6 +319,7 @@ static void pcm1796_registers_init(struct oxygen *chip)
                pcm1796_write(chip, i, 20,
                              data->pcm1796_regs[0][20 - PCM1796_REG_BASE]);
                pcm1796_write(chip, i, 21, 0);
+               gain_offset = 0;
        }
 }
 
@@ -615,6 +616,7 @@ static void update_pcm1796_volume(struct oxygen *chip)
                                     + gain_offset);
                pcm1796_write_cached(chip, i, 17, chip->dac_volume[i * 2 + 1]
                                     + gain_offset);
+               gain_offset = 0;
        }
 }