提交 b87c464e 编写于 作者: T Trent Piepho 提交者: Jaroslav Kysela

[ALSA] ca0106: remove extra commands in SPI DAC init sequence

The init sequence set a number of registers more than once to different
values.  It's only necessary to set them once to their final values.
It also never actually updated the digital attenuation settings.
Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@suse.cz>
上级 18b5d32f
...@@ -1262,25 +1262,19 @@ static int __devinit snd_ca0106_pcm(struct snd_ca0106 *emu, int device, struct s ...@@ -1262,25 +1262,19 @@ static int __devinit snd_ca0106_pcm(struct snd_ca0106 *emu, int device, struct s
static unsigned int spi_dac_init[] = { static unsigned int spi_dac_init[] = {
SPI_REG(SPI_LDA1_REG, SPI_DA_BIT_0dB), /* 0dB dig. attenuation */ SPI_REG(SPI_LDA1_REG, SPI_DA_BIT_0dB), /* 0dB dig. attenuation */
SPI_REG(SPI_RDA1_REG, SPI_DA_BIT_0dB), SPI_REG(SPI_RDA1_REG, SPI_DA_BIT_0dB),
SPI_REG(SPI_PL_REG, 0x00), SPI_REG(SPI_PL_REG, SPI_PL_BIT_L_L | SPI_PL_BIT_R_R | SPI_IZD_BIT),
SPI_REG(SPI_PL_REG, SPI_PL_BIT_L_L | SPI_PL_BIT_R_R), SPI_REG(SPI_FMT_REG, SPI_FMT_BIT_I2S | SPI_IWL_BIT_24),
SPI_REG(SPI_FMT_REG, SPI_FMT_BIT_RJ | SPI_IWL_BIT_24),
SPI_REG(SPI_LDA2_REG, SPI_DA_BIT_0dB), SPI_REG(SPI_LDA2_REG, SPI_DA_BIT_0dB),
SPI_REG(SPI_RDA2_REG, SPI_DA_BIT_0dB), SPI_REG(SPI_RDA2_REG, SPI_DA_BIT_0dB),
SPI_REG(SPI_LDA3_REG, SPI_DA_BIT_0dB), SPI_REG(SPI_LDA3_REG, SPI_DA_BIT_0dB),
SPI_REG(SPI_RDA3_REG, SPI_DA_BIT_0dB), SPI_REG(SPI_RDA3_REG, SPI_DA_BIT_0dB),
SPI_REG(SPI_MASTDA_REG, SPI_DA_BIT_0dB), SPI_REG(SPI_MASTDA_REG, SPI_DA_BIT_0dB),
SPI_REG(9, 0x00), SPI_REG(9, 0x00),
SPI_REG(SPI_MS_REG, 0x00), SPI_REG(SPI_MS_REG, SPI_DACD0_BIT | SPI_DACD1_BIT | SPI_DACD2_BIT),
SPI_REG(SPI_MS_REG, SPI_RATE_BIT_256),
SPI_REG(12, 0x00), SPI_REG(12, 0x00),
SPI_REG(SPI_LDA4_REG, SPI_DA_BIT_0dB), SPI_REG(SPI_LDA4_REG, SPI_DA_BIT_0dB),
SPI_REG(SPI_RDA4_REG, SPI_DA_BIT_0dB), SPI_REG(SPI_RDA4_REG, SPI_DA_BIT_0dB | SPI_DA_BIT_UPDATE),
SPI_REG(15, 0x00), SPI_REG(SPI_DACD4_REG, 0x00),
SPI_REG(SPI_PL_REG, SPI_PL_BIT_L_L | SPI_PL_BIT_R_R | SPI_IZD_BIT),
SPI_REG(SPI_FMT_REG, SPI_FMT_BIT_I2S),
SPI_REG(SPI_FMT_REG, SPI_FMT_BIT_I2S | SPI_IWL_BIT_24),
SPI_REG(SPI_MS_REG, SPI_DACD0_BIT | SPI_DACD1_BIT | SPI_DACD2_BIT),
}; };
static unsigned int i2c_adc_init[][2] = { static unsigned int i2c_adc_init[][2] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册