1. Sep 20, 2018
  2. Sep 14, 2018
  3. Sep 13, 2018
  4. Sep 11, 2018
  5. Sep 10, 2018
  6. Sep 05, 2018
  7. Sep 04, 2018
  8. Sep 03, 2018
  9. Aug 30, 2018
  10. Aug 28, 2018
    • Takashi Iwai's avatar
      ALSA: intel_hdmi: Use the new non-cached allocation · 87246f7f
      Takashi Iwai authored
      
      
      The HDMI LPE audio driver requires the non-cached page allocations for
      its buffers.  With the recent support of SNDRV_DMA_TYPE_DEV_UC type,
      we can reduce lots of codes in the driver side and let the memalloc
      core doing it properly.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      87246f7f
    • Takashi Iwai's avatar
      ALSA: intel8x0: Use the new non-cached allocation for 440MX workaround · 4985ddbf
      Takashi Iwai authored
      
      
      intel8x0 driver requires the non-cached pages for 440MX workaround,
      and this can be implemented more easily with the new memalloc type,
      SNDRV_DMA_TYPE_DEV_UC.  This allows us to reduce lots of code.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4985ddbf
    • Takashi Iwai's avatar
      ALSA: hda: Remove substream allocation/free ops · 193c7e14
      Takashi Iwai authored
      
      
      Since we dropped the memory page fiddling in the own allocators in
      hda_intel.c, the substream allocation and free ops in both hda_intel.c
      and hda_tegra.c became nothing but the simple calls of the standard
      snd_pcm_lib helpers.  As both are identical, there is no longer need
      for indirect calls via ops; it's a good opportunity for removing ops
      and simplifying the codes.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      193c7e14
    • Takashi Iwai's avatar
      ALSA: hda: Use new non-cached allocation for non-snoop mode · fc478143
      Takashi Iwai authored
      
      
      Now the ALSA memory allocator helper supports the new non-cached
      pages, let's use the new type, SNDRV_DMA_TYPE_DEV_UC_SG, for HD-audio
      driver.  This allows us to reduce lots of codes.
      
      As another positive side-effect by this patch, the long-standing issue
      with non-snoop mode playing in the non-mmap mode is fixed.  The core
      memalloc helper does the proper pgprot setup for non-cached pages for
      vmap(), which was missing in the past.
      
      Reported-and-tested-by: default avatarHans Hu <HansHu@zhaoxin.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      fc478143
    • Takashi Iwai's avatar
      ALSA: hda: Check the non-cached stream buffers more explicitly · 78c9be61
      Takashi Iwai authored
      
      
      Introduce a new flag, uc_buffer, to indicate that the controller
      requires the non-cached pages for stream buffers, either as a
      chip-specific requirement or specified via snoop=0 option.
      This improves the code-readability.
      
      Also, this patch fixes the incorrect behavior for C-Media chip where
      the stream buffers were never handled as non-cached due to the check
      of driver_type even if you pass snoop=0 option.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      78c9be61
    • Takashi Iwai's avatar
      ALSA: memalloc: Add non-cached buffer type · 42e748a0
      Takashi Iwai authored
      
      
      In some cases (mainly for x86), we need the DMA coherent buffer with
      non-cached pages.  Although this has been done in each driver side
      like HD-audio and intel8x0, it can be done cleaner in the core memory
      allocator.
      
      This patch adds the new types, SNDRV_DMA_TYPE_DEV_UC and
      SNDRV_DMA_TYPE_DEV_UC_SG, for allocating such non-cached buffer
      pages.  On non-x86 architectures, they work as same as the standard
      SNDRV_DMA_TYPE_DEV and *_SG.
      
      One additional change by this move is that we can assure to pass the
      non-cached pgprot to the vmapped buffer, too.  It eventually fixes the
      case like non-snoop mode without mmap access on HD-audio.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      42e748a0
    • Takashi Iwai's avatar
      ALSA: memalloc: Simplify snd_malloc_dev_pages() calls · 28f3f4f6
      Takashi Iwai authored
      
      
      snd_malloc_dev_pages() and snd_free_dev_pages() are local functions
      and the parameters passed there are all contained in snd_dma_buffer
      object.  As a code-simplification, pass snd_dma_buffer object and
      assign the address there like other allocators do (except for
      snd_malloc_pages() which is called from outside, hence we can't change
      easily).
      
      Only code refactoring, no functional changes.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      28f3f4f6
    • Takashi Iwai's avatar
      ALSA: memalloc: Don't align the size to power-of-two · 03486830
      Takashi Iwai authored
      
      
      The size passed to dma_alloc_coherent() doesn't have to be aligned
      with power-of-two, rather it should be the raw size.  As a minor
      optimization, remove the size adjustment in the current code.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      03486830
    • Takashi Iwai's avatar
      ALSA: seq: Do error checks at creating system ports · b8e13154
      Takashi Iwai authored
      
      
      snd_seq_system_client_init() doesn't check the errors returned from
      its port creations.  Let's do it properly and handle the error paths.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b8e13154