1. 28 Feb, 2017 4 commits
    • Takashi Iwai's avatar
      ALSA: seq: Fix link corruption by event error handling · f3ac9f73
      Takashi Iwai authored
      The sequencer FIFO management has a bug that may lead to a corruption
      (shortage) of the cell linked list.  When a sequencer client faces an
      error at the event delivery, it tries to put back the dequeued cell.
      When the first queue was put back, this forgot the tail pointer
      tracking, and the link will be screwed up.
      
      Although there is no memory corruption, the sequencer client may stall
      forever at exit while flushing the pending FIFO cells in
      snd_seq_pool_done(), as spotted by syzkaller.
      
      This patch addresses the missing tail pointer tracking at
      snd_seq_fifo_cell_putback().  Also the patch makes sure to clear the
      cell->enxt pointer at snd_seq_fifo_event_in() for avoiding a similar
      mess-up of the FIFO linked list.
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f3ac9f73
    • Takashi Iwai's avatar
      ALSA: hda - Add subwoofer support for Dell Inspiron 17 7000 Gaming · 493de342
      Takashi Iwai authored
      Dell Inspiron 17 7000 Gaming laptop needs a similar quirk like
      Inspiron 7599 to support its subwoofer speaker.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=194191
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      493de342
    • Takashi Iwai's avatar
      ALSA: ctxfi: Fallback DMA mask to 32bit · 15c75b09
      Takashi Iwai authored
      Currently ctxfi driver tries to set only the 64bit DMA mask on 64bit
      architectures, and bails out if it fails.  This causes a problem on
      some platforms since the 64bit DMA isn't always guaranteed.  We should
      fall back to the default 32bit DMA when 64bit DMA fails.
      
      Fixes: 6d74b86d ("ALSA: ctxfi - Allow 64bit DMA")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      15c75b09
    • Takashi Iwai's avatar
      ALSA: timer: Reject user params with too small ticks · 71321eb3
      Takashi Iwai authored
      When a user sets a too small ticks with a fine-grained timer like
      hrtimer, the kernel tries to fire up the timer irq too frequently.
      This may lead to the condensed locks, eventually the kernel spinlock
      lockup with warnings.
      
      For avoiding such a situation, we define a lower limit of the
      resolution, namely 1ms.  When the user passes a too small tick value
      that results in less than that, the kernel returns -EINVAL now.
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      71321eb3
  2. 27 Feb, 2017 2 commits
  3. 25 Feb, 2017 1 commit
  4. 22 Feb, 2017 3 commits
    • Takashi Iwai's avatar
      ALSA: usb-audio: Tidy up mixer_us16x08.c · 7086b7b3
      Takashi Iwai authored
      A few more cleanups and improvements that have been overlooked:
      
      - Use ARRAY_SIZE() macro appropriately
      - Code shuffling for minor optimization
      - Omit superfluous variable initializations
      - Get rid of superfluous NULL checks
      - Add const to snd_us16x08_control_params definitions
      
      No functional changes.
      Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7086b7b3
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix memory leak and corruption in mixer_us16x08.c · e2810d76
      Takashi Iwai authored
      There are a few places leaking memory and doing double-free in
      mixer_us16x08.c.
      
      The driver allocates a usb_mixer_elem_info object at each
      add_new_ctl() call.  This has to be freed via kctl->private_free, but
      currently this is done properly only for some controls.
      
      Also, the driver allocates three external objects (comp_store,
      eq_store, meter_store), and these are referred in elem->private_data
      (it's not kctl->private_data).  And these have to be released, but
      there are none doing it.  Moreover, these extra objects have to be
      released only once.  Thus the release should be done only by the first
      kctl element that refers to it.
      
      For fixing these, we call either snd_usb_mixer_elem_free() (only for
      kctl->private_data) or elem_private_free() (for both
      kctl->private_data and elem->private_data) via kctl->private_free
      appropriately.
      
      Last but not least, snd_us16x08_controls_create() may return in the
      middle without releasing the allocated *_store objects due to an
      error.  For fixing this, we shuffle the allocation code so that it's
      called just before its reference.
      
      Fixes: d2bb390a ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk")
      Reported-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e2810d76
    • Takashi Sakamoto's avatar
      ALSA: usb-audio: purge needless variable length array · 89b593c3
      Takashi Sakamoto authored
      Variable length array is used in 'snd_us16x08_meter_get()', while there
      is no need. It's better to purge it because variable length array has
      overhead for stack handling.
      
      This commit replaces the array with static length. Sparse generated below
      warning.
      
      sound/usb/mixer_us16x08.c:714:18: warning: Variable length array is used.
      
      Fixes: d2bb390a ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk")
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      89b593c3
  5. 21 Feb, 2017 3 commits
    • Arnd Bergmann's avatar
      ALSA: x86: hdmi: select CONFIG_SND_PCM · 4b49f0f7
      Arnd Bergmann authored
      The newly added driver uses the PCM helpers and fails to link if they are disabled:
      
      sound/built-in.o: In function `hdmi_lpe_audio_runtime_suspend':
      intel_hdmi_audio.c:(.text+0x15906): undefined reference to `snd_pcm_suspend'
      sound/built-in.o: In function `had_pcm_hw_params':
      intel_hdmi_audio.c:(.text+0x15ac7): undefined reference to `snd_pcm_lib_malloc_pages'
      sound/built-in.o: In function `had_pcm_open':
      intel_hdmi_audio.c:(.text+0x15d49): undefined reference to `snd_pcm_hw_constraint_integer'
      
      This uses a Kconfig 'select' statement to make sure they are enabled.
      
      Fixes: 5dab11d8 ("ALSA: x86: hdmi: Add audio support for BYT and CHT")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4b49f0f7
    • Takashi Iwai's avatar
      ALSA: x86: Don't enable runtime PM as default · 0b6b524f
      Takashi Iwai authored
      Unlike HSW and newer, BYT/CHT devices have no fine control of audio
      power domain in i915 side.  Since there is little gain by runtime PM
      on BYT/CHT, so far, this commit removes the pm_runtime_enable() call
      as default.
      
      User who still wants the runtime PM may adjust the corresponding
      sysfs files (power/control and power/autosuspend_delay_ms)
      appropriately, of course.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0b6b524f
    • Takashi Iwai's avatar
      ALSA: x86: Use runtime PM autosuspend · 3002b9fb
      Takashi Iwai authored
      This patch adds a few lines to the driver to use autosuspend for the
      runtime PM.  It'll become useful with the combination of the keep-link
      feature.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      3002b9fb
  6. 20 Feb, 2017 5 commits
  7. 19 Feb, 2017 22 commits