diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 17:25:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 17:25:01 -0400 |
commit | 68d99b2c8efcb6ed3807a55569300c53b5f88be5 (patch) | |
tree | f189c8f2132d3668a2f0e503f5c3f8695b26a1c8 /sound/drivers/aloop.c | |
parent | 0e59e7e7feb5a12938fbf9135147eeda3238c6c4 (diff) | |
parent | 8128c9f21509f9a8b6da94ac432d845dda458406 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (549 commits)
ALSA: hda - Fix ADC input-amp handling for Cx20549 codec
ALSA: hda - Keep EAPD turned on for old Conexant chips
ALSA: hda/realtek - Fix missing volume controls with ALC260
ASoC: wm8940: Properly set codec->dapm.bias_level
ALSA: hda - Fix pin-config for ASUS W90V
ALSA: hda - Fix surround/CLFE headphone and speaker pins order
ALSA: hda - Fix typo
ALSA: Update the sound git tree URL
ALSA: HDA: Add new revision for ALC662
ASoC: max98095: Convert codec->hw_write to snd_soc_write
ASoC: keep pointer to resource so it can be freed
ASoC: sgtl5000: Fix wrong mask in some snd_soc_update_bits calls
ASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_2
ASoC: da7210: Add support for line out and DAC
ASoC: da7210: Add support for DAPM
ALSA: hda/realtek - Fix DAC assignments of multiple speakers
ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value
ASoC: Set sgtl5000->ldo in ldo_regulator_register
ASoC: wm8996: Use SND_SOC_DAPM_AIF_OUT for AIF2 Capture
ASoC: wm8994: Use SND_SOC_DAPM_AIF_OUT for AIF3 Capture
...
Diffstat (limited to 'sound/drivers/aloop.c')
-rw-r--r-- | sound/drivers/aloop.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c index a0da7755fcea..4067f1548949 100644 --- a/sound/drivers/aloop.c +++ b/sound/drivers/aloop.c | |||
@@ -575,7 +575,8 @@ static void loopback_runtime_free(struct snd_pcm_runtime *runtime) | |||
575 | static int loopback_hw_params(struct snd_pcm_substream *substream, | 575 | static int loopback_hw_params(struct snd_pcm_substream *substream, |
576 | struct snd_pcm_hw_params *params) | 576 | struct snd_pcm_hw_params *params) |
577 | { | 577 | { |
578 | return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); | 578 | return snd_pcm_lib_alloc_vmalloc_buffer(substream, |
579 | params_buffer_bytes(params)); | ||
579 | } | 580 | } |
580 | 581 | ||
581 | static int loopback_hw_free(struct snd_pcm_substream *substream) | 582 | static int loopback_hw_free(struct snd_pcm_substream *substream) |
@@ -587,7 +588,7 @@ static int loopback_hw_free(struct snd_pcm_substream *substream) | |||
587 | mutex_lock(&dpcm->loopback->cable_lock); | 588 | mutex_lock(&dpcm->loopback->cable_lock); |
588 | cable->valid &= ~(1 << substream->stream); | 589 | cable->valid &= ~(1 << substream->stream); |
589 | mutex_unlock(&dpcm->loopback->cable_lock); | 590 | mutex_unlock(&dpcm->loopback->cable_lock); |
590 | return snd_pcm_lib_free_pages(substream); | 591 | return snd_pcm_lib_free_vmalloc_buffer(substream); |
591 | } | 592 | } |
592 | 593 | ||
593 | static unsigned int get_cable_index(struct snd_pcm_substream *substream) | 594 | static unsigned int get_cable_index(struct snd_pcm_substream *substream) |
@@ -740,6 +741,8 @@ static struct snd_pcm_ops loopback_playback_ops = { | |||
740 | .prepare = loopback_prepare, | 741 | .prepare = loopback_prepare, |
741 | .trigger = loopback_trigger, | 742 | .trigger = loopback_trigger, |
742 | .pointer = loopback_pointer, | 743 | .pointer = loopback_pointer, |
744 | .page = snd_pcm_lib_get_vmalloc_page, | ||
745 | .mmap = snd_pcm_lib_mmap_vmalloc, | ||
743 | }; | 746 | }; |
744 | 747 | ||
745 | static struct snd_pcm_ops loopback_capture_ops = { | 748 | static struct snd_pcm_ops loopback_capture_ops = { |
@@ -751,6 +754,8 @@ static struct snd_pcm_ops loopback_capture_ops = { | |||
751 | .prepare = loopback_prepare, | 754 | .prepare = loopback_prepare, |
752 | .trigger = loopback_trigger, | 755 | .trigger = loopback_trigger, |
753 | .pointer = loopback_pointer, | 756 | .pointer = loopback_pointer, |
757 | .page = snd_pcm_lib_get_vmalloc_page, | ||
758 | .mmap = snd_pcm_lib_mmap_vmalloc, | ||
754 | }; | 759 | }; |
755 | 760 | ||
756 | static int __devinit loopback_pcm_new(struct loopback *loopback, | 761 | static int __devinit loopback_pcm_new(struct loopback *loopback, |
@@ -771,10 +776,6 @@ static int __devinit loopback_pcm_new(struct loopback *loopback, | |||
771 | strcpy(pcm->name, "Loopback PCM"); | 776 | strcpy(pcm->name, "Loopback PCM"); |
772 | 777 | ||
773 | loopback->pcm[device] = pcm; | 778 | loopback->pcm[device] = pcm; |
774 | |||
775 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, | ||
776 | snd_dma_continuous_data(GFP_KERNEL), | ||
777 | 0, 2 * 1024 * 1024); | ||
778 | return 0; | 779 | return 0; |
779 | } | 780 | } |
780 | 781 | ||