* Patch "ASoC: Intel: Get correct usage_count value to load firmware" has been added to the 4.1-stable tree
@ 2015-08-14 0:44 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-08-14 0:44 UTC (permalink / raw)
To: shilpa.sreeramalu, broonie, gregkh, yang.a.fang; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
ASoC: Intel: Get correct usage_count value to load firmware
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
asoc-intel-get-correct-usage_count-value-to-load-firmware.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 412efa73dcd3bd03c1838c91e094533a95529039 Mon Sep 17 00:00:00 2001
From: Shilpa Sreeramalu <shilpa.sreeramalu@intel.com>
Date: Wed, 15 Jul 2015 07:58:09 -0700
Subject: ASoC: Intel: Get correct usage_count value to load firmware
From: Shilpa Sreeramalu <shilpa.sreeramalu@intel.com>
commit 412efa73dcd3bd03c1838c91e094533a95529039 upstream.
The usage_count variable was read before it was set to the correct
value, due to which the firmware load was failing. Because of this
IPC messages sent to the firmware were timing out causing a delay
of about 1 second while playing audio from the internal speakers.
With this patch the usage_count is read after the function call
pm_runtime_get_sync which will increment the usage_count variable
and the firmware load is successful and all the IPC messages are
processed correctly.
Signed-off-by: Shilpa Sreeramalu <shilpa.sreeramalu@intel.com>
Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/intel/atom/sst/sst_drv_interface.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--- a/sound/soc/intel/atom/sst/sst_drv_interface.c
+++ b/sound/soc/intel/atom/sst/sst_drv_interface.c
@@ -42,6 +42,11 @@
#define MIN_FRAGMENT_SIZE (50 * 1024)
#define MAX_FRAGMENT_SIZE (1024 * 1024)
#define SST_GET_BYTES_PER_SAMPLE(pcm_wd_sz) (((pcm_wd_sz + 15) >> 4) << 1)
+#ifdef CONFIG_PM
+#define GET_USAGE_COUNT(dev) (atomic_read(&dev->power.usage_count))
+#else
+#define GET_USAGE_COUNT(dev) 1
+#endif
int free_stream_context(struct intel_sst_drv *ctx, unsigned int str_id)
{
@@ -141,15 +146,9 @@ static int sst_power_control(struct devi
int ret = 0;
int usage_count = 0;
-#ifdef CONFIG_PM
- usage_count = atomic_read(&dev->power.usage_count);
-#else
- usage_count = 1;
-#endif
-
if (state == true) {
ret = pm_runtime_get_sync(dev);
-
+ usage_count = GET_USAGE_COUNT(dev);
dev_dbg(ctx->dev, "Enable: pm usage count: %d\n", usage_count);
if (ret < 0) {
dev_err(ctx->dev, "Runtime get failed with err: %d\n", ret);
@@ -164,6 +163,7 @@ static int sst_power_control(struct devi
}
}
} else {
+ usage_count = GET_USAGE_COUNT(dev);
dev_dbg(ctx->dev, "Disable: pm usage count: %d\n", usage_count);
return sst_pm_runtime_put(ctx);
}
Patches currently in stable-queue which might be from shilpa.sreeramalu@intel.com are
queue-4.1/asoc-intel-get-correct-usage_count-value-to-load-firmware.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-14 0:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14 0:44 Patch "ASoC: Intel: Get correct usage_count value to load firmware" has been added to the 4.1-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).