1. 20 Apr, 2015 2 commits
  2. 18 Apr, 2015 2 commits
    • Alexey Khoroshilov's avatar
      sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND) · bc26d4d0
      Alexey Khoroshilov authored
      A deadlock can be initiated by userspace via ioctl(SNDCTL_SEQ_OUTOFBAND)
      on /dev/sequencer with TMR_ECHO midi event.
      
      In this case the control flow is:
      sound_ioctl()
      -> case SND_DEV_SEQ:
         case SND_DEV_SEQ2:
           sequencer_ioctl()
           -> case SNDCTL_SEQ_OUTOFBAND:
                spin_lock_irqsave(&lock,flags);
                play_event();
                -> case EV_TIMING:
                     seq_timing_event()
                     -> case TMR_ECHO:
                          seq_copy_to_input()
                          -> spin_lock_irqsave(&lock,flags);
      
      It seems that spin_lock_irqsave() around play_event() is not necessary,
      because the only other call location in seq_startplay() makes the call
      without acquiring spinlock.
      
      So, the patch just removes spinlocks around play_event().
      By the way, it removes unreachable code in seq_timing_event(),
      since (seq_mode == SEQ_2) case is handled in the beginning.
      
      Compile tested only.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      bc26d4d0
    • Vinod Koul's avatar
      ALSA: asound.h - use SNDRV_CTL_ELEM_ID_NAME_MAXLEN · 43c499dc
      Vinod Koul authored
      we have defined SNDRV_CTL_ELEM_ID_NAME_MAXLEN as size of name array so use
      this define instead of numeric value
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      43c499dc
  3. 17 Apr, 2015 1 commit
  4. 16 Apr, 2015 3 commits
  5. 14 Apr, 2015 1 commit
  6. 13 Apr, 2015 6 commits
    • Takashi Iwai's avatar
      Merge tag 'asoc-v4.1-2' of... · ce4524e5
      Takashi Iwai authored
      Merge tag 'asoc-v4.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Updates for v4.1
      
      More updates for v4.1, pretty much all drivers:
      
       - Lots of cleanups from Lars, mainly moving things from the CODEC level
         to the card level.
       - Continuing improvements to rcar from Morimoto-san, pcm512x from
         Howard and Peter, the Intel platforms from Vinod, Jie, Jin and Han,
         and to rt5670 from Bard.
       - Support for some non-DSP Qualcomm platforms, Google's Storm
         platform, Maxmim MAX98925 CODECs and the Ingenic JZ4780 SoC.
      ce4524e5
    • Jo-Philipp Wich's avatar
      ALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T450 · f2aa1110
      Jo-Philipp Wich authored
      The Lenovo Thinkpad T450 requires the ALC292_FIXUP_TPT440_DOCK as well in
      order to get working sound output on the docking stations headphone jack.
      
      Patch tested on a Thinkpad T450 (20BVCTO1WW) using kernel 4.0-rc7 in
      conjunction with a ThinkPad Ultradock.
      Signed-off-by: default avatarJo-Philipp Wich <jow@openwrt.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f2aa1110
    • Takashi Iwai's avatar
      ALSA: hda - Fix another race in runtime PM refcounting · c3aeda62
      Takashi Iwai authored
      Although some races in runtime PM refcount was fixed by the commit
      [664c7155: ALSA: hda - Work around races of power up/down with
      runtime PM], there is still a race in the following case:
      
      CPU0:                   CPU1 :
      runtime suspend:
        codec->in_pm = 1
                              snd_hdac_power_up_pm():
                                pm_runtime_get_sync() skipped
      suspend finished:
        codec->in_pm = 0
                              snd_hdac_power_down_pm():
                                pm_runtime_put_*() is called!
      
      For avoiding this situation, increment in_pm flag atomically when it's
      non-zero, and decrement accordingly, to ensure that in_pm is set
      consistently for the whole concurrent operations.
      
      Also, since atomic_inc_not_zero() and atomic_dec_if_positive() are
      lengthy inline functions, move snd_hdac_power_up_pm() and _down_pm()
      to sound/hda/hdac_device.c as no inline functions.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      c3aeda62
    • Takashi Iwai's avatar
      ALSA: hda - Expose codec type sysfs · eacf6e0a
      Takashi Iwai authored
      The type field of HD-audio codec object should be exposed to
      user-space so that it can identify which driver type to bind (legacy /
      asoc).
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      eacf6e0a
    • Takashi Sakamoto's avatar
      ALSA: ctl: fix to handle several elements added by one operation for userspace element · e1c78df1
      Takashi Sakamoto authored
      An element instance can have several elements with the same feature.
      Some userspace applications can add such an element instance by add
      operation with the number of elements. Then, the element instance
      gets a memory object to keep states of these elements.
      
      But the element instance has just one memory object for the elements.
      This causes the same result to each read/write operations to the
      different elements.
      
      This commit fixes this bug by allocating enough memory objects to the
      element instance for each of elements.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e1c78df1
    • Takashi Iwai's avatar
      Merge branch 'for-next' into for-linus · 9a4f3586
      Takashi Iwai authored
      9a4f3586
  7. 12 Apr, 2015 25 commits