Message ID | 20160830183834.6u73eb5ujgm5emlk@atomide.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Aug 30, 2016 at 11:38:35AM -0700, Tony Lindgren wrote: > Updated patch below, Mark let me know if you need an incremental > patch to fix the warning. > > Regards, > > Tony > > 8< ----------------- > From: Tony Lindgren <tony@atomide.com> > Date: Mon, 29 Aug 2016 11:27:46 -0700 > Subject: [PATCHv2] ASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent Please send the patch normally rather than burying it in the middle of another e-mail :(
* Mark Brown <broonie@kernel.org> [160831 10:25]: > On Tue, Aug 30, 2016 at 11:38:35AM -0700, Tony Lindgren wrote: > > > Updated patch below, Mark let me know if you need an incremental > > patch to fix the warning. > > > > Regards, > > > > Tony > > > > 8< ----------------- > > From: Tony Lindgren <tony@atomide.com> > > Date: Mon, 29 Aug 2016 11:27:46 -0700 > > Subject: [PATCHv2] ASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent > > Please send the patch normally rather than burying it in the middle of > another e-mail :( OK will resend after hearing back comments from Peter. Tony -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c --- a/sound/soc/omap/mcbsp.c +++ b/sound/soc/omap/mcbsp.c @@ -25,6 +25,7 @@ #include <linux/io.h> #include <linux/slab.h> #include <linux/pm_runtime.h> +#include <linux/pm_qos.h> #include <linux/platform_data/asoc-ti-mcbsp.h> @@ -643,6 +644,10 @@ void omap_mcbsp_start(struct omap_mcbsp *mcbsp, int tx, int rx) int enable_srg = 0; u16 w; + /* Prevent omap hardware from hitting off between fifo fills */ + pm_qos_add_request(&mcbsp->pm_qos_req, PM_QOS_CPU_DMA_LATENCY, + 30 * 1000); + if (mcbsp->st_data) omap_st_start(mcbsp); @@ -731,6 +736,8 @@ void omap_mcbsp_stop(struct omap_mcbsp *mcbsp, int tx, int rx) if (mcbsp->st_data) omap_st_stop(mcbsp); + + pm_qos_remove_request(&mcbsp->pm_qos_req); } int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id) @@ -1098,6 +1105,9 @@ err_thres: void omap_mcbsp_cleanup(struct omap_mcbsp *mcbsp) { + if (pm_qos_request_active(&mcbsp->pm_qos_req)) + pm_qos_remove_request(&mcbsp->pm_qos_req); + if (mcbsp->pdata->buffer_size) sysfs_remove_group(&mcbsp->dev->kobj, &additional_attr_group); diff --git a/sound/soc/omap/mcbsp.h b/sound/soc/omap/mcbsp.h --- a/sound/soc/omap/mcbsp.h +++ b/sound/soc/omap/mcbsp.h @@ -325,6 +325,8 @@ struct omap_mcbsp { unsigned int in_freq; int clk_div; int wlen; + + struct pm_qos_request pm_qos_req; }; void omap_mcbsp_config(struct omap_mcbsp *mcbsp,