Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[sfrench/cifs-2.6.git] / sound / arm / aaci.c
index dc78272fc39ff2cb01a42e5206d16041987e5d98..6c160a038b239a7c9e2baa0d3f941c68c7d68398 100644 (file)
@@ -504,6 +504,10 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,
        int err;
 
        aaci_pcm_hw_free(substream);
+       if (aacirun->pcm_open) {
+               snd_ac97_pcm_close(aacirun->pcm);
+               aacirun->pcm_open = 0;
+       }
 
        err = devdma_hw_alloc(NULL, substream,
                              params_buffer_bytes(params));
@@ -517,7 +521,7 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,
        else
                err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
                                        params_channels(params),
-                                       aacirun->pcm->r[1].slots);
+                                       aacirun->pcm->r[0].slots);
 
        if (err)
                goto out;
@@ -937,6 +941,7 @@ static int __devinit aaci_probe_ac97(struct aaci *aaci)
        struct snd_ac97 *ac97;
        int ret;
 
+       writel(0, aaci->base + AC97_POWERDOWN);
        /*
         * Assert AACIRESET for 2us
         */