[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1347994716-10251-6-git-send-email-linux@rainbow-software.org>
Date: Tue, 18 Sep 2012 20:58:36 +0200
From: Ondrej Zary <linux@...nbow-software.org>
To: alsa-devel@...a-project.org
Cc: linux-kernel@...r.kernel.org, broonie@...nsource.wolfsonmicro.com
Subject: [PATCH 5/5] snd-ice1712: Fix resume on ice1724
set_pro_rate() is called from hw_params() but not from prepare(), breaking running PCM on suspend/resume.
Call it from prepare() if PCM was suspended to fix the problem.
Signed-off-by: Ondrej Zary <linux@...nbow-software.org>
---
sound/pci/ice1712/ice1724.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
index 0eb7ec6..ade3354 100644
--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -783,6 +783,13 @@ static int snd_vt1724_playback_pro_prepare(struct snd_pcm_substream *substream)
struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
unsigned char val;
unsigned int size;
+ int err;
+
+ if (substream->runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
+ err = snd_vt1724_set_pro_rate(ice, substream->runtime->rate, 0);
+ if (err < 0)
+ return err;
+ }
spin_lock_irq(&ice->reg_lock);
val = (8 - substream->runtime->channels) >> 1;
@@ -853,6 +860,13 @@ static int snd_vt1724_pcm_prepare(struct snd_pcm_substream *substream)
{
struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
const struct vt1724_pcm_reg *reg = substream->runtime->private_data;
+ int err;
+
+ if (substream->runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
+ err = snd_vt1724_set_pro_rate(ice, substream->runtime->rate, 0);
+ if (err < 0)
+ return err;
+ }
spin_lock_irq(&ice->reg_lock);
outl(substream->runtime->dma_addr, ice->profi_port + reg->addr);
--
Ondrej Zary
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists