diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2008-01-18 03:17:53 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 11:30:04 -0500 |
commit | c2353a0826d2b8fe9f5c6a6aca99149e4ee7b196 (patch) | |
tree | bd15b1625da94b87a6f0602b47a35c09385f56ba /sound/pci/oxygen/oxygen.c | |
parent | 4052ce4cbf48531bdd8ff43b673ccb5c005dec79 (diff) |
[ALSA] oxygen: add register definitions
Add more symbols for registers and register fields.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/oxygen/oxygen.c')
-rw-r--r-- | sound/pci/oxygen/oxygen.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c index e618cde7f9e4..e0e54ab51e5c 100644 --- a/sound/pci/oxygen/oxygen.c +++ b/sound/pci/oxygen/oxygen.c | |||
@@ -102,18 +102,21 @@ static void ak4396_write(struct oxygen *chip, unsigned int codec, | |||
102 | static const u8 codec_spi_map[4] = { | 102 | static const u8 codec_spi_map[4] = { |
103 | 0, 1, 2, 4 | 103 | 0, 1, 2, 4 |
104 | }; | 104 | }; |
105 | oxygen_write_spi(chip, OXYGEN_SPI_TRIGGER_WRITE | | 105 | oxygen_write_spi(chip, OXYGEN_SPI_TRIGGER | |
106 | OXYGEN_SPI_DATA_LENGTH_2 | | 106 | OXYGEN_SPI_DATA_LENGTH_2 | |
107 | OXYGEN_SPI_CLOCK_160 | | ||
107 | (codec_spi_map[codec] << OXYGEN_SPI_CODEC_SHIFT) | | 108 | (codec_spi_map[codec] << OXYGEN_SPI_CODEC_SHIFT) | |
108 | OXYGEN_SPI_MAGIC, | 109 | OXYGEN_SPI_CEN_LATCH_CLOCK_HI, |
109 | AK4396_WRITE | (reg << 8) | value); | 110 | AK4396_WRITE | (reg << 8) | value); |
110 | } | 111 | } |
111 | 112 | ||
112 | static void wm8785_write(struct oxygen *chip, u8 reg, unsigned int value) | 113 | static void wm8785_write(struct oxygen *chip, u8 reg, unsigned int value) |
113 | { | 114 | { |
114 | oxygen_write_spi(chip, OXYGEN_SPI_TRIGGER_WRITE | | 115 | oxygen_write_spi(chip, OXYGEN_SPI_TRIGGER | |
115 | OXYGEN_SPI_DATA_LENGTH_2 | | 116 | OXYGEN_SPI_DATA_LENGTH_2 | |
116 | (3 << OXYGEN_SPI_CODEC_SHIFT), | 117 | OXYGEN_SPI_CLOCK_160 | |
118 | (3 << OXYGEN_SPI_CODEC_SHIFT) | | ||
119 | OXYGEN_SPI_CEN_LATCH_CLOCK_LO, | ||
117 | (reg << 9) | value); | 120 | (reg << 9) | value); |
118 | } | 121 | } |
119 | 122 | ||