aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-01-21 02:51:19 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:30:07 -0500
commit3b94253bc9c950d2038a2db4f9c804b50f82001a (patch)
tree31ed15b2e228ccc1a64b1ca9279a495aaebd0251 /sound/pci
parent71e22a4b77fb36ce3205122454f5500843bed3ea (diff)
[ALSA] oxygen: reduce SPI clock frequency for AK4396/WM8785
According to the datasheets, the SPI clock cycle must be at least 200 ns for the AK4396 and the WM8785, so we cannot use the default 160 ns. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/oxygen/oxygen.c4
-rw-r--r--sound/pci/oxygen/oxygen_io.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index 0a7c6135c072..35b26014925f 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -166,7 +166,7 @@ static void ak4396_write(struct oxygen *chip, unsigned int codec,
166 }; 166 };
167 oxygen_write_spi(chip, OXYGEN_SPI_TRIGGER | 167 oxygen_write_spi(chip, OXYGEN_SPI_TRIGGER |
168 OXYGEN_SPI_DATA_LENGTH_2 | 168 OXYGEN_SPI_DATA_LENGTH_2 |
169 OXYGEN_SPI_CLOCK_160 | 169 OXYGEN_SPI_CLOCK_320 |
170 (codec_spi_map[codec] << OXYGEN_SPI_CODEC_SHIFT) | 170 (codec_spi_map[codec] << OXYGEN_SPI_CODEC_SHIFT) |
171 OXYGEN_SPI_CEN_LATCH_CLOCK_HI, 171 OXYGEN_SPI_CEN_LATCH_CLOCK_HI,
172 AK4396_WRITE | (reg << 8) | value); 172 AK4396_WRITE | (reg << 8) | value);
@@ -176,7 +176,7 @@ static void wm8785_write(struct oxygen *chip, u8 reg, unsigned int value)
176{ 176{
177 oxygen_write_spi(chip, OXYGEN_SPI_TRIGGER | 177 oxygen_write_spi(chip, OXYGEN_SPI_TRIGGER |
178 OXYGEN_SPI_DATA_LENGTH_2 | 178 OXYGEN_SPI_DATA_LENGTH_2 |
179 OXYGEN_SPI_CLOCK_160 | 179 OXYGEN_SPI_CLOCK_320 |
180 (3 << OXYGEN_SPI_CODEC_SHIFT) | 180 (3 << OXYGEN_SPI_CODEC_SHIFT) |
181 OXYGEN_SPI_CEN_LATCH_CLOCK_LO, 181 OXYGEN_SPI_CEN_LATCH_CLOCK_LO,
182 (reg << 9) | value); 182 (reg << 9) | value);
diff --git a/sound/pci/oxygen/oxygen_io.c b/sound/pci/oxygen/oxygen_io.c
index ebafc65dc345..d0cdce041dd8 100644
--- a/sound/pci/oxygen/oxygen_io.c
+++ b/sound/pci/oxygen/oxygen_io.c
@@ -174,7 +174,7 @@ void oxygen_write_spi(struct oxygen *chip, u8 control, unsigned int data)
174{ 174{
175 unsigned int count; 175 unsigned int count;
176 176
177 /* should not need more than 3.84 us (24 * 160 ns) */ 177 /* should not need more than 7.68 us (24 * 320 ns) */
178 count = 10; 178 count = 10;
179 while ((oxygen_read8(chip, OXYGEN_SPI_CONTROL) & OXYGEN_SPI_BUSY) 179 while ((oxygen_read8(chip, OXYGEN_SPI_CONTROL) & OXYGEN_SPI_BUSY)
180 && count > 0) { 180 && count > 0) {