diff options
author | Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> | 2009-04-02 08:21:15 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-04-06 03:55:42 +0200 |
commit | 81baf3a7f686c5d22359cb06fc11d20907ba12f8 (patch) | |
tree | b4f13bce4e1af868ed7672646e56682d18d0a2b1 | |
parent | df163587eab15a24cc34cf8434a5657416f8a203 (diff) | |
download | talos-op-linux-81baf3a7f686c5d22359cb06fc11d20907ba12f8.tar.gz talos-op-linux-81baf3a7f686c5d22359cb06fc11d20907ba12f8.zip |
ALSA: snd-atmel-ac97c: do a proper reset of the external codec
This patch will enable the AC97C before resetting the external codec,
leaving the AC97C disabled will result in floating I/O lines that can
affect the reset procedure.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/atmel/ac97c.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index e8484cb9ac62..90527c14901e 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c @@ -730,17 +730,17 @@ static bool filter(struct dma_chan *chan, void *slave) static void atmel_ac97c_reset(struct atmel_ac97c *chip) { - ac97c_writel(chip, MR, AC97C_MR_WRST); + ac97c_writel(chip, MR, 0); + ac97c_writel(chip, MR, AC97C_MR_ENA); + ac97c_writel(chip, CAMR, 0); + ac97c_writel(chip, COMR, 0); if (gpio_is_valid(chip->reset_pin)) { gpio_set_value(chip->reset_pin, 0); /* AC97 v2.2 specifications says minimum 1 us. */ - udelay(10); + udelay(2); gpio_set_value(chip->reset_pin, 1); } - - udelay(1); - ac97c_writel(chip, MR, AC97C_MR_ENA); } static int __devinit atmel_ac97c_probe(struct platform_device *pdev) @@ -826,6 +826,8 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev) snd_card_set_dev(card, &pdev->dev); + atmel_ac97c_reset(chip); + /* Enable overrun interrupt from codec channel */ ac97c_writel(chip, COMR, AC97C_CSR_OVRUN); ac97c_writel(chip, IER, ac97c_readl(chip, IMR) | AC97C_SR_COEVT); @@ -836,8 +838,6 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev) goto err_ac97_bus; } - atmel_ac97c_reset(chip); - retval = atmel_ac97c_mixer_new(chip); if (retval) { dev_dbg(&pdev->dev, "could not register ac97 mixer\n"); |