[ALSA] oxygen: revert SPI clock frequency change for AK4396/WM8785
authorClemens Ladisch <clemens@ladisch.de>
Wed, 30 Jan 2008 07:38:30 +0000 (08:38 +0100)
committerMercurial server <hg@alsa0.alsa-project.org>
Thu, 31 Jan 2008 16:30:23 +0000 (17:30 +0100)
While the AK4396 and WM8785 datasheets say that the SPI clock cycle
length must be at least 200 ns, 320 ns seems not to work reliably with
the controller, so we better use 160 ns.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
sound/pci/oxygen/hifier.c
sound/pci/oxygen/oxygen.c

index 51c4d1ae9d023e6466d4860ac514f489551e4b69..3ea1f05228a18f04b090ff4b07fb0f804b8bfa84 100644 (file)
@@ -56,7 +56,7 @@ static void ak4396_write(struct oxygen *chip, u8 reg, u8 value)
 {
        oxygen_write_spi(chip, OXYGEN_SPI_TRIGGER  |
                         OXYGEN_SPI_DATA_LENGTH_2 |
-                        OXYGEN_SPI_CLOCK_320 |
+                        OXYGEN_SPI_CLOCK_160 |
                         (0 << OXYGEN_SPI_CODEC_SHIFT) |
                         OXYGEN_SPI_CEN_LATCH_CLOCK_HI,
                         AK4396_WRITE | (reg << 8) | value);
index 840e4a66eacdfeaba0f8cd040934a88caa305102..f31a0eb409b0837cf167ccc93ea8ecafd07f6cab 100644 (file)
@@ -129,7 +129,7 @@ static void ak4396_write(struct oxygen *chip, unsigned int codec,
        };
        oxygen_write_spi(chip, OXYGEN_SPI_TRIGGER |
                         OXYGEN_SPI_DATA_LENGTH_2 |
-                        OXYGEN_SPI_CLOCK_320 |
+                        OXYGEN_SPI_CLOCK_160 |
                         (codec_spi_map[codec] << OXYGEN_SPI_CODEC_SHIFT) |
                         OXYGEN_SPI_CEN_LATCH_CLOCK_HI,
                         AK4396_WRITE | (reg << 8) | value);
@@ -139,7 +139,7 @@ static void wm8785_write(struct oxygen *chip, u8 reg, unsigned int value)
 {
        oxygen_write_spi(chip, OXYGEN_SPI_TRIGGER |
                         OXYGEN_SPI_DATA_LENGTH_2 |
-                        OXYGEN_SPI_CLOCK_320 |
+                        OXYGEN_SPI_CLOCK_160 |
                         (3 << OXYGEN_SPI_CODEC_SHIFT) |
                         OXYGEN_SPI_CEN_LATCH_CLOCK_LO,
                         (reg << 9) | value);