summaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen_pcm.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-01-21 08:44:24 +0100
committerJaroslav Kysela <perex@perex.cz>2008-01-31 17:30:05 +0100
commitc9946b2c807aa2e6829765accc267415a893f74a (patch)
treea0013598935d3da7b1f117eccb3c28f316167d34 /sound/pci/oxygen/oxygen_pcm.c
parent48a8a26dd8ea1f7aeacef6b48f2d4d45508f46ba (diff)
downloadblackbird-op-linux-c9946b2c807aa2e6829765accc267415a893f74a.tar.gz
blackbird-op-linux-c9946b2c807aa2e6829765accc267415a893f74a.zip
[ALSA] oxygen: remove magic numbers
Replace some magic numbers with register symbols. 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.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c
index 72481fdd11f3..f147f97bc696 100644
--- a/sound/pci/oxygen/oxygen_pcm.c
+++ b/sound/pci/oxygen/oxygen_pcm.c
@@ -396,7 +396,9 @@ 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_clear_bits8(chip, OXYGEN_REC_ROUTING, 0x08);
+ 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);
@@ -428,7 +430,9 @@ 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_clear_bits8(chip, OXYGEN_REC_ROUTING, 0x10);
+ 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);
@@ -451,7 +455,9 @@ 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_clear_bits8(chip, OXYGEN_REC_ROUTING, 0x20);
+ 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;
}
@@ -504,7 +510,11 @@ static int oxygen_multich_hw_params(struct snd_pcm_substream *substream,
OXYGEN_I2S_RATE_MASK |
OXYGEN_I2S_FORMAT_MASK |
OXYGEN_I2S_BITS_MASK);
- oxygen_clear_bits16(chip, OXYGEN_PLAY_ROUTING, 0x001f);
+ 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);
OpenPOWER on IntegriCloud