Skip to content

Commit

Permalink
[ALSA] oxygen: revert SPI clock frequency change for AK4396/WM8785
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Clemens Ladisch authored and Mercurial server committed Jan 31, 2008
1 parent 19e2e3c commit 2ea8598
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sound/pci/oxygen/hifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/oxygen/oxygen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 2ea8598

Please sign in to comment.