1. 29 Aug, 2015 1 commit
  2. 28 Aug, 2015 1 commit
  3. 26 Aug, 2015 5 commits
    • Takashi Iwai's avatar
      ALSA: usb-audio: Handle normal and auto-suspend equally · 0662292a
      Takashi Iwai authored
      In theory, the device may get suspended even at runtime PM suspend.
      Currently we don't save the mixer state for autopm, and it may bring
      inconsistency.
      
      This patch removes the special handling for autosuspend.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0662292a
    • Takashi Iwai's avatar
      ALSA: usb-audio: Replace probing flag with active refcount · a6da499b
      Takashi Iwai authored
      We can use active refcount for preventing autopm during probe.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a6da499b
    • Takashi Iwai's avatar
      ALSA: usb-audio: Avoid nested autoresume calls · 47ab1545
      Takashi Iwai authored
      After the recent fix of runtime PM for USB-audio driver, we got a
      lockdep warning like:
      
        =============================================
        [ INFO: possible recursive locking detected ]
        4.2.0-rc8+ #61 Not tainted
        ---------------------------------------------
        pulseaudio/980 is trying to acquire lock:
         (&chip->shutdown_rwsem){.+.+.+}, at: [<ffffffffa0355dac>] snd_usb_autoresume+0x1d/0x52 [snd_usb_audio]
        but task is already holding lock:
         (&chip->shutdown_rwsem){.+.+.+}, at: [<ffffffffa0355dac>] snd_usb_autoresume+0x1d/0x52 [snd_usb_audio]
      
      This comes from snd_usb_autoresume() invoking down_read() and it's
      used in a nested way.  Although it's basically safe, per se (as these
      are read locks), it's better to reduce such spurious warnings.
      
      The read lock is needed to guarantee the execution of "shutdown"
      (cleanup at disconnection) task after all concurrent tasks are
      finished.  This can be implemented in another better way.
      
      Also, the current check of chip->in_pm isn't good enough for
      protecting the racy execution of multiple auto-resumes.
      
      This patch rewrites the logic of snd_usb_autoresume() & co; namely,
      - The recursive call of autopm is avoided by the new refcount,
        chip->active.  The chip->in_pm flag is removed accordingly.
      - Instead of rwsem, another refcount, chip->usage_count, is introduced
        for tracking the period to delay the shutdown procedure.  At
        the last clear of this refcount, wake_up() to the shutdown waiter is
        called.
      - The shutdown flag is replaced with shutdown atomic count; this is
        for reducing the lock.
      - Two new helpers are introduced to simplify the management of these
        refcounts; snd_usb_lock_shutdown() increases the usage_count, checks
        the shutdown state, and does autoresume.  snd_usb_unlock_shutdown()
        does the opposite.  Most of mixer and other codes just need this,
        and simply returns an error if it receives an error from lock.
      
      Fixes: 9003ebb1 ('ALSA: usb-audio: Fix runtime PM unbalance')
      Reported-and-tested-by: default avatarAlexnader Kuleshov <kuleshovmail@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      47ab1545
    • Takashi Iwai's avatar
      ALSA: hda - Remove superfluous pcm NULL check · b25cf30a
      Takashi Iwai authored
      The variable pcm can be never NULL since it was rewritten with
      list_for_each_entry().
      Suggested-by: default avatarMarkus Osterhoff <linux-kernel@k-raum.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b25cf30a
    • Takashi Iwai's avatar
      ALSA: hda - Fix widget sysfs tree corruption after refresh · a92d5ee8
      Takashi Iwai authored
      When snd_hdac_refresh_widget_sysfs() is called before the first
      hda_widget_sysfs_init(), the next call overrides and eventually
      fails.  This results in unexpected Oops, something like:
        BUG: unable to handle kernel NULL pointer dereference at 00000000000000c8
        IP: [<ffffffff8180e2a3>] hdmi_chmap_ctl_info+0x23/0x40
      
      The fix is to add a check of the existing sysfs tree.  Also, for more
      safety, this patch adds the checks of device_is_registered() in
      snd-hdac_refresh_wdiget_sysfs(), too.
      
      Fixes: fa4f18b4 ('ALSA: hda - Refresh widgets sysfs at probing Haswell+ HDMI codecs')
      Bugizlla: https://bugzilla.kernel.org/show_bug.cgi?id=103431Reported-by: default avatarAndreas Reis <andreas.reis@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a92d5ee8
  4. 25 Aug, 2015 6 commits
  5. 24 Aug, 2015 1 commit
  6. 23 Aug, 2015 3 commits
  7. 22 Aug, 2015 1 commit
  8. 21 Aug, 2015 14 commits
  9. 19 Aug, 2015 4 commits
  10. 18 Aug, 2015 2 commits
    • Mark Brown's avatar
      ASoC: topology: Disable use from userspace · 8c90503b
      Mark Brown authored
      Since the topology API is still in sufficient flux for changes to be
      identified disable the use of the userspace ABI by adding #error
      statements to the code, ensuring that nobody relies on the headers as
      currently defined.  It is expected that this change will be reverted for
      v4.3.
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      8c90503b
    • Mark Brown's avatar
      ASoC: topology: Add Kconfig option for topology · 78b50f39
      Mark Brown authored
      Allow the topology code to be compiled out so that users who don't need
      topology don't need to havve the code compiled in, saving them some
      memory.
      
      Some more configuration could be added to remove some of the hooks into
      the core data structures but that is probably best done with some
      refactoring to use functions to do the updates of the data structures
      rather than ifdefing in the code as we'd need to do at the minute.
      Suggested-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      78b50f39
  11. 17 Aug, 2015 2 commits