diff options
author | Brian Bloniarz <brian.bloniarz@gmail.com> | 2011-01-18 02:20:03 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-01-18 09:25:16 -0500 |
commit | b8b1a4cb6842fb33769be1ad636f062d31d588c3 (patch) | |
tree | 4da490ba5218e1a0e3b6fe9b200c9cbbb49bb247 /sound | |
parent | 27de094f54a4d96bae2cd3121eb157bb8a34f729 (diff) |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/ice1712/delta.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c index 7b62de089fee..20c6b079d0df 100644 --- a/sound/pci/ice1712/delta.c +++ b/sound/pci/ice1712/delta.c | |||
@@ -580,6 +580,7 @@ static int __devinit snd_ice1712_delta_init(struct snd_ice1712 *ice) | |||
580 | { | 580 | { |
581 | int err; | 581 | int err; |
582 | struct snd_akm4xxx *ak; | 582 | struct snd_akm4xxx *ak; |
583 | unsigned char tmp; | ||
583 | 584 | ||
584 | if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DELTA1010 && | 585 | if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DELTA1010 && |
585 | ice->eeprom.gpiodir == 0x7b) | 586 | ice->eeprom.gpiodir == 0x7b) |
@@ -622,6 +623,12 @@ static int __devinit snd_ice1712_delta_init(struct snd_ice1712 *ice) | |||
622 | break; | 623 | break; |
623 | } | 624 | } |
624 | 625 | ||
626 | /* initialize the SPI clock to high */ | ||
627 | tmp = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA); | ||
628 | tmp |= ICE1712_DELTA_AP_CCLK; | ||
629 | snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp); | ||
630 | udelay(5); | ||
631 | |||
625 | /* initialize spdif */ | 632 | /* initialize spdif */ |
626 | switch (ice->eeprom.subvendor) { | 633 | switch (ice->eeprom.subvendor) { |
627 | case ICE1712_SUBDEVICE_AUDIOPHILE: | 634 | case ICE1712_SUBDEVICE_AUDIOPHILE: |