ALSA: ice1712 delta - initialize SPI clock
authorBrian Bloniarz <brian.bloniarz@gmail.com>
Tue, 18 Jan 2011 07:20:03 +0000 (23:20 -0800)
committerTakashi Iwai <tiwai@suse.de>
Tue, 18 Jan 2011 14:25:16 +0000 (15:25 +0100)
commitb8b1a4cb6842fb33769be1ad636f062d31d588c3
tree4da490ba5218e1a0e3b6fe9b200c9cbbb49bb247
parent27de094f54a4d96bae2cd3121eb157bb8a34f729
ALSA: ice1712 delta - initialize SPI clock

The driver was using an initial value for the clock on the SPI bus
which was read from ICE1712 EEPROM,
ice->eeprom.data[ICE_EEP1_GPIO_STATE] & ICE1712_DELTA_AP_CCLK (0x02)

It appears some cards have it default high, some cards
have it default low. On my Delta 66 rev. E:
$ cat /proc/asound/M66/ice1712 | grep 'GPIO state'
  GPIO state       : 0x70 /* ICE1712_DELTA_AP_CCLK bit is zero */
On my Audiophile 2496:
$ cat /proc/asound/M2496/ice1712 | grep 'GPIO state'
  GPIO state       : 0xfe /* ICE1712_DELTA_AP_CCLK bit is one */

It must be raised before the first SPI write happens, or the write will
fail, leading to:

[   23.248721] invalid CS8427 signature 0x0: let me try again...

I theorize that 4eb4550ab37d351ab0973ccec921a5a2d8560ec7
is no longer needed, it was a different way to workaround
the problem.

[fixed variable decleration by tiwai]

Signed-off-by: Brian Bloniarz <brian.bloniarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ice1712/delta.c