1. 06 Feb, 2019 2 commits
  2. 28 May, 2018 1 commit
  3. 27 Feb, 2018 1 commit
  4. 11 Feb, 2018 1 commit
    • Linus Torvalds's avatar
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds authored
      
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
  5. 27 Nov, 2017 1 commit
  6. 11 Oct, 2017 1 commit
    • Takashi Iwai's avatar
      ALSA: add snd_card_disconnect_sync() · c44027c8
      Takashi Iwai authored
      
      In case of user unbind ALSA driver during playing back / capturing,
      each driver needs to stop and remove it correctly. One note here is
      that we can't cancel from remove function in such case, because
      unbind operation doesn't check return value from remove function.
      So, we *must* stop and remove in this case.
      
      For this purpose, we need to sync (= wait) until the all top-level
      operations are canceled at remove function.
      For example, snd_card_free() processes the disconnection procedure at
      first, then waits for the completion. That's how the hot-unplug works
      safely. It's implemented, at least, in the top-level driver removal.
      
      Now for the lower level driver, we need a similar strategy. Notify to
      the toplevel for hot-unplug (disconnect in ALSA), and sync with the
      stop operation, then continue the rest of its own remove procedure.
      
      This patch adds snd_card_disconnect_sync(), and driver can use it from
      remove function.
      
      Note: the "lower level" driver here refers to a middle layer driver
      (e.g. ASoC components) that can be unbound freely during operation.
      Most of legacy ALSA helper drivers don't have such a problem because
      they can't be unbound.
      
      Note#2: snd_card_disconnect_sync() merely calls snd_card_disconnect()
      and syncs with closing all pending files.  It takes only the files
      opened by user-space into account, and doesn't care about object
      refcounts.  (The latter is handled by snd_card_free() completion call,
      BTW.)  Also, the function doesn't free resources by itself.
      Tested-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      c44027c8
  7. 30 Aug, 2017 1 commit
    • Takashi Iwai's avatar
      ALSA: Get rid of card power_lock · 7d8e8292
      Takashi Iwai authored
      
      Currently we're taking power_lock at each card component for assuring
      the power-up sequence, but it doesn't help anything in the
      implementation at the moment: it just serializes unnecessarily the
      callers, but it doesn't protect about the power state change itself.
      It used to have some usefulness in the early days where we managed the
      PM manually.  But now the suspend/resume core procedure is beyond our
      hands, and power_lock lost its meaning.
      
      This patch drops the power_lock from allover the places.
      There shouldn't be any issues by this change, as it's no helper
      regarding the power state change.  Rather we'll get better performance
      by removing the serialization; which is the only slight concern of any
      behavior change, but it can't be a showstopper, after all.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7d8e8292
  8. 04 Aug, 2017 1 commit
  9. 20 Jun, 2017 1 commit
    • Ingo Molnar's avatar
      sched/wait: Rename wait_queue_t => wait_queue_entry_t · ac6424b9
      Ingo Molnar authored
      
      Rename:
      
      	wait_queue_t		=>	wait_queue_entry_t
      
      'wait_queue_t' was always a slight misnomer: its name implies that it's a "queue",
      but in reality it's a queue *entry*. The 'real' queue is the wait queue head,
      which had to carry the name.
      
      Start sorting this out by renaming it to 'wait_queue_entry_t'.
      
      This also allows the real structure name 'struct __wait_queue' to
      lose its double underscore and become 'struct wait_queue_entry',
      which is the more canonical nomenclature for such data types.
      
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ac6424b9
  10. 16 Jun, 2017 1 commit
  11. 12 Jan, 2016 1 commit
    • Heiner Kallweit's avatar
      ALSA: hda_intel: add card number to irq description · de65360b
      Heiner Kallweit authored
      
      Currently the info in /proc/interrupts doesn't allow to figure out which
      interrupt belongs to which card (HDMI, PCH, ..).
      Therefore add card details to the interrupt description.
      With the patch the info in /proc/interrupts looks like this:
      
      PCI-MSI 442368-edge      snd_hda_intel:card1
      PCI-MSI 49152-edge      snd_hda_intel:card0
      
      NOTE: this patch adds the new irq_descr field snd_card struct that is
      filled automatically at a card object creation.  This can be used
      generically for other drivers as well.  The changes for others will
      follow later -- tiwai
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      de65360b
  12. 29 Jun, 2015 1 commit
    • Colin Ian King's avatar
      ALSA: Fix uninintialized error return · 0755e74b
      Colin Ian King authored
      Static analysis with cppcheck found the following error:
        [sound/core/init.c:118]: (error) Uninitialized variable: err
      
      ..this was introduced by commit 2471b6c8
      ("ALSA: info: Register proc entries recursively, too") where the call
      to snd_info_card_register was removed and no longer setting the error
      return in err.  When snd_info_create_card_entry fails to allocate a
      an entry, the error path exits with garbage in err.  Fix is to return
      -ENOMEM if entry fails to be allocated.
      
      Fixes: 2471b6c8
      
       ("ALSA: info: Register proc entries recursively, too")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0755e74b
  13. 27 May, 2015 1 commit
  14. 18 May, 2015 1 commit
    • Takashi Iwai's avatar
      ALSA: info: Register proc entries recursively, too · 2471b6c8
      Takashi Iwai authored
      The commit [c560a679: ALSA: core: Remove child proc file elements
      recursively] converted snd_card_proc_new() with the normal
      snd_info_*() call and removed snd_device chain for such info
      entries. However, it misses one point: the creation of the proc entry
      was managed by snd_device chain in the former code, and now it's also
      gone, which results in no proc files creation at all.  Mea culpa.
      
      This patch makes snd_info_card_register() creating the all pending
      child proc entries in a shot.  Also, since snd_card_register() might
      be called multiple times, this function is also changed to be callable
      multiple times.
      
      Along with the changes above, now the linked list of snd_info_entry is
      added at creation time instead of snd_info_register() for keeping eyes
      of pending info entries.
      
      Fixes: c560a679
      
       ('ALSA: core: Remove child proc file elements recursively')
      Reported-by: default avatar"Lu, Han" <han.lu@intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2471b6c8
  15. 24 Apr, 2015 2 commits
  16. 03 Mar, 2015 1 commit
  17. 06 Feb, 2015 1 commit
    • Takashi Iwai's avatar
      ALSA: Add a helper to add a new attribute group to card · 6bbc7fed
      Takashi Iwai authored
      
      For assigning sysfs entries for a card device from the driver,
      introduce a new helper function, snd_card_add_dev_attr().  In this
      way, we can avoid the possible race between the device registration
      and the sysfs addition / removal.
      
      The driver can pass a new attribute group to add freely.  This has to
      be called before snd_card_register().
      
      Currently, up to two extra groups can be added.  More than that, it'll
      return an error.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6bbc7fed
  18. 02 Feb, 2015 1 commit
  19. 30 Oct, 2014 1 commit
  20. 18 Jun, 2014 1 commit
  21. 25 Feb, 2014 2 commits
    • Takashi Iwai's avatar
      ALSA: Clean up snd_device_*() codes · 72620d60
      Takashi Iwai authored
      
      A few code cleanups and optimizations.  In addition, drop
      snd_device_disconnect() that isn't used at all, and drop the return
      values from snd_device_free*().
      
      Another slight difference by this change is that now the device state
      will become always SNDRV_DEV_REGISTERED no matter whether dev_register
      ops is present or not.  It's for better consistency.  There should be
      no impact for the current tree, as the state isn't checked.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      72620d60
    • Takashi Iwai's avatar
      ALSA: Use priority list for managing device list · 289ca025
      Takashi Iwai authored
      
      Basically, the device type specifies the priority of the device to be
      registered / freed, too.  However, the priority value isn't well
      utilized but only it's checked as a group.  This results in
      inconsistent register and free order (where each of them should be in
      reversed direction).
      
      This patch simplifies the device list management code by simply
      inserting a list entry at creation time in an incremental order for
      the priority value.  Since we can just follow the link for register,
      disconnect and free calls, we don't have to specify the group; so the
      whole enum definitions are also simplified as well.
      
      The visible change to outside is that the priorities of some object
      types are revisited.  For example, now the SNDRV_DEV_LOWLEVEL object
      is registered before others (control, PCM, etc) and, in return,
      released after others.  Similarly, SNDRV_DEV_CODEC is in a lower
      priority than SNDRV_DEV_BUS for ensuring the dependency.
      
      Also, the unused SNDRV_DEV_TOPLEVEL, SNDRV_DEV_LOWLEVEL_PRE and
      SNDRV_DEV_LOWLEVEL_NORMAL are removed as a cleanup.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      289ca025
  22. 19 Feb, 2014 1 commit
    • Takashi Iwai's avatar
      ALSA: core: Fix missing card sysfs contents · b203dbab
      Takashi Iwai authored
      While moving the card device into struct snd_card, the reference to
      the assigned card in sysfs show/store callbacks were forgotten to be
      refreshed, still accessing to the no longer used drvdata.  Fix these
      places to refer correctly via container_of().
      
      Also, remove the superfluous NULL checks since it's guaranteed to be
      non-NULL now.
      
      Fixes: 8bfb181c
      
       ('ALSA: Embed card device into struct snd_card')
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b203dbab
  23. 14 Feb, 2014 4 commits
  24. 12 Feb, 2014 1 commit
    • Takashi Iwai's avatar
      ALSA: Mandate to pass a device pointer at card creation time · 393aa9c1
      Takashi Iwai authored
      
      This is a part of preliminary works for modernizing the ALSA device
      structure.  So far, we set card->dev at later point after the object
      creation.  Because of this, the core layer doesn't always know which
      device is being handled before it's actually registered, and it makes
      impossible to show the device in error messages, for example.  The
      first goal is to achieve a proper struct device initialization at the
      very beginning of probing.
      
      As a first step, this patch introduces snd_card_new() function (yes
      there was the same named function in the very past), in order to
      receive the parent device pointer from the very beginning.
      snd_card_create() is marked as deprecated.
      
      At this point, there is no functional change other than that.  The
      actual change of the device creation scheme will follow later.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      393aa9c1
  25. 10 Feb, 2014 1 commit
    • Takashi Iwai's avatar
      ALSA: Replace with IS_ENABLED() · 8eeaa2f9
      Takashi Iwai authored
      
      Replace the lengthy #if defined(XXX) || defined(XXX_MODULE) with the
      new IS_ENABLED() macro.
      
      The patch still doesn't cover all ifdefs.  For example, the dependency
      on CONFIG_GAMEPORT is still open-coded because this also has an extra
      dependency on MODULE.  Similarly, an open-coded ifdef in pcm_oss.c and
      some sequencer-related stuff are left untouched.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      8eeaa2f9
  26. 23 Jan, 2014 2 commits
  27. 29 Oct, 2013 2 commits
  28. 24 May, 2013 2 commits
    • Takashi Iwai's avatar
      ALSA: Add kconfig to specify the max card numbers · 7bb2491b
      Takashi Iwai authored
      
      Currently ALSA supports up to 32 card instances when the dynamic minor
      is used.  While 32 cards are usually big enough for normal use cases,
      there are sometimes weird requirements with more card support.
      
      Actually, this limitation, 32, comes from the index option, where you
      can pass the bit mask to assign the card.  Other than that, we can
      actually give more cards up to the minor number limits (currently 256,
      which can be extended more, too).
      
      This patch adds a new Kconfig to specify the max card numbers, and
      changes a few places to accept more than 32 cards.
      
      The only incompatibility with high card numbers would be the handling
      of index option.  The index option can be still used to pass the
      bitmask for card assignments, but this works only up to 32 slots.
      More than 32, no bitmask style option is available but only a single
      slot can be specified via index option.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7bb2491b
    • Takashi Iwai's avatar
      ALSA: Fix the default suffix string with high card number · 8edbb198
      Takashi Iwai authored
      
      ALSA core tries to add a suffix as "_1" automatically when the given
      id string conflicts.  The current code assumes implicitly that the max
      card number is 16 so that the single hex "_X" suffix can be put.
      However, with the dynamic device management, the card can be at most
      32, so it can put even a non-hex character there.  Also, when the max
      card number is increased in future, this would result in worse.
      
      This patch rewrites the code to add the suffix string in a simpler
      (thus cleaner) way.  It can support up to three digits, so it should
      suffice for most requirements.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      8edbb198
  29. 12 Mar, 2013 1 commit
  30. 30 Oct, 2012 1 commit
  31. 11 Mar, 2012 1 commit
    • Paul Gortmaker's avatar
      device.h: cleanup users outside of linux/include (C files) · 51990e82
      Paul Gortmaker authored
      
      For files that are actively using linux/device.h, make sure
      that they call it out.  This will allow us to clean up some
      of the implicit uses of linux/device.h within include/*
      without introducing build regressions.
      
      Yes, this was created by "cheating" -- i.e. the headers were
      cleaned up, and then the fallout was found and fixed, and then
      the two commits were reordered.  This ensures we don't introduce
      build regressions into the git history.
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      51990e82