aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-14 15:44:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-14 15:44:00 -0400
commit0a264b6db702e0e9bdf8b037c61c951f87785bfc (patch)
tree2c41f6dababaabca41c5fc9225989c7151e04ed3 /sound/core
parent1e5a2b1fbb41c619c1abbe9b853269d3d932cdf1 (diff)
parentb9091b1c654953cc9615f282704a6df8e31549cf (diff)
Merge tag 'sound-fix-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Small last-minute fixes for 4.13-rc1: a couple of PCM fixes for m68k, a cleanup work for legacy ISA msnd driver, and a few HD-audio new IDs and quirks" * tag 'sound-fix-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Add hdmi id for a Geminilake variant ALSA: hda/realtek - New codec device ID for ALC1220 ALSA: pcm: Simplify check for dma_mmap_coherent() availability ALSA: pcm: Protect call to dma_mmap_coherent() by check for HAS_DMA ALSA: msnd: Optimize / harden DSP and MIDI loops ALSA: hda/realtek - change the location for one of two front microphones ALSA: opl4: Move inline before return type
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_native.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index b3d5bed75029..22995cb3bd44 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -238,10 +238,8 @@ static bool hw_support_mmap(struct snd_pcm_substream *substream)
238{ 238{
239 if (!(substream->runtime->hw.info & SNDRV_PCM_INFO_MMAP)) 239 if (!(substream->runtime->hw.info & SNDRV_PCM_INFO_MMAP))
240 return false; 240 return false;
241 /* check architectures that return -EINVAL from dma_mmap_coherent() */ 241 /* architecture supports dma_mmap_coherent()? */
242 /* FIXME: this should be some global flag */ 242#if defined(CONFIG_ARCH_NO_COHERENT_DMA_MMAP) || !defined(CONFIG_HAS_DMA)
243#if defined(CONFIG_C6X) || defined(CONFIG_FRV) || defined(CONFIG_MN10300) ||\
244 defined(CONFIG_PARISC) || defined(CONFIG_XTENSA)
245 if (!substream->ops->mmap && 243 if (!substream->ops->mmap &&
246 substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV) 244 substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV)
247 return false; 245 return false;
@@ -3502,7 +3500,7 @@ int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
3502 } 3500 }
3503#endif /* CONFIG_GENERIC_ALLOCATOR */ 3501#endif /* CONFIG_GENERIC_ALLOCATOR */
3504#ifndef CONFIG_X86 /* for avoiding warnings arch/x86/mm/pat.c */ 3502#ifndef CONFIG_X86 /* for avoiding warnings arch/x86/mm/pat.c */
3505 if (!substream->ops->page && 3503 if (IS_ENABLED(CONFIG_HAS_DMA) && !substream->ops->page &&
3506 substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV) 3504 substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV)
3507 return dma_mmap_coherent(substream->dma_buffer.dev.dev, 3505 return dma_mmap_coherent(substream->dma_buffer.dev.dev,
3508 area, 3506 area,