From: Ondrej Zary <linux@rainbow-software.org>
To: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com
Subject: [PATCH 5/5] snd-ice1712: Fix resume on ice1724
Date: Sun, 14 Oct 2012 21:09:23 +0200 [thread overview]
Message-ID: <1350241763-7248-6-git-send-email-linux@rainbow-software.org> (raw)
In-Reply-To: <1350241763-7248-1-git-send-email-linux@rainbow-software.org>
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@rainbow-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
next prev parent reply other threads:[~2012-10-14 19:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-14 19:09 [PATCH 0/5] snd-ice1712: Add Philips PSC724 Ultimate Edge Ondrej Zary
2012-10-14 19:09 ` [PATCH 1/5] snd-ice1712: add chip_exit callback Ondrej Zary
2012-10-14 19:09 ` Ondrej Zary
2012-10-14 19:09 ` [PATCH 2/5] snd-ice1712: Add Wolfson Microelectronics WM8766 codec support Ondrej Zary
2012-10-14 19:09 ` [PATCH 3/5] snd-ice1712: Add Wolfson Microelectronics WM8776 " Ondrej Zary
2012-10-14 19:09 ` [PATCH 4/5] snd-ice1712: Add Philips PSC724 Ultimate Edge Ondrej Zary
2012-10-14 19:09 ` Ondrej Zary [this message]
2012-10-17 6:57 ` [PATCH 5/5] snd-ice1712: Fix resume on ice1724 Takashi Iwai
2012-10-17 6:57 ` [alsa-devel] " Takashi Iwai
2012-10-18 22:02 ` Ondrej Zary
2012-10-17 6:56 ` [alsa-devel] [PATCH 0/5] snd-ice1712: Add Philips PSC724 Ultimate Edge Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2012-09-20 18:37 [RFC PATCH v3 " Ondrej Zary
2012-09-20 18:37 ` [PATCH 5/5] snd-ice1712: Fix resume on ice1724 Ondrej Zary
2012-09-20 18:37 ` Ondrej Zary
2012-09-18 18:58 [RFC PATCH v2 0/5] snd-ice1712: Add Philips PSC724 Ultimate Edge Ondrej Zary
2012-09-18 18:58 ` [PATCH 5/5] snd-ice1712: Fix resume on ice1724 Ondrej Zary
2012-09-18 18:58 ` Ondrej Zary
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350241763-7248-6-git-send-email-linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.