Skip to content
  1. Jul 23, 2009
    • Takashi Iwai's avatar
      ALSA: pcm - Add logging of hwptr updates and interrupt updates · cedb8118
      Takashi Iwai authored
      
      
      Added the logging functionality to xrun_debug to record the hwptr
      updates via snd_pcm_update_hw_ptr() and snd_pcm_update_hwptr_interrupt(),
      corresponding to 16 and 8, respectively.
      
      For example,
      	# echo 9 > /proc/asound/card0/pcm0p/xrun_debug
      will record the position and other parameters at each period interrupt
      together with the normal XRUN debugging.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      cedb8118
  2. Jul 22, 2009
    • Takashi Iwai's avatar
      ALSA: pcm - Fix regressions with VMware · 79452f0a
      Takashi Iwai authored
      
      
      VMware tends to report PCM positions and period updates at utterly
      wrong timing.  This screws up the recent PCM core code that tries
      to correct the position based on the irq timing.
      
      Now, when a backward irq position is detected, skip the update
      instead of rebasing.  (This is almost the old behavior before
      2.6.30.)
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      79452f0a
  3. Jun 22, 2009
  4. Jun 10, 2009
    • Kay Sievers's avatar
      ALSA: use card device as parent for jack input-devices · 1f3fff7b
      Kay Sievers authored
      
      
      This moves the jack devices from the PCI device into the ALSA card device, which
      makes it easier for userspace to find all devices belonging to a specific card
      while granting access to logged-in users.
      
      Jack input devices from sound cards can now simply be matched with udev by doing:
        SUBSYSTEM="input", SUBSYSTEMS="sound", ...
      
       ls -l /sys/devices/pci0000:00/0000:00:1b.0/sound/card0
       controlC0
       device -> ../../../0000:00:1b.0
       id
       input10
       input11
       input8
       input9
       number
       pcmC0D0c
       pcmC0D0p
       pcmC0D1p
       power
       subsystem -> ../../../../../class/sound
       uevent
      
      Cc: Lennart Poettering <lennart@0pointer.de>
      Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      1f3fff7b
  5. Jun 08, 2009
  6. Jun 07, 2009
  7. Jun 06, 2009
  8. Jun 05, 2009
  9. Jun 03, 2009
    • Jaroslav Kysela's avatar
      ALSA: Core - clean up snd_card_set_id* calls and remove possible id collision · 5fdc18d9
      Jaroslav Kysela authored
      
      
      Move locking outside snd_card_set_id_internal() function and rename it
      to snd_card_set_id_no_lock() for better function description.
      
      User defined id is just copied to card structure at allocation time.
      The real unique id procedure is called in snd_card_register() to
      ensure real atomicity.
      
      Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5fdc18d9
    • Mark Brown's avatar
      ALSA: Fix double locking of card list in snd_card_register() · 872c7820
      Mark Brown authored
      
      
      The introduction of snd_card_set_id() added a lock on the card list
      to the old choose_default_id() function when using it to implement
      the new API call. This lock is needed to allow us to walk the list
      and check to see if our new name is a duplicate. Unfortunately this
      causes a lockup when called from snd_card_register() (in cases
      where no ID is supplied for the card) since the card list is already
      locked there.
      
      Fix this fairly hideously by factoring out the implementation and
      using a flag to indicate if the lock should be held. A better fix
      would probably be to refactor snd_card_register() to move the
      _set_id() outside the locking region but I can't immediately see
      anything I can convince myself is safe.
      
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      872c7820
  10. Jun 02, 2009
    • Jaroslav Kysela's avatar
      ALSA: Core - add snd_card_set_id() function · 10a8ebbb
      Jaroslav Kysela authored
      
      
      Introduce snd_card_set_id() function to allow lowlevel drivers to set
      default identification name for card slot. The function checks also
      for identification name collisions and tries to create unique name.
      
      Also, the snd_card_create() function is simplified, because this new
      function is used. As bonus, proper name collision checks are evaluated
      at the card create time.
      
      Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      10a8ebbb
  11. May 29, 2009
  12. May 27, 2009
    • Takashi Iwai's avatar
      ALSA: Enable PCM hw_ptr_jiffies check only in xrun_debug mode · c87d9732
      Takashi Iwai authored
      
      
      The PCM hw_ptr jiffies check results sometimes in problems when a
      hardware doesn't give smooth hw_ptr updates.  So far, au88x0 and some
      other drivers appear not working due to this strict check.
      However, this check is a nice debug tool, and the capability should be
      still kept.
      
      Hence, we disable this check now as default unless the user enables it
      by setting the xrun_debug mode to the specific stream via a proc file.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      c87d9732
    • Takashi Iwai's avatar
      ALSA: Fix invalid jiffies check after pause · 6af3fb72
      Takashi Iwai authored
      
      
      The hw_ptr_jiffies has to be reset properly to avoid the invalid
      check of jiffies delta in snd_pcm_update_hw_ptr*() functions.
      Especailly this patch fixes the bogus jiffies check after the puase
      and resume.
      
      This patch is a modified version of the original patch by Jaroslav.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6af3fb72
  13. May 05, 2009
  14. Apr 28, 2009
    • Takashi Iwai's avatar
      ALSA: pcm core - Avoid jiffies check for devices with BATCH flag · 3e5b5016
      Takashi Iwai authored
      
      
      The hardware devices with SNDRV_PCM_INFO_BATCH flag can't give the
      precise current position.  And such hardwares have often big FIFO
      in addition to the ring buffer, and it screws up the jiffies check
      in pcm_lib.c.
      
      This patch adds a simple check of info flag so that the driver skips
      the jiffies check in snd_pcm_period_elapsed() when BATCH flag is set.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      3e5b5016
  15. Apr 14, 2009
  16. Apr 10, 2009
  17. Apr 07, 2009
  18. Mar 30, 2009
    • Alexey Dobriyan's avatar
      proc 2/2: remove struct proc_dir_entry::owner · 99b76233
      Alexey Dobriyan authored
      Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
      as correctly noted at bug #12454. Someone can lookup entry with NULL
      ->owner, thus not pinning enything, and release it later resulting
      in module refcount underflow.
      
      We can keep ->owner and supply it at registration time like ->proc_fops
      and ->data.
      
      But this leaves ->owner as easy-manipulative field (just one C assignment)
      and somebody will forget to unpin previous/pin current module when
      switching ->owner. ->proc_fops is declared as "const" which should give
      some thoughts.
      
      ->read_proc/->write_proc were just fixed to not require ->owner for
      protection.
      
      rmmod'ed directories will be empty and return "." and ".." -- no harm.
      And directories with tricky enough readdir and lookup shouldn't be modular.
      We definitely don't want such modular code.
      
      Removing ->owner will also make PDE smaller.
      
      So, let's nuke it.
      
      Kudos to Jeff Layton for reminding about this, let's say, oversight.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12454
      
      
      
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      99b76233
  19. Mar 20, 2009
  20. Mar 19, 2009
  21. Mar 18, 2009
  22. Mar 16, 2009
    • Jonathan Corbet's avatar
      Rationalize fasync return values · 60aa4924
      Jonathan Corbet authored
      
      
      Most fasync implementations do something like:
      
           return fasync_helper(...);
      
      But fasync_helper() will return a positive value at times - a feature used
      in at least one place.  Thus, a number of other drivers do:
      
           err = fasync_helper(...);
           if (err < 0)
                   return err;
           return 0;
      
      In the interests of consistency and more concise code, it makes sense to
      map positive return values onto zero where ->fasync() is called.
      
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      60aa4924
    • Jonathan Corbet's avatar
      Use f_lock to protect f_flags · db1dd4d3
      Jonathan Corbet authored
      
      
      Traditionally, changes to struct file->f_flags have been done under BKL
      protection, or with no protection at all.  This patch causes all f_flags
      changes after file open/creation time to be done under protection of
      f_lock.  This allows the removal of some BKL usage and fixes a number of
      longstanding (if microscopic) races.
      
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      db1dd4d3
  23. Mar 09, 2009
Loading