ASoC: msmcobalt: remove custom PM QoS for Low-latency playback
For msmcobalt, it was found that, for low-latency audio playback, audio driver requests for a PM QoS with 10% of the period size. This value is too small for CPU to come back up from L2 PC, and hence CPU never enters into L2 PC, which increased power consumption. ALSA core framework already has a way to vote on behalf of client driver, with a latency value of 75% of period size. To enable CPU to enter L2 PC, fall back to use ALSA core provided PM QoS of 75% for low-latency audio playback instead of the custom PM QoS request. CRs-Fixed: 1048743 Change-Id: Icff3c15a4f1d26f43274465063259f06737fe495 Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
This commit is contained in:
parent
2e45ea7281
commit
fb39a8c3d7
1 changed files with 0 additions and 27 deletions
|
@ -2042,32 +2042,6 @@ static struct snd_soc_ops msm_wcn_ops = {
|
|||
.hw_params = msm_wcn_hw_params,
|
||||
};
|
||||
|
||||
static int msm_get_ll_qos_val(struct snd_pcm_runtime *runtime)
|
||||
{
|
||||
int usecs;
|
||||
|
||||
/* take 10% of period time as the deadline */
|
||||
usecs = (100000 / runtime->rate) * runtime->period_size;
|
||||
usecs += ((100000 % runtime->rate) * runtime->period_size) /
|
||||
runtime->rate;
|
||||
|
||||
return usecs;
|
||||
}
|
||||
|
||||
static int msm_mm5_prepare(struct snd_pcm_substream *substream)
|
||||
{
|
||||
if (pm_qos_request_active(&substream->latency_pm_qos_req))
|
||||
pm_qos_remove_request(&substream->latency_pm_qos_req);
|
||||
pm_qos_add_request(&substream->latency_pm_qos_req,
|
||||
PM_QOS_CPU_DMA_LATENCY,
|
||||
msm_get_ll_qos_val(substream->runtime));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_ops msm_mm5_ops = {
|
||||
.prepare = msm_mm5_prepare,
|
||||
};
|
||||
|
||||
/* Digital audio interface glue - connects codec <---> CPU */
|
||||
static struct snd_soc_dai_link msm_common_dai_links[] = {
|
||||
/* FrontEnd DAI Links */
|
||||
|
@ -2300,7 +2274,6 @@ static struct snd_soc_dai_link msm_common_dai_links[] = {
|
|||
/* this dainlink has playback support */
|
||||
.ignore_pmdown_time = 1,
|
||||
.be_id = MSM_FRONTEND_DAI_MULTIMEDIA5,
|
||||
.ops = &msm_mm5_ops,
|
||||
},
|
||||
{
|
||||
.name = "Listen 1 Audio Service",
|
||||
|
|
Loading…
Add table
Reference in a new issue