aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm_native.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 62449117ee14..61f5d425b630 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -23,7 +23,7 @@
23#include <linux/file.h> 23#include <linux/file.h>
24#include <linux/slab.h> 24#include <linux/slab.h>
25#include <linux/time.h> 25#include <linux/time.h>
26#include <linux/latency.h> 26#include <linux/pm_qos_params.h>
27#include <linux/uio.h> 27#include <linux/uio.h>
28#include <sound/core.h> 28#include <sound/core.h>
29#include <sound/control.h> 29#include <sound/control.h>
@@ -443,9 +443,11 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
443 snd_pcm_timer_resolution_change(substream); 443 snd_pcm_timer_resolution_change(substream);
444 runtime->status->state = SNDRV_PCM_STATE_SETUP; 444 runtime->status->state = SNDRV_PCM_STATE_SETUP;
445 445
446 remove_acceptable_latency(substream->latency_id); 446 pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY,
447 substream->latency_id);
447 if ((usecs = period_to_usecs(runtime)) >= 0) 448 if ((usecs = period_to_usecs(runtime)) >= 0)
448 set_acceptable_latency(substream->latency_id, usecs); 449 pm_qos_add_requirement(PM_QOS_CPU_DMA_LATENCY,
450 substream->latency_id, usecs);
449 return 0; 451 return 0;
450 _error: 452 _error:
451 /* hardware might be unuseable from this time, 453 /* hardware might be unuseable from this time,
@@ -505,7 +507,8 @@ static int snd_pcm_hw_free(struct snd_pcm_substream *substream)
505 if (substream->ops->hw_free) 507 if (substream->ops->hw_free)
506 result = substream->ops->hw_free(substream); 508 result = substream->ops->hw_free(substream);
507 runtime->status->state = SNDRV_PCM_STATE_OPEN; 509 runtime->status->state = SNDRV_PCM_STATE_OPEN;
508 remove_acceptable_latency(substream->latency_id); 510 pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY,
511 substream->latency_id);
509 return result; 512 return result;
510} 513}
511 514