summaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_native.c
diff options
context:
space:
mode:
authorMark Gross <mgross@linux.intel.com>2008-02-04 22:30:09 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 09:44:22 -0800
commitf011e2e2df3393c16b0fdc48e855e909b7e021ee (patch)
tree1ad56011597c739336d7068c8182fd9cfdddad5b /sound/core/pcm_native.c
parentd82b35186eaa816267f044bd70cc0acb3c7971a3 (diff)
downloadblackbird-obmc-linux-f011e2e2df3393c16b0fdc48e855e909b7e021ee.tar.gz
blackbird-obmc-linux-f011e2e2df3393c16b0fdc48e855e909b7e021ee.zip
latency.c: use QoS infrastructure
Replace latency.c use with pm_qos_params use. Signed-off-by: mark gross <mgross@linux.intel.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Len Brown <lenb@kernel.org> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/core/pcm_native.c')
-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 @@
#include <linux/file.h>
#include <linux/slab.h>
#include <linux/time.h>
-#include <linux/latency.h>
+#include <linux/pm_qos_params.h>
#include <linux/uio.h>
#include <sound/core.h>
#include <sound/control.h>
@@ -443,9 +443,11 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
snd_pcm_timer_resolution_change(substream);
runtime->status->state = SNDRV_PCM_STATE_SETUP;
- remove_acceptable_latency(substream->latency_id);
+ pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY,
+ substream->latency_id);
if ((usecs = period_to_usecs(runtime)) >= 0)
- set_acceptable_latency(substream->latency_id, usecs);
+ pm_qos_add_requirement(PM_QOS_CPU_DMA_LATENCY,
+ substream->latency_id, usecs);
return 0;
_error:
/* hardware might be unuseable from this time,
@@ -505,7 +507,8 @@ static int snd_pcm_hw_free(struct snd_pcm_substream *substream)
if (substream->ops->hw_free)
result = substream->ops->hw_free(substream);
runtime->status->state = SNDRV_PCM_STATE_OPEN;
- remove_acceptable_latency(substream->latency_id);
+ pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY,
+ substream->latency_id);
return result;
}
OpenPOWER on IntegriCloud