1. 10 12月, 2018 3 次提交
  2. 09 12月, 2018 2 次提交
  3. 07 12月, 2018 4 次提交
  4. 06 12月, 2018 2 次提交
  5. 05 12月, 2018 4 次提交
  6. 03 12月, 2018 4 次提交
  7. 29 11月, 2018 6 次提交
    • K
      ALSA: hda: Add support for AMD Stoney Ridge · 3deef52c
      Kai-Heng Feng 提交于
      It's similar to other AMD audio devices, it also supports D3, which can
      save some power drain.
      Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      3deef52c
    • T
      ALSA: usb-audio: Add SMSL D1 to quirks for native DSD support · 44ff57e6
      Tony Das 提交于
      This patch adds quirk VID/PID IDs for the SMSL D1 in order to enable
      Native DSD support.
      
      [ Moved the added entry in numerical order -- tiwai ]
      Signed-off-by: NTony Das <tdas444@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      44ff57e6
    • C
      ALSA: pcm: Fix starvation on down_write_nonblock() · b888a5f7
      Chanho Min 提交于
      Commit 67ec1072 ("ALSA: pcm: Fix rwsem deadlock for non-atomic PCM
      stream") fixes deadlock for non-atomic PCM stream. But, This patch
      causes antother stuck.
      If writer is RT thread and reader is a normal thread, the reader
      thread will be difficult to get scheduled. It may not give chance to
      release readlocks and writer gets stuck for a long time if they are
      pinned to single cpu.
      
      The deadlock described in the previous commit is because the linux
      rwsem queues like a FIFO. So, we might need non-FIFO writelock, not
      non-block one.
      
      My suggestion is that the writer gives reader a chance to be scheduled
      by using the minimum msleep() instaed of spinning without blocking by
      writer. Also, The *_nonblock may be changed to *_nonfifo appropriately
      to this concept.
      In terms of performance, when trylock is failed, this minimum periodic
      msleep will have the same performance as the tick-based
      schedule()/wake_up_q().
      
      [ Although this has a fairly high performance penalty, the relevant
        code path became already rare due to the previous commit ("ALSA:
        pcm: Call snd_pcm_unlink() conditionally at closing").  That is, now
        this unconditional msleep appears only when using linked streams,
        and this must be a rare case.  So we accept this as a quick
        workaround until finding a more suitable one -- tiwai ]
      
      Fixes: 67ec1072 ("ALSA: pcm: Fix rwsem deadlock for non-atomic PCM stream")
      Suggested-by: NWonmin Jung <wonmin.jung@lge.com>
      Signed-off-by: NChanho Min <chanho.min@lge.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b888a5f7
    • T
      ALSA: pcm: Call snd_pcm_unlink() conditionally at closing · b51abed8
      Takashi Iwai 提交于
      Currently the PCM core calls snd_pcm_unlink() always unconditionally
      at closing a stream.  However, since snd_pcm_unlink() invokes the
      global rwsem down, the lock can be easily contended.  More badly, when
      a thread runs in a high priority RT-FIFO, it may stall at spinning.
      
      Basically the call of snd_pcm_unlink() is required only for the linked
      streams that are already rare occasion.  For normal use cases, this
      code path is fairly superfluous.
      
      As an optimization (and also as a workaround for the RT problem
      above in normal situations without linked streams), this patch adds a
      check before calling snd_pcm_unlink() and calls it only when needed.
      Reported-by: NChanho Min <chanho.min@lge.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b51abed8
    • S
      ALSA: hda/tegra: compatible string as shortname · c94800a3
      Sameer Pujar 提交于
      By default HDA sound card is registered with shortname "tegra-hda".
      Same driver is used across tegra platforms and it is necessary to
      distinguish between platforms to use platform specific settings from
      userspace. One such example is, hdmi port on different platforms use
      different alsa pcm device ID. For hdmi playback to work it should
      open correct pcm device depending on the platform.
      
      This patch applies shortname from first compatible string provided
      in root node of device tree. Userspace then can use this card name
      to apply specific settings.
      Signed-off-by: NSameer Pujar <spujar@nvidia.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c94800a3
    • T
      ALSA: hda - Support led audio trigger · b3802783
      Takashi Iwai 提交于
      Now all relevant platform drivers are providing the LED audio trigger,
      we can switch the mute LED control with the LED trigger, finally.
      
      For the mic-mute LED trigger, a common fixup function,
      snd_hda_gen_fixup_micmute_led(), is provided to be called for the
      corresponding quirk entries.  This sets up the capture sync hook with
      ledtrig_audio_set() call appropriately.
      
      For the mute LED trigger, which is done currently only for
      thinkpad_acpi, the call is replaced with ledtrig_audio_set() as well.
      
      Overall, the beauty of the new implementation is that the whole ugly
      bindings with request_symbol() are dropped, and also that it provides
      more flexibility to users.
      
      One potential behavior change by this patch is that the mute LED enum
      may be created on machines that actually have no LED device.  In the
      former code, we did test-call and abort binding if the test failed.
      But with the LED-trigger binding, this test isn't possible, and the
      actual check is done in the LED class device side.  So it's the
      downside of simpleness.
      
      Also, note that the HD-audio codec driver doesn't select CONFIG_LEDS
      and co by itself.  It's supposed to be selected by the platform
      drivers instead.
      Acked-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Acked-by: NPali Rohár <pali.rohar@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b3802783
  8. 28 11月, 2018 1 次提交
  9. 27 11月, 2018 2 次提交
  10. 26 11月, 2018 1 次提交
  11. 25 11月, 2018 4 次提交
    • T
      ALSA: control: Consolidate helpers for adding and replacing ctl elements · 3103c08f
      Takashi Iwai 提交于
      Both snd_ctl_add() and snd_ctl_replace() process the things in a
      fairly similar way, and indeed the most of the codes can be unified.
      
      This patch is a refactoring to consolidate the both functions to call
      a single helper with an extra "mode" argument.  There should be no
      functional difference, except for one additional sanity check applied
      now to snd_ctl_replace() (which was rather overlooking, IMO), too.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      3103c08f
    • T
      ALSA: control: Fix race between adding and removing a user element · e1a7bfe3
      Takashi Iwai 提交于
      The procedure for adding a user control element has some window opened
      for race against the concurrent removal of a user element.  This was
      caught by syzkaller, hitting a KASAN use-after-free error.
      
      This patch addresses the bug by wrapping the whole procedure to add a
      user control element with the card->controls_rwsem, instead of only
      around the increment of card->user_ctl_count.
      
      This required a slight code refactoring, too.  The function
      snd_ctl_add() is split to two parts: a core function to add the
      control element and a part calling it.  The former is called from the
      function for adding a user control element inside the controls_rwsem.
      
      One change to be noted is that snd_ctl_notify() for adding a control
      element gets called inside the controls_rwsem as well while it was
      called outside the rwsem.  But this should be OK, as snd_ctl_notify()
      takes another (finer) rwlock instead of rwsem, and the call of
      snd_ctl_notify() inside rwsem is already done in another code path.
      
      Reported-by: syzbot+dc09047bce3820621ba2@syzkaller.appspotmail.com
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e1a7bfe3
    • T
      ALSA: sparc: Fix invalid snd_free_pages() at error path · 9a20332a
      Takashi Iwai 提交于
      Some spurious calls of snd_free_pages() have been overlooked and
      remain in the error paths of sparc cs4231 driver code.  Since
      runtime->dma_area is managed by the PCM core helper, we shouldn't
      release manually.
      
      Drop the superfluous calls.
      Reviewed-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      9a20332a
    • T
      ALSA: wss: Fix invalid snd_free_pages() at error path · 7b691541
      Takashi Iwai 提交于
      Some spurious calls of snd_free_pages() have been overlooked and
      remain in the error paths of wss driver code.  Since runtime->dma_area
      is managed by the PCM core helper, we shouldn't release manually.
      
      Drop the superfluous calls.
      Reviewed-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7b691541
  12. 24 11月, 2018 3 次提交
  13. 23 11月, 2018 4 次提交