[ALSA] oxygen: revert SPI clock frequency change for AK4396/WM8785

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, January 31, 2008 - 5:04 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2ea859...
Commit:     2ea85986dd1fa96ccf0a2f37877d58a57ff6f583
Parent:     19e2e3c30485ba78a653dc521ed9e1f2b6a8bee1
Author:     Clemens Ladisch <clemens@ladisch.de>
AuthorDate: Wed Jan 30 08:38:30 2008 +0100
Committer:  Mercurial server <hg@alsa0.alsa-project.org>
CommitDate: Thu Jan 31 17:30:23 2008 +0100

    [ALSA] oxygen: revert SPI clock frequency change for AK4396/WM8785
    
    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 |    2 +-
 sound/pci/oxygen/oxygen.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/pci/oxygen/hifier.c b/sound/pci/oxygen/hifier.c
index 51c4d1a..3ea1f05 100644
--- a/sound/pci/oxygen/hifier.c
+++ b/sound/pci/oxygen/hifier.c
@@ -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);
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index 840e4a6..f31a0eb 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[ALSA] oxygen: revert SPI clock frequency change for AK439 ..., Linux Kernel Mailing ..., (Thu Jan 31, 5:04 pm)