Commit 5371a79b authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

sound: Call cpu_latency_qos_*() instead of pm_qos_*()

Call cpu_latency_qos_add/update/remove_request() and
cpu_latency_qos_request_active() instead of
pm_qos_add/update/remove_request() and pm_qos_request_active(),
respectively, because the latter are going to be dropped.

No intentional functional impact.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: default avatarTakashi Iwai <tiwai@suse.de>
Reviewed-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
Tested-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
parent 77b35245
...@@ -748,11 +748,11 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream, ...@@ -748,11 +748,11 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
snd_pcm_timer_resolution_change(substream); snd_pcm_timer_resolution_change(substream);
snd_pcm_set_state(substream, SNDRV_PCM_STATE_SETUP); snd_pcm_set_state(substream, SNDRV_PCM_STATE_SETUP);
if (pm_qos_request_active(&substream->latency_pm_qos_req)) if (cpu_latency_qos_request_active(&substream->latency_pm_qos_req))
pm_qos_remove_request(&substream->latency_pm_qos_req); cpu_latency_qos_remove_request(&substream->latency_pm_qos_req);
if ((usecs = period_to_usecs(runtime)) >= 0) if ((usecs = period_to_usecs(runtime)) >= 0)
pm_qos_add_request(&substream->latency_pm_qos_req, cpu_latency_qos_add_request(&substream->latency_pm_qos_req,
PM_QOS_CPU_DMA_LATENCY, usecs); usecs);
return 0; return 0;
_error: _error:
/* hardware might be unusable from this time, /* hardware might be unusable from this time,
...@@ -821,7 +821,7 @@ static int snd_pcm_hw_free(struct snd_pcm_substream *substream) ...@@ -821,7 +821,7 @@ static int snd_pcm_hw_free(struct snd_pcm_substream *substream)
return -EBADFD; return -EBADFD;
result = do_hw_free(substream); result = do_hw_free(substream);
snd_pcm_set_state(substream, SNDRV_PCM_STATE_OPEN); snd_pcm_set_state(substream, SNDRV_PCM_STATE_OPEN);
pm_qos_remove_request(&substream->latency_pm_qos_req); cpu_latency_qos_remove_request(&substream->latency_pm_qos_req);
return result; return result;
} }
...@@ -2598,8 +2598,8 @@ void snd_pcm_release_substream(struct snd_pcm_substream *substream) ...@@ -2598,8 +2598,8 @@ void snd_pcm_release_substream(struct snd_pcm_substream *substream)
substream->ops->close(substream); substream->ops->close(substream);
substream->hw_opened = 0; substream->hw_opened = 0;
} }
if (pm_qos_request_active(&substream->latency_pm_qos_req)) if (cpu_latency_qos_request_active(&substream->latency_pm_qos_req))
pm_qos_remove_request(&substream->latency_pm_qos_req); cpu_latency_qos_remove_request(&substream->latency_pm_qos_req);
if (substream->pcm_release) { if (substream->pcm_release) {
substream->pcm_release(substream); substream->pcm_release(substream);
substream->pcm_release = NULL; substream->pcm_release = NULL;
......
...@@ -325,8 +325,7 @@ int sst_context_init(struct intel_sst_drv *ctx) ...@@ -325,8 +325,7 @@ int sst_context_init(struct intel_sst_drv *ctx)
ret = -ENOMEM; ret = -ENOMEM;
goto do_free_mem; goto do_free_mem;
} }
pm_qos_add_request(ctx->qos, PM_QOS_CPU_DMA_LATENCY, cpu_latency_qos_add_request(ctx->qos, PM_QOS_DEFAULT_VALUE);
PM_QOS_DEFAULT_VALUE);
dev_dbg(ctx->dev, "Requesting FW %s now...\n", ctx->firmware_name); dev_dbg(ctx->dev, "Requesting FW %s now...\n", ctx->firmware_name);
ret = request_firmware_nowait(THIS_MODULE, true, ctx->firmware_name, ret = request_firmware_nowait(THIS_MODULE, true, ctx->firmware_name,
...@@ -364,7 +363,7 @@ void sst_context_cleanup(struct intel_sst_drv *ctx) ...@@ -364,7 +363,7 @@ void sst_context_cleanup(struct intel_sst_drv *ctx)
sysfs_remove_group(&ctx->dev->kobj, &sst_fw_version_attr_group); sysfs_remove_group(&ctx->dev->kobj, &sst_fw_version_attr_group);
flush_scheduled_work(); flush_scheduled_work();
destroy_workqueue(ctx->post_msg_wq); destroy_workqueue(ctx->post_msg_wq);
pm_qos_remove_request(ctx->qos); cpu_latency_qos_remove_request(ctx->qos);
kfree(ctx->fw_sg_list.src); kfree(ctx->fw_sg_list.src);
kfree(ctx->fw_sg_list.dst); kfree(ctx->fw_sg_list.dst);
ctx->fw_sg_list.list_len = 0; ctx->fw_sg_list.list_len = 0;
......
...@@ -412,7 +412,7 @@ int sst_load_fw(struct intel_sst_drv *sst_drv_ctx) ...@@ -412,7 +412,7 @@ int sst_load_fw(struct intel_sst_drv *sst_drv_ctx)
return -ENOMEM; return -ENOMEM;
/* Prevent C-states beyond C6 */ /* Prevent C-states beyond C6 */
pm_qos_update_request(sst_drv_ctx->qos, 0); cpu_latency_qos_update_request(sst_drv_ctx->qos, 0);
sst_drv_ctx->sst_state = SST_FW_LOADING; sst_drv_ctx->sst_state = SST_FW_LOADING;
...@@ -442,7 +442,7 @@ int sst_load_fw(struct intel_sst_drv *sst_drv_ctx) ...@@ -442,7 +442,7 @@ int sst_load_fw(struct intel_sst_drv *sst_drv_ctx)
restore: restore:
/* Re-enable Deeper C-states beyond C6 */ /* Re-enable Deeper C-states beyond C6 */
pm_qos_update_request(sst_drv_ctx->qos, PM_QOS_DEFAULT_VALUE); cpu_latency_qos_update_request(sst_drv_ctx->qos, PM_QOS_DEFAULT_VALUE);
sst_free_block(sst_drv_ctx, block); sst_free_block(sst_drv_ctx, block);
dev_dbg(sst_drv_ctx->dev, "fw load successful!!!\n"); dev_dbg(sst_drv_ctx->dev, "fw load successful!!!\n");
......
...@@ -112,7 +112,7 @@ static void omap_dmic_dai_shutdown(struct snd_pcm_substream *substream, ...@@ -112,7 +112,7 @@ static void omap_dmic_dai_shutdown(struct snd_pcm_substream *substream,
mutex_lock(&dmic->mutex); mutex_lock(&dmic->mutex);
pm_qos_remove_request(&dmic->pm_qos_req); cpu_latency_qos_remove_request(&dmic->pm_qos_req);
if (!dai->active) if (!dai->active)
dmic->active = 0; dmic->active = 0;
...@@ -230,8 +230,9 @@ static int omap_dmic_dai_prepare(struct snd_pcm_substream *substream, ...@@ -230,8 +230,9 @@ static int omap_dmic_dai_prepare(struct snd_pcm_substream *substream,
struct omap_dmic *dmic = snd_soc_dai_get_drvdata(dai); struct omap_dmic *dmic = snd_soc_dai_get_drvdata(dai);
u32 ctrl; u32 ctrl;
if (pm_qos_request_active(&dmic->pm_qos_req)) if (cpu_latency_qos_request_active(&dmic->pm_qos_req))
pm_qos_update_request(&dmic->pm_qos_req, dmic->latency); cpu_latency_qos_update_request(&dmic->pm_qos_req,
dmic->latency);
/* Configure uplink threshold */ /* Configure uplink threshold */
omap_dmic_write(dmic, OMAP_DMIC_FIFO_CTRL_REG, dmic->threshold); omap_dmic_write(dmic, OMAP_DMIC_FIFO_CTRL_REG, dmic->threshold);
......
...@@ -836,10 +836,10 @@ static void omap_mcbsp_dai_shutdown(struct snd_pcm_substream *substream, ...@@ -836,10 +836,10 @@ static void omap_mcbsp_dai_shutdown(struct snd_pcm_substream *substream,
int stream2 = tx ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK; int stream2 = tx ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
if (mcbsp->latency[stream2]) if (mcbsp->latency[stream2])
pm_qos_update_request(&mcbsp->pm_qos_req, cpu_latency_qos_update_request(&mcbsp->pm_qos_req,
mcbsp->latency[stream2]); mcbsp->latency[stream2]);
else if (mcbsp->latency[stream1]) else if (mcbsp->latency[stream1])
pm_qos_remove_request(&mcbsp->pm_qos_req); cpu_latency_qos_remove_request(&mcbsp->pm_qos_req);
mcbsp->latency[stream1] = 0; mcbsp->latency[stream1] = 0;
...@@ -863,10 +863,10 @@ static int omap_mcbsp_dai_prepare(struct snd_pcm_substream *substream, ...@@ -863,10 +863,10 @@ static int omap_mcbsp_dai_prepare(struct snd_pcm_substream *substream,
if (!latency || mcbsp->latency[stream1] < latency) if (!latency || mcbsp->latency[stream1] < latency)
latency = mcbsp->latency[stream1]; latency = mcbsp->latency[stream1];
if (pm_qos_request_active(pm_qos_req)) if (cpu_latency_qos_request_active(pm_qos_req))
pm_qos_update_request(pm_qos_req, latency); cpu_latency_qos_update_request(pm_qos_req, latency);
else if (latency) else if (latency)
pm_qos_add_request(pm_qos_req, PM_QOS_CPU_DMA_LATENCY, latency); cpu_latency_qos_add_request(pm_qos_req, latency);
return 0; return 0;
} }
...@@ -1434,8 +1434,8 @@ static int asoc_mcbsp_remove(struct platform_device *pdev) ...@@ -1434,8 +1434,8 @@ static int asoc_mcbsp_remove(struct platform_device *pdev)
if (mcbsp->pdata->ops && mcbsp->pdata->ops->free) if (mcbsp->pdata->ops && mcbsp->pdata->ops->free)
mcbsp->pdata->ops->free(mcbsp->id); mcbsp->pdata->ops->free(mcbsp->id);
if (pm_qos_request_active(&mcbsp->pm_qos_req)) if (cpu_latency_qos_request_active(&mcbsp->pm_qos_req))
pm_qos_remove_request(&mcbsp->pm_qos_req); cpu_latency_qos_remove_request(&mcbsp->pm_qos_req);
if (mcbsp->pdata->buffer_size) if (mcbsp->pdata->buffer_size)
sysfs_remove_group(&mcbsp->dev->kobj, &additional_attr_group); sysfs_remove_group(&mcbsp->dev->kobj, &additional_attr_group);
......
...@@ -281,10 +281,10 @@ static void omap_mcpdm_dai_shutdown(struct snd_pcm_substream *substream, ...@@ -281,10 +281,10 @@ static void omap_mcpdm_dai_shutdown(struct snd_pcm_substream *substream,
} }
if (mcpdm->latency[stream2]) if (mcpdm->latency[stream2])
pm_qos_update_request(&mcpdm->pm_qos_req, cpu_latency_qos_update_request(&mcpdm->pm_qos_req,
mcpdm->latency[stream2]); mcpdm->latency[stream2]);
else if (mcpdm->latency[stream1]) else if (mcpdm->latency[stream1])
pm_qos_remove_request(&mcpdm->pm_qos_req); cpu_latency_qos_remove_request(&mcpdm->pm_qos_req);
mcpdm->latency[stream1] = 0; mcpdm->latency[stream1] = 0;
...@@ -386,10 +386,10 @@ static int omap_mcpdm_prepare(struct snd_pcm_substream *substream, ...@@ -386,10 +386,10 @@ static int omap_mcpdm_prepare(struct snd_pcm_substream *substream,
if (!latency || mcpdm->latency[stream1] < latency) if (!latency || mcpdm->latency[stream1] < latency)
latency = mcpdm->latency[stream1]; latency = mcpdm->latency[stream1];
if (pm_qos_request_active(pm_qos_req)) if (cpu_latency_qos_request_active(pm_qos_req))
pm_qos_update_request(pm_qos_req, latency); cpu_latency_qos_update_request(pm_qos_req, latency);
else if (latency) else if (latency)
pm_qos_add_request(pm_qos_req, PM_QOS_CPU_DMA_LATENCY, latency); cpu_latency_qos_add_request(pm_qos_req, latency);
if (!omap_mcpdm_active(mcpdm)) { if (!omap_mcpdm_active(mcpdm)) {
omap_mcpdm_start(mcpdm); omap_mcpdm_start(mcpdm);
...@@ -451,8 +451,8 @@ static int omap_mcpdm_remove(struct snd_soc_dai *dai) ...@@ -451,8 +451,8 @@ static int omap_mcpdm_remove(struct snd_soc_dai *dai)
free_irq(mcpdm->irq, (void *)mcpdm); free_irq(mcpdm->irq, (void *)mcpdm);
pm_runtime_disable(mcpdm->dev); pm_runtime_disable(mcpdm->dev);
if (pm_qos_request_active(&mcpdm->pm_qos_req)) if (cpu_latency_qos_request_active(&mcpdm->pm_qos_req))
pm_qos_remove_request(&mcpdm->pm_qos_req); cpu_latency_qos_remove_request(&mcpdm->pm_qos_req);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment