1. 02 10月, 2018 1 次提交
  2. 20 9月, 2018 16 次提交
  3. 14 9月, 2018 1 次提交
  4. 13 9月, 2018 1 次提交
  5. 11 9月, 2018 1 次提交
  6. 10 9月, 2018 1 次提交
  7. 04 9月, 2018 7 次提交
  8. 03 9月, 2018 1 次提交
    • T
      ALSA: rawmidi: Initialize allocated buffers · 5a7b44a8
      Takashi Iwai 提交于
      syzbot reported the uninitialized value exposure in certain situations
      using virmidi loop.  It's likely a very small race at writing and
      reading, and the influence is almost negligible.  But it's safer to
      paper over this just by replacing the existing kvmalloc() with
      kvzalloc().
      
      Reported-by: syzbot+194dffdb8b22fc5d207a@syzkaller.appspotmail.com
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      5a7b44a8
  9. 30 8月, 2018 3 次提交
    • P
      ALSA: hda: move hda_codec.h to include/sound · be57bfff
      Pierre-Louis Bossart 提交于
      As suggested by Takashi, move this header file to make it easier
      to include from e.g. the Intel Skylake driver in follow-up patches
      Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      be57bfff
    • T
      ALSA: hda - Fix cancel_work_sync() stall from jackpoll work · 16037643
      Takashi Iwai 提交于
      On AMD/ATI controllers, the HD-audio controller driver allows a bus
      reset upon the error recovery, and its procedure includes the
      cancellation of pending jack polling work as found in
      snd_hda_bus_codec_reset().  This works usually fine, but it becomes a
      problem when the reset happens from the jack poll work itself; then
      calling cancel_work_sync() from the work being processed tries to wait
      the finish endlessly.
      
      As a workaround, this patch adds the check of current_work() and
      applies the cancel_work_sync() only when it's not from the
      jackpoll_work.
      
      This doesn't fix the root cause of the reported error below, but at
      least, it eases the unexpected stall of the whole system.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200937
      Cc: <stable@vger.kernel.org>
      Cc: Lukas Wunner <lukas@wunner.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      16037643
    • T
      ALSA: hda - Clean up jackpoll_ms option handling · 3a182c84
      Takashi Iwai 提交于
      Currently the jackpoll_ms option value is passed indirectly by
      referring to an array in chip->jackpoll_ms although each card needs to
      see only the assigned value.  Also, the sanity check is done at each
      time in get_jackpoll_interval() although basically jackpoll_ms option
      is a read-only, hence we need to evaluate only once at probe time.
      
      This patch is the code simplification about the above points: the jack
      polling interval is directly set to chip->jackpoll_interval so that it
      can be simply copied to each codec.
      
      No functional change but only code reduction.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      3a182c84
  10. 28 8月, 2018 8 次提交
    • T
      ALSA: intel_hdmi: Use the new non-cached allocation · 87246f7f
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      87246f7f
    • T
      ALSA: intel8x0: Use the new non-cached allocation for 440MX workaround · 4985ddbf
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      4985ddbf
    • T
      ALSA: hda: Remove substream allocation/free ops · 193c7e14
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      193c7e14
    • T
      ALSA: hda: Use new non-cached allocation for non-snoop mode · fc478143
      Takashi Iwai 提交于
      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: NHans Hu <HansHu@zhaoxin.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      fc478143
    • T
      ALSA: hda: Check the non-cached stream buffers more explicitly · 78c9be61
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      78c9be61
    • T
      ALSA: memalloc: Add non-cached buffer type · 42e748a0
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      42e748a0
    • T
      ALSA: memalloc: Simplify snd_malloc_dev_pages() calls · 28f3f4f6
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      28f3f4f6
    • T
      ALSA: memalloc: Don't align the size to power-of-two · 03486830
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      03486830