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/core/pcm_native.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/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index c74e228731ed..d7d2179c0363 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -2058,16 +2058,12 @@ EXPORT_SYMBOL(snd_pcm_open_substream); | |||
2058 | 2058 | ||
2059 | static int snd_pcm_open_file(struct file *file, | 2059 | static int snd_pcm_open_file(struct file *file, |
2060 | struct snd_pcm *pcm, | 2060 | struct snd_pcm *pcm, |
2061 | int stream, | 2061 | int stream) |
2062 | struct snd_pcm_file **rpcm_file) | ||
2063 | { | 2062 | { |
2064 | struct snd_pcm_file *pcm_file; | 2063 | struct snd_pcm_file *pcm_file; |
2065 | struct snd_pcm_substream *substream; | 2064 | struct snd_pcm_substream *substream; |
2066 | int err; | 2065 | int err; |
2067 | 2066 | ||
2068 | if (rpcm_file) | ||
2069 | *rpcm_file = NULL; | ||
2070 | |||
2071 | err = snd_pcm_open_substream(pcm, stream, file, &substream); | 2067 | err = snd_pcm_open_substream(pcm, stream, file, &substream); |
2072 | if (err < 0) | 2068 | if (err < 0) |
2073 | return err; | 2069 | return err; |
@@ -2083,8 +2079,7 @@ static int snd_pcm_open_file(struct file *file, | |||
2083 | substream->pcm_release = pcm_release_private; | 2079 | substream->pcm_release = pcm_release_private; |
2084 | } | 2080 | } |
2085 | file->private_data = pcm_file; | 2081 | file->private_data = pcm_file; |
2086 | if (rpcm_file) | 2082 | |
2087 | *rpcm_file = pcm_file; | ||
2088 | return 0; | 2083 | return 0; |
2089 | } | 2084 | } |
2090 | 2085 | ||
@@ -2113,7 +2108,6 @@ static int snd_pcm_capture_open(struct inode *inode, struct file *file) | |||
2113 | static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream) | 2108 | static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream) |
2114 | { | 2109 | { |
2115 | int err; | 2110 | int err; |
2116 | struct snd_pcm_file *pcm_file; | ||
2117 | wait_queue_t wait; | 2111 | wait_queue_t wait; |
2118 | 2112 | ||
2119 | if (pcm == NULL) { | 2113 | if (pcm == NULL) { |
@@ -2131,7 +2125,7 @@ static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream) | |||
2131 | add_wait_queue(&pcm->open_wait, &wait); | 2125 | add_wait_queue(&pcm->open_wait, &wait); |
2132 | mutex_lock(&pcm->open_mutex); | 2126 | mutex_lock(&pcm->open_mutex); |
2133 | while (1) { | 2127 | while (1) { |
2134 | err = snd_pcm_open_file(file, pcm, stream, &pcm_file); | 2128 | err = snd_pcm_open_file(file, pcm, stream); |
2135 | if (err >= 0) | 2129 | if (err >= 0) |
2136 | break; | 2130 | break; |
2137 | if (err == -EAGAIN) { | 2131 | if (err == -EAGAIN) { |
@@ -3156,8 +3150,8 @@ static const struct vm_operations_struct snd_pcm_vm_ops_data_fault = { | |||
3156 | /* | 3150 | /* |
3157 | * mmap the DMA buffer on RAM | 3151 | * mmap the DMA buffer on RAM |
3158 | */ | 3152 | */ |
3159 | static int snd_pcm_default_mmap(struct snd_pcm_substream *substream, | 3153 | int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream, |
3160 | struct vm_area_struct *area) | 3154 | struct vm_area_struct *area) |
3161 | { | 3155 | { |
3162 | area->vm_flags |= VM_RESERVED; | 3156 | area->vm_flags |= VM_RESERVED; |
3163 | #ifdef ARCH_HAS_DMA_MMAP_COHERENT | 3157 | #ifdef ARCH_HAS_DMA_MMAP_COHERENT |
@@ -3177,6 +3171,7 @@ static int snd_pcm_default_mmap(struct snd_pcm_substream *substream, | |||
3177 | area->vm_ops = &snd_pcm_vm_ops_data_fault; | 3171 | area->vm_ops = &snd_pcm_vm_ops_data_fault; |
3178 | return 0; | 3172 | return 0; |
3179 | } | 3173 | } |
3174 | EXPORT_SYMBOL_GPL(snd_pcm_lib_default_mmap); | ||
3180 | 3175 | ||
3181 | /* | 3176 | /* |
3182 | * mmap the DMA buffer on I/O memory area | 3177 | * mmap the DMA buffer on I/O memory area |
@@ -3242,7 +3237,7 @@ int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, | |||
3242 | if (substream->ops->mmap) | 3237 | if (substream->ops->mmap) |
3243 | err = substream->ops->mmap(substream, area); | 3238 | err = substream->ops->mmap(substream, area); |
3244 | else | 3239 | else |
3245 | err = snd_pcm_default_mmap(substream, area); | 3240 | err = snd_pcm_lib_default_mmap(substream, area); |
3246 | if (!err) | 3241 | if (!err) |
3247 | atomic_inc(&substream->mmap_count); | 3242 | atomic_inc(&substream->mmap_count); |
3248 | return err; | 3243 | return err; |