summaryrefslogtreecommitdiff
path: root/sound/pci/oxygen/oxygen_pcm.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-01-25 10:39:26 +0300
committerJaroslav Kysela <perex@perex.cz>2008-01-31 19:30:15 +0300
commitb78e3dbb04ab4cbe3b94ef5426bcd5b167b6fc75 (patch)
treee234f43f207365b6dc2578a725de38ad16ad668d /sound/pci/oxygen/oxygen_pcm.c
parent976cd62700ae378df330ec82112da3d17e33a0fe (diff)
downloadlinux-b78e3dbb04ab4cbe3b94ef5426bcd5b167b6fc75.tar.xz
[ALSA] oxygen: more initialization
Initialize more registers of the controller and the second AC97 codec. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/oxygen/oxygen_pcm.c')
-rw-r--r--sound/pci/oxygen/oxygen_pcm.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c
index df1d0cae1dad..5b89c727601e 100644
--- a/sound/pci/oxygen/oxygen_pcm.c
+++ b/sound/pci/oxygen/oxygen_pcm.c
@@ -253,8 +253,10 @@ static unsigned int oxygen_rate(struct snd_pcm_hw_params *hw_params)
static unsigned int oxygen_i2s_mclk(struct snd_pcm_hw_params *hw_params)
{
- return params_rate(hw_params) <= 96000
- ? OXYGEN_I2S_MCLK_256 : OXYGEN_I2S_MCLK_128;
+ if (params_rate(hw_params) <= 96000)
+ return OXYGEN_I2S_MCLK_256;
+ else
+ return OXYGEN_I2S_MCLK_128;
}
static unsigned int oxygen_i2s_bits(struct snd_pcm_hw_params *hw_params)
@@ -339,9 +341,6 @@ static int oxygen_rec_a_hw_params(struct snd_pcm_substream *substream,
OXYGEN_I2S_FORMAT_MASK |
OXYGEN_I2S_MCLK_MASK |
OXYGEN_I2S_BITS_MASK);
- oxygen_write8_masked(chip, OXYGEN_REC_ROUTING,
- OXYGEN_REC_A_ROUTE_I2S_ADC_1,
- OXYGEN_REC_A_ROUTE_MASK);
spin_unlock_irq(&chip->reg_lock);
mutex_lock(&chip->mutex);
@@ -373,9 +372,6 @@ static int oxygen_rec_b_hw_params(struct snd_pcm_substream *substream,
OXYGEN_I2S_FORMAT_MASK |
OXYGEN_I2S_MCLK_MASK |
OXYGEN_I2S_BITS_MASK);
- oxygen_write8_masked(chip, OXYGEN_REC_ROUTING,
- OXYGEN_REC_B_ROUTE_I2S_ADC_2,
- OXYGEN_REC_B_ROUTE_MASK);
spin_unlock_irq(&chip->reg_lock);
mutex_lock(&chip->mutex);
@@ -398,9 +394,6 @@ static int oxygen_rec_c_hw_params(struct snd_pcm_substream *substream,
oxygen_write8_masked(chip, OXYGEN_REC_FORMAT,
oxygen_format(hw_params) << OXYGEN_REC_FORMAT_C_SHIFT,
OXYGEN_REC_FORMAT_C_MASK);
- oxygen_write8_masked(chip, OXYGEN_REC_ROUTING,
- OXYGEN_REC_C_ROUTE_SPDIF,
- OXYGEN_REC_C_ROUTE_MASK);
spin_unlock_irq(&chip->reg_lock);
return 0;
}
@@ -453,11 +446,6 @@ static int oxygen_multich_hw_params(struct snd_pcm_substream *substream,
OXYGEN_I2S_RATE_MASK |
OXYGEN_I2S_FORMAT_MASK |
OXYGEN_I2S_BITS_MASK);
- oxygen_write16_masked(chip, OXYGEN_PLAY_ROUTING,
- OXYGEN_PLAY_MULTICH_I2S_DAC,
- OXYGEN_PLAY_MUTE01 | OXYGEN_PLAY_MUTE23 |
- OXYGEN_PLAY_MUTE45 | OXYGEN_PLAY_MUTE67 |
- OXYGEN_PLAY_MULTICH_MASK);
oxygen_update_dac_routing(chip);
oxygen_update_spdif_source(chip);
spin_unlock_irq(&chip->reg_lock);