From: Alex Deucher <alexdeucher@gmail.com>
To: broonie@kernel.org, airlied@gmail.com,
dri-devel@lists.freedesktop.org, alsa-devel@alsa-project.org
Cc: Maruthi Srinivas Bayyavarapu <Maruthi.Bayyavarapu@amd.com>,
lgirdwood@gmail.com, perex@perex.cz
Subject: [PATCH 11/12] ASoC: AMD: add suspend/resume for ACP PCM driver
Date: Thu, 6 Aug 2015 10:25:11 -0400 [thread overview]
Message-ID: <1438871112-25946-11-git-send-email-alexander.deucher@amd.com> (raw)
In-Reply-To: <1438871112-25946-1-git-send-email-alexander.deucher@amd.com>
From: Maruthi Srinivas Bayyavarapu <Maruthi.Bayyavarapu@amd.com>
Added suspend/resume functionality for AMD ACP ASoC PCM driver.
Enabled them in the ASoC machine driver
Signed-off-by: Maruthi Bayyavarapu <maruthi.bayyavarapu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Murali Krishna Vemuri <murali-krishna.vemuri@amd.com>
---
sound/soc/amd/acp-pcm-dma.c | 31 +++++++++++++++++++++++++++++++
sound/soc/amd/acp-rt286.c | 1 -
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
index 0f58957..db09b77 100644
--- a/sound/soc/amd/acp-pcm-dma.c
+++ b/sound/soc/amd/acp-pcm-dma.c
@@ -625,11 +625,42 @@ static int acp_amdsoc_remove(struct amd_gnb_bus_dev *adev)
return 0;
}
+static int acp_pcm_suspend(struct device *dev)
+{
+ return 0;
+}
+
+static int acp_pcm_resume(struct device *dev)
+{
+ struct snd_pcm_substream *substream;
+ struct snd_pcm_runtime *runtime;
+ struct audio_substream_data *rtd;
+
+ struct audio_drv_data *irq_data =
+ (struct audio_drv_data *)dev_get_drvdata(dev);
+
+ substream = irq_data->play_stream;
+ runtime = substream->runtime;
+ rtd = runtime->private_data;
+
+ irq_data->acp_dev->config_i2s(irq_data->acp_dev, rtd->i2s_config);
+ irq_data->acp_dev->config_dma(irq_data->acp_dev, rtd->dma_config);
+
+ return 0;
+}
+
+static const struct dev_pm_ops acp_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(acp_pcm_suspend, acp_pcm_resume)
+};
+
static struct amd_gnb_bus_driver acp_dma_driver = {
.name = "acp-pcm-driver",
.ip = AMD_GNB_IP_ACP_PCM,
.probe = acp_amdsoc_probe,
.remove = acp_amdsoc_remove,
+ .driver = {
+ .pm = &acp_pm_ops,
+ },
};
static int __init amdsoc_bus_acp_dma_driver_init(void)
diff --git a/sound/soc/amd/acp-rt286.c b/sound/soc/amd/acp-rt286.c
index 7d4bdf9..8be9236 100644
--- a/sound/soc/amd/acp-rt286.c
+++ b/sound/soc/amd/acp-rt286.c
@@ -129,7 +129,6 @@ static struct snd_soc_dai_link carrizo_dai_rt286 = {
.codec_name = "rt286.3-001c",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
| SND_SOC_DAIFMT_CBM_CFM,
- .ignore_suspend = 1,
.ops = &carrizo_rt286_ops,
.init = carrizo_init,
};
--
1.8.3.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-08-06 14:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 14:25 [PATCH 00/12] Add ASoC support for AMD APUs Alex Deucher
2015-08-06 14:25 ` [PATCH 01/12] drm/amdgpu: add amd_gnb_bus support Alex Deucher
2015-08-06 19:36 ` Lars-Peter Clausen
2015-08-07 10:25 ` Mark Brown
2015-08-07 14:17 ` Alex Deucher
2015-08-07 16:16 ` Felix Kuehling
2015-08-07 18:24 ` Mark Brown
2015-08-07 20:03 ` Felix Kuehling
2015-08-10 11:56 ` Mark Brown
2015-08-07 17:20 ` Mark Brown
2015-08-06 14:25 ` [PATCH 02/12] drm/amd: remove amd gnb bus default runtime pm ops Alex Deucher
2015-08-06 14:25 ` [PATCH 04/12] drm/amd: add ACP driver support (v4) Alex Deucher
2015-08-06 14:25 ` [PATCH 05/12] drm/amd: modify ACP DMA buffer position update logic (v2) Alex Deucher
2015-08-06 14:25 ` [PATCH 06/12] drm/amd: add ACP suspend/resume functionality Alex Deucher
2015-08-06 14:25 ` [PATCH 07/12] drm/amd: change ACP SRAM banks used for audio Alex Deucher
2015-08-06 14:25 ` [PATCH 08/12] drm/amd: shutdown unused ACP SRAM memory banks Alex Deucher
2015-08-06 14:25 ` [PATCH 09/12] drm/amd: remove bitfield usage in ACP IP module Alex Deucher
2015-08-06 14:25 ` [PATCH 10/12] ASoC: AMD: add AMD ASoC ACP-I2S driver (v2) Alex Deucher
2015-08-06 19:22 ` Mark Brown
2015-08-07 9:27 ` Bayyavarapu, Maruthi
2015-08-06 14:25 ` Alex Deucher [this message]
2015-08-06 19:23 ` [PATCH 11/12] ASoC: AMD: add suspend/resume for ACP PCM driver Mark Brown
2015-08-06 14:25 ` [PATCH 12/12] ASoC: AMD: add ACP PCM driver runtime PM Alex Deucher
2015-08-06 19:26 ` Mark Brown
2015-08-07 9:41 ` Bayyavarapu, Maruthi
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=1438871112-25946-11-git-send-email-alexander.deucher@amd.com \
--to=alexdeucher@gmail.com \
--cc=Maruthi.Bayyavarapu@amd.com \
--cc=airlied@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=lgirdwood@gmail.com \
--cc=perex@perex.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox