diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-20 12:03:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-20 12:03:55 -0400 |
commit | 46ee9645094ad1eb5b4888882ecaa1fb87dcd2a3 (patch) | |
tree | d0a48e993568b6a2415cfc21fc06eaa2fd886429 /sound/core | |
parent | fa5312d9e87e7222c6c384c4e930dc149bc1178d (diff) | |
parent | 25f3a5a2854dce8b8413fd24cc9d5b9e3632be54 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
PM: PM QOS update fix
Freezer / cgroup freezer: Update stale locking comments
PM / platform_bus: Allow runtime PM by default
i2c: Fix bus-level power management callbacks
PM QOS update
PM / Hibernate: Fix block_io.c printk warning
PM / Hibernate: Group swap ops
PM / Hibernate: Move the first_sector out of swsusp_write
PM / Hibernate: Separate block_io
PM / Hibernate: Snapshot cleanup
FS / libfs: Implement simple_write_to_buffer
PM / Hibernate: document open(/dev/snapshot) side effects
PM / Runtime: Add sysfs debug files
PM: Improve device power management document
PM: Update device power management document
PM: Allow runtime_suspend methods to call pm_schedule_suspend()
PM: pm_wakeup - switch to using bool
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/pcm.c | 3 | ||||
-rw-r--r-- | sound/core/pcm_native.c | 14 |
2 files changed, 8 insertions, 9 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 0d428d0896db..cbe815dfbdc8 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c | |||
@@ -648,9 +648,6 @@ int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count) | |||
648 | substream->number = idx; | 648 | substream->number = idx; |
649 | substream->stream = stream; | 649 | substream->stream = stream; |
650 | sprintf(substream->name, "subdevice #%i", idx); | 650 | sprintf(substream->name, "subdevice #%i", idx); |
651 | snprintf(substream->latency_id, sizeof(substream->latency_id), | ||
652 | "ALSA-PCM%d-%d%c%d", pcm->card->number, pcm->device, | ||
653 | (stream ? 'c' : 'p'), idx); | ||
654 | substream->buffer_bytes_max = UINT_MAX; | 651 | substream->buffer_bytes_max = UINT_MAX; |
655 | if (prev == NULL) | 652 | if (prev == NULL) |
656 | pstr->substream = substream; | 653 | pstr->substream = substream; |
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 20b5982c996b..192dd407512f 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -484,11 +484,13 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream, | |||
484 | snd_pcm_timer_resolution_change(substream); | 484 | snd_pcm_timer_resolution_change(substream); |
485 | runtime->status->state = SNDRV_PCM_STATE_SETUP; | 485 | runtime->status->state = SNDRV_PCM_STATE_SETUP; |
486 | 486 | ||
487 | pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY, | 487 | if (substream->latency_pm_qos_req) { |
488 | substream->latency_id); | 488 | pm_qos_remove_request(substream->latency_pm_qos_req); |
489 | substream->latency_pm_qos_req = NULL; | ||
490 | } | ||
489 | if ((usecs = period_to_usecs(runtime)) >= 0) | 491 | if ((usecs = period_to_usecs(runtime)) >= 0) |
490 | pm_qos_add_requirement(PM_QOS_CPU_DMA_LATENCY, | 492 | substream->latency_pm_qos_req = pm_qos_add_request( |
491 | substream->latency_id, usecs); | 493 | PM_QOS_CPU_DMA_LATENCY, usecs); |
492 | return 0; | 494 | return 0; |
493 | _error: | 495 | _error: |
494 | /* hardware might be unuseable from this time, | 496 | /* hardware might be unuseable from this time, |
@@ -543,8 +545,8 @@ static int snd_pcm_hw_free(struct snd_pcm_substream *substream) | |||
543 | if (substream->ops->hw_free) | 545 | if (substream->ops->hw_free) |
544 | result = substream->ops->hw_free(substream); | 546 | result = substream->ops->hw_free(substream); |
545 | runtime->status->state = SNDRV_PCM_STATE_OPEN; | 547 | runtime->status->state = SNDRV_PCM_STATE_OPEN; |
546 | pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY, | 548 | pm_qos_remove_request(substream->latency_pm_qos_req); |
547 | substream->latency_id); | 549 | substream->latency_pm_qos_req = NULL; |
548 | return result; | 550 | return result; |
549 | } | 551 | } |
550 | 552 | ||