1. 30 Apr, 2015 5 commits
  2. 29 Apr, 2015 8 commits
  3. 28 Apr, 2015 2 commits
    • Takashi Iwai's avatar
      ALSA: emux: Fix mutex deadlock in OSS emulation · 1c94e65c
      Takashi Iwai authored
      The OSS emulation in synth-emux helper has a potential AB/BA deadlock
      at the simultaneous closing and opening:
      
        close ->
          snd_seq_release() ->
            sne_seq_free_client() ->
              snd_seq_delete_all_ports(): takes client->ports_mutex ->
      	  port_delete() ->
      	    snd_emux_unuse(): takes emux->register_mutex
      
        open ->
          snd_seq_oss_open() ->
            snd_emux_open_seq_oss(): takes emux->register_mutex ->
              snd_seq_event_port_attach() ->
      	  snd_seq_create_port(): takes client->ports_mutex
      
      This patch addresses the deadlock by reducing the rance taking
      emux->register_mutex in snd_emux_open_seq_oss().  The lock is needed
      for the refcount handling, so move it locally.  The calls in
      emux_seq.c are already with the mutex, thus they are replaced with the
      version without mutex lock/unlock.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      1c94e65c
    • Takashi Iwai's avatar
      Merge branch 'topic/jack' into for-next · 1962fcab
      Takashi Iwai authored
      1962fcab
  4. 27 Apr, 2015 25 commits
    • Jie Yang's avatar
      ALSA: Docs: Add documentation for Jack kcontrols · 12e180a2
      Jie Yang authored
      Add documentation describing Jack kcontrols and how to use them
      with HD-Audio and ASoC.
      Signed-off-by: default avatarJie Yang <yang.jie@intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      12e180a2
    • Jie Yang's avatar
      ALSA: jack: remove exporting ctljack functions · 807845e3
      Jie Yang authored
      snd_kctl_jack_new() and snd_kctl_jack_report() are internal only now
      so make them static.
      Signed-off-by: default avatarJie Yang <yang.jie@intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      807845e3
    • Jie Yang's avatar
      ASoC: jack: create kctls according to jack pins info · f63e8581
      Jie Yang authored
      Jack kctls are now created according to the pin info.
      Signed-off-by: default avatarJie Yang <yang.jie@intel.com>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f63e8581
    • Jie Yang's avatar
      ALSA: hda - Update to use the new jack kctls method · 2ba2dfa1
      Jie Yang authored
      Jack snd_kcontrols can now be created during snd_jack_new()
      or by later calling snd_jack_add_new_kctls().
      
      This patch creates the jacks during the initialisation stage
      for both phantom and non phantom jacks.
      Signed-off-by: default avatarJie Yang <yang.jie@intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2ba2dfa1
    • Jie Yang's avatar
      ALSA: jack: extend snd_jack_new to support phantom jack · 4e3f0dc6
      Jie Yang authored
      Dont create input devices for phantom jacks.
      
      Here, we extend snd_jack_new() to support phantom jack creating:
      pass in a bool param for [non-]phantom flag, and a bool param
      initial_jack to indicate whether we need to create a kctl at
      this stage.
      
      We can also add a kctl to the jack after its created meaning we
      can now integrate the HDA and ASoC jacks.
      Signed-off-by: default avatarJie Yang <yang.jie@intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4e3f0dc6
    • Jie Yang's avatar
      ALSA: Jack: handle jack embedded kcontrol creating within ctljack · b8dd0866
      Jie Yang authored
      This patch adds a static method get_available_index() to
      allocate the index of new jack kcontrols and also adds
      jack_kctl_name_gen() which is used to ensure compatibility
      with jack naming by removing " Jack" from some incorrectly
      passed names.
      Signed-off-by: default avatarJie Yang <yang.jie@intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b8dd0866
    • Jie Yang's avatar
      ALSA: jack: implement kctl creating for jack devices · 9058cbe1
      Jie Yang authored
      Currently the ALSA jack core registers only input devices for each jack
      registered. These jack input devices are not readable by userspace devices
      that run as non root. This patch series will implement kctls inside the
      core jack part, including kctls creating, status changing report, for both
      HD-Audio and ASoC jack. This allows non root userspace to read jack status
      and act on it.
      
      This patch adds a new API called snd_jack_add_new_kctl(), which will create
      a kcontrol, add it to the card, and also attach it to the jack kctl list.
      
      This patch also initialises the jack kctl list after jack is newed, and
      reports kctl status when jack insertion/removal events occur.
      
      snd_jack_new() is updated in the following patches to also support creating
      phantom jacks and jack kcontrols. We then remove these duplicated features
      from HDA jack and have jack kctls handled by core throughout HDA and ASoC.
      Signed-off-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
      Modified-by: default avatarJie Yang <yang.jie@intel.com>
      Signed-off-by: default avatarJie Yang <yang.jie@intel.com>
      Reveiwed-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9058cbe1
    • Takashi Iwai's avatar
      Merge branch 'for-4.2' into for-next · f1a77547
      Takashi Iwai authored
      f1a77547
    • Takashi Iwai's avatar
      ALSA: hda - Fix missing va_end() call in snd_hda_codec_pcm_new() · 30e5f003
      Takashi Iwai authored
      Reported by coverity CID 1296024.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      30e5f003
    • Takashi Iwai's avatar
      ALSA: emux: Fix mutex deadlock at unloading · 07b0e5d4
      Takashi Iwai authored
      The emux-synth driver has a possible AB/BA mutex deadlock at unloading
      the emu10k1 driver:
      
        snd_emux_free() ->
          snd_emux_detach_seq(): mutex_lock(&emu->register_mutex) ->
            snd_seq_delete_kernel_client() ->
              snd_seq_free_client(): mutex_lock(&register_mutex)
      
        snd_seq_release() ->
          snd_seq_free_client(): mutex_lock(&register_mutex) ->
            snd_seq_delete_all_ports() ->
              snd_emux_unuse(): mutex_lock(&emu->register_mutex)
      
      Basically snd_emux_detach_seq() doesn't need a protection of
      emu->register_mutex as it's already being unregistered.  So, we can
      get rid of this for avoiding the deadlock.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      07b0e5d4
    • Takashi Iwai's avatar
      ALSA: emu10k1: Fix card shortname string buffer overflow · d0226082
      Takashi Iwai authored
      Some models provide too long string for the shortname that has 32bytes
      including the terminator, and it results in a non-terminated string
      exposed to the user-space.  This isn't too critical, though, as the
      string is stopped at the succeeding longname string.
      
      This patch fixes such entries by dropping "SB" prefix (it's enough to
      fit within 32 bytes, so far).  Meanwhile, it also changes strcpy()
      with strlcpy() to make sure that this kind of problem won't happen in
      future, too.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d0226082
    • Takashi Iwai's avatar
      Merge branch 'topic/hda' into for-4.2 · 8ab418d3
      Takashi Iwai authored
      8ab418d3
    • Lars-Peter Clausen's avatar
      ALSA: Close holes in struct snd_pcm_constraint_list · 782e50e0
      Lars-Peter Clausen authored
      On a 64-bit system there is a 32-bit hole in struct snd_pcm_constraint_list
      and then 32-bit padding at the end. Reordering things slightly gets rid of
      the hole and padding, reducing the size of the struct by 50% from its
      original size.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      782e50e0
    • Lars-Peter Clausen's avatar
      ALSA: Close holes in struct snd_pcm_hw_rule · d16efa06
      Lars-Peter Clausen authored
      On a 64-bit system there are two 32-bit holes due to the alignment of 64-bit
      fields. Reordering things slightly gets rid of those holes, reducing the
      size of the struct by 17% percent of its original size.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d16efa06
    • Takashi Iwai's avatar
      ALSA: hda - Add mute-LED mode control to Thinkpad · 7290006d
      Takashi Iwai authored
      This patch adds the missing flag to enable "Mute-LED Mode" mixer enum
      ctl for Thinkpads that have also the software mute-LED control.
      Reported-and-tested-by: default avatarPali Rohár <pali.rohar@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7290006d
    • Takashi Iwai's avatar
      ALSA: hda - Fix mute-LED fixed mode · ee52e56e
      Takashi Iwai authored
      The mute-LED mode control has the fixed on/off states that are
      supposed to remain on/off regardless of the master switch.  However,
      this doesn't work actually because the vmaster hook is called in the
      vmaster code itself.
      
      This patch fixes it by calling the hook indirectly after checking the
      mute LED mode.
      Reported-and-tested-by: default avatarPali Rohár <pali.rohar@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      ee52e56e
    • Takashi Iwai's avatar
      ALSA: hda - Fix click noise at start on Dell XPS13 · 3e1b0c4a
      Takashi Iwai authored
      Dell XPS13 produces a click noise at boot up, and Gabriele spotted out
      that it's triggered by the initial pin control of the mic (NID 0x19).
      This has to be set to Hi-Z Vref while the driver initializes to Vref
      80% as a normal mic.
      
      This patch fixes the generic parser code not to override the target
      vref if it has been already set by the driver, and adds a proper
      initialization of the target vref for this pin in the Realtek driver
      side.
      Reported-and-tested-by: default avatarGabriele Mazzotta <gabriele.mzt@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      3e1b0c4a
    • Linus Torvalds's avatar
      Linux 4.1-rc1 · b787f68c
      Linus Torvalds authored
      b787f68c
    • Andy Lutomirski's avatar
      x86_64, asm: Work around AMD SYSRET SS descriptor attribute issue · 61f01dd9
      Andy Lutomirski authored
      AMD CPUs don't reinitialize the SS descriptor on SYSRET, so SYSRET with
      SS == 0 results in an invalid usermode state in which SS is apparently
      equal to __USER_DS but causes #SS if used.
      
      Work around the issue by setting SS to __KERNEL_DS __switch_to, thus
      ensuring that SYSRET never happens with SS set to NULL.
      
      This was exposed by a recent vDSO cleanup.
      
      Fixes: e7d6eefa x86/vdso32/syscall.S: Do not load __USER32_DS to %ss
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Peter Anvin <hpa@zytor.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Denys Vlasenko <vda.linux@googlemail.com>
      Cc: Brian Gerst <brgerst@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      61f01dd9
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 1190944f
      Linus Torvalds authored
      Pull intel drm fixes from Dave Airlie.
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg
        drm/i915: Workaround to avoid lite restore with HEAD==TAIL
        drm/i915: cope with large i2c transfers
      1190944f
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/intel-iommu · 9f86262d
      Linus Torvalds authored
      Pull intel iommu updates from David Woodhouse:
       "This lays a little of the groundwork for upcoming Shared Virtual
        Memory support — fixing some bogus #defines for capability bits and
        adding the new ones, and starting to use the new wider page tables
        where we can, in anticipation of actually filling in the new fields
        therein.
      
        It also allows graphics devices to be assigned to VM guests again.
        This got broken in 3.17 by disallowing assignment of RMRR-afflicted
        devices.  Like USB, we do understand why there's an RMRR for graphics
        devices — and unlike USB, it's actually sane.  So we can make an
        exception for graphics devices, just as we do USB controllers.
      
        Finally, tone down the warning about the X2APIC_OPT_OUT bit, due to
        persistent requests.  X2APIC_OPT_OUT was added to the spec as a nasty
        hack to allow broken BIOSes to forbid us from using X2APIC when they
        do stupid and invasive things and would break if we did.
      
        Someone noticed that since Windows doesn't have full IOMMU support for
        DMA protection, setting the X2APIC_OPT_OUT bit made Windows avoid
        initialising the IOMMU on the graphics unit altogether.
      
        This means that it would be available for use in "driver mode", where
        the IOMMU registers are made available through a BAR of the graphics
        device and the graphics driver can do SVM all for itself.
      
        So they started setting the X2APIC_OPT_OUT bit on *all* platforms with
        SVM capabilities.  And even the platforms which *might*, if the
        planets had been aligned correctly, possibly have had SVM capability
        but which in practice actually don't"
      
      * git://git.infradead.org/intel-iommu:
        iommu/vt-d: support extended root and context entries
        iommu/vt-d: Add new extended capabilities from v2.3 VT-d specification
        iommu/vt-d: Allow RMRR on graphics devices too
        iommu/vt-d: Print x2apic opt out info instead of printing a warning
        iommu/vt-d: kill bogus ecap_niotlb_iunits()
      9f86262d
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 85f2901b
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "This has a mixture of merge window cleanups and bugfixes"
      
      * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: st: add include for pinctrl
        i2c: mux: use proper dev when removing "channel-X" symlinks
        i2c: digicolor: remove duplicate include
        i2c: Mark adapter devices with pm_runtime_no_callbacks
        i2c: pca-platform: fix broken email address
        i2c: mxs: fix broken email address
        i2c: rk3x: report number of messages transmitted
      85f2901b
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · f583381f
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "Filipe hit two problems in my block group cache patches.  We finalized
        the fixes last week and ran through more tests"
      
      * 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: prevent list corruption during free space cache processing
        Btrfs: fix inode cache writeout
      f583381f
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-fixes-2015-04-25' of... · 59fd7e4b
      Dave Airlie authored
      Merge tag 'drm-intel-next-fixes-2015-04-25' of git://anongit.freedesktop.org/drm-intel into drm-fixes
      
      three fixes for i915.
      
      * tag 'drm-intel-next-fixes-2015-04-25' of git://anongit.freedesktop.org/drm-intel:
        drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg
        drm/i915: Workaround to avoid lite restore with HEAD==TAIL
        drm/i915: cope with large i2c transfers
      59fd7e4b
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.1-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 59953fba
      Linus Torvalds authored
      Pull NFS client updates from Trond Myklebust:
       "Another set of mainly bugfixes and a couple of cleanups.  No new
        functionality in this round.
      
        Highlights include:
      
        Stable patches:
         - Fix a regression in /proc/self/mountstats
         - Fix the pNFS flexfiles O_DIRECT support
         - Fix high load average due to callback thread sleeping
      
        Bugfixes:
         - Various patches to fix the pNFS layoutcommit support
         - Do not cache pNFS deviceids unless server notifications are enabled
         - Fix a SUNRPC transport reconnection regression
         - make debugfs file creation failure non-fatal in SUNRPC
         - Another fix for circular directory warnings on NFSv4 "junctioned"
           mountpoints
         - Fix locking around NFSv4.2 fallocate() support
         - Truncating NFSv4 file opens should also sync O_DIRECT writes
         - Prevent infinite loop in rpcrdma_ep_create()
      
        Features:
         - Various improvements to the RDMA transport code's handling of
           memory registration
         - Various code cleanups"
      
      * tag 'nfs-for-4.1-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (55 commits)
        fs/nfs: fix new compiler warning about boolean in switch
        nfs: Remove unneeded casts in nfs
        NFS: Don't attempt to decode missing directory entries
        Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one"
        NFS: Rename idmap.c to nfs4idmap.c
        NFS: Move nfs_idmap.h into fs/nfs/
        NFS: Remove CONFIG_NFS_V4 checks from nfs_idmap.h
        NFS: Add a stub for GETDEVICELIST
        nfs: remove WARN_ON_ONCE from nfs_direct_good_bytes
        nfs: fix DIO good bytes calculation
        nfs: Fetch MOUNTED_ON_FILEID when updating an inode
        sunrpc: make debugfs file creation failure non-fatal
        nfs: fix high load average due to callback thread sleeping
        NFS: Reduce time spent holding the i_mutex during fallocate()
        NFS: Don't zap caches on fallocate()
        xprtrdma: Make rpcrdma_{un}map_one() into inline functions
        xprtrdma: Handle non-SEND completions via a callout
        xprtrdma: Add "open" memreg op
        xprtrdma: Add "destroy MRs" memreg op
        xprtrdma: Add "reset MRs" memreg op
        ...
      59953fba