1. 08 9月, 2009 2 次提交
  2. 07 9月, 2009 1 次提交
  3. 31 8月, 2009 1 次提交
  4. 27 8月, 2009 2 次提交
    • T
      ALSA: Add debug module option · 36ce99c1
      Takashi Iwai 提交于
      Add debug module option to snd core.
      This controls the debug print level.  When CONFIG_SND_DEBUG_VERBOSE
      is set, you can suppress the debug messages by giving or changing this
      parameter to a lower value.  debug=0 means no debug messsages.
      As default, it's set to the verbose level 2.
      
      Since this option can be changed dynamically via sysfs file, you can
      suppress the verbose debug messages on the fly, which wasn't possible
      before.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      36ce99c1
    • T
      ALSA: core - strip too long file names in snd_print*() · 1b0053a0
      Takashi Iwai 提交于
      When modules are built with M= option, they pass long file paths to
      __FILE__.  This results in ugly outputs of snd_print*() when
      CONFIG_SND_VERBOSE_PRINTK is set.
      
      This patch adds a check of the path and strips the leading path dirs
      if the file name is an absolute path to improve the readability of logs.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      1b0053a0
  5. 25 8月, 2009 1 次提交
  6. 20 8月, 2009 1 次提交
    • T
      ALSA: pcm - Fix drain behavior in non-blocking mode · 4cdc115f
      Takashi Iwai 提交于
      The current PCM core has the following problems regarding PCM draining
      in non-blocking mode:
      
      - the current f_flags isn't checked in snd_pcm_drain(), thus changing
        the mode dynamically via snd_pcm_nonblock() after open doesn't work.
      - calling drain in non-blocking mode just return -EAGAIN error, but
        doesn't provide any way to sync with draining.
      
      This patch fixes these issues.
      - check file->f_flags in snd_pcm_drain() properly
      - when O_NONBLOCK is set, PCM core sets the stream(s) to DRAIN state
        but quits ioctl immediately without waiting the whole drain; the
        caller can sync the drain manually via poll()
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4cdc115f
  7. 17 8月, 2009 4 次提交
  8. 03 8月, 2009 1 次提交
    • L
      ALSA: pcm - Tell user that stream to be rewound is suspended · 51840409
      Lubomir Rintel 提交于
      Return STRPIPE instead of EBADF when userspace attempts to rewind
      of forward a stream that was suspended in meanwhile, so that it
      can be recovered by snd_pcm_recover().
      
      This was causing Pulseaudio to unload the ALSA sink module under a race
      condition when it attempted to rewind the stream right after resume from
      suspend, before writing to the stream which would cause it to revive the
      stream otherwise. Tested to work with Pulseaudio patched to attempt to
      snd_pcm_recover() upon receiving an error from snd_pcm_rewind().
      Signed-off-by: NLubomir Rintel <lkundrak@v3.sk>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      51840409
  9. 23 7月, 2009 3 次提交
  10. 22 7月, 2009 1 次提交
    • T
      ALSA: pcm - Fix regressions with VMware · 79452f0a
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      79452f0a
  11. 20 7月, 2009 1 次提交
    • J
      ALSA: OSS sequencer should be initialized after snd_seq_system_client_init · f96e0808
      Jaswinder Singh Rajput 提交于
      When build SND_SEQUENCER in kernel then OSS sequencer(alsa_seq_oss_init)
      is initialized before System (snd_seq_system_client_init) which leads to
      memory leak :
      
      unreferenced object 0xf6b0e680 (size 256):
        comm "swapper", pid 1, jiffies 4294670753
        backtrace:
          [<c108ac5c>] create_object+0x135/0x204
          [<c108adfe>] kmemleak_alloc+0x26/0x4c
          [<c1087de2>] kmem_cache_alloc+0x72/0xff
          [<c126d2ac>] seq_create_client1+0x22/0x160
          [<c126e3b6>] snd_seq_create_kernel_client+0x72/0xef
          [<c1485a05>] snd_seq_oss_create_client+0x86/0x142
          [<c1485920>] alsa_seq_oss_init+0xf6/0x155
          [<c1001059>] do_one_initcall+0x4f/0x111
          [<c14655be>] kernel_init+0x115/0x166
          [<c10032af>] kernel_thread_helper+0x7/0x10
          [<ffffffff>] 0xffffffff
      unreferenced object 0xf688a580 (size 64):
        comm "swapper", pid 1, jiffies 4294670753
        backtrace:
          [<c108ac5c>] create_object+0x135/0x204
          [<c108adfe>] kmemleak_alloc+0x26/0x4c
          [<c1087de2>] kmem_cache_alloc+0x72/0xff
          [<c126f964>] snd_seq_pool_new+0x1c/0xb8
          [<c126d311>] seq_create_client1+0x87/0x160
          [<c126e3b6>] snd_seq_create_kernel_client+0x72/0xef
          [<c1485a05>] snd_seq_oss_create_client+0x86/0x142
          [<c1485920>] alsa_seq_oss_init+0xf6/0x155
          [<c1001059>] do_one_initcall+0x4f/0x111
          [<c14655be>] kernel_init+0x115/0x166
          [<c10032af>] kernel_thread_helper+0x7/0x10
          [<ffffffff>] 0xffffffff
      unreferenced object 0xf6b0e480 (size 256):
        comm "swapper", pid 1, jiffies 4294670754
        backtrace:
          [<c108ac5c>] create_object+0x135/0x204
          [<c108adfe>] kmemleak_alloc+0x26/0x4c
          [<c1087de2>] kmem_cache_alloc+0x72/0xff
          [<c12725a0>] snd_seq_create_port+0x51/0x21c
          [<c126de50>] snd_seq_ioctl_create_port+0x57/0x13c
          [<c126d07a>] snd_seq_do_ioctl+0x4a/0x69
          [<c126d0de>] snd_seq_kernel_client_ctl+0x33/0x49
          [<c1485a74>] snd_seq_oss_create_client+0xf5/0x142
          [<c1485920>] alsa_seq_oss_init+0xf6/0x155
          [<c1001059>] do_one_initcall+0x4f/0x111
          [<c14655be>] kernel_init+0x115/0x166
          [<c10032af>] kernel_thread_helper+0x7/0x10
          [<ffffffff>] 0xffffffff
      
      The correct order should be :
      
      System (snd_seq_system_client_init) should be initialized before
      OSS sequencer(alsa_seq_oss_init) which is equivalent to :
      
      1. insmod sound/core/seq/snd-seq-device.ko
      2. insmod sound/core/seq/snd-seq.ko
      3. insmod sound/core/seq/snd-seq-midi-event.ko
      4. insmod sound/core/seq/oss/snd-seq-oss.ko
      
      Including sound/core/seq/oss/Makefile after other seq modules
      fixes the ordering and memory leak.
      Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f96e0808
  12. 15 7月, 2009 4 次提交
  13. 08 7月, 2009 1 次提交
    • T
      ALSA: Fix SG-buffer DMA with non-coherent architectures · cc6a8acd
      Takashi Iwai 提交于
      Using SG-buffers with dma_alloc_coherent() is often very inefficient
      on non-coherent architectures because a tracking record could be
      allocated in addition for each dma_alloc_coherent() call.
      Instead, simply disable SG-buffers but just allocate normal continuous
      buffers on non-supported (currently all but x86) architectures.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      cc6a8acd
  14. 06 7月, 2009 1 次提交
  15. 22 6月, 2009 2 次提交
  16. 17 6月, 2009 1 次提交
    • T
      ALSA: Add new TLV types for dBwith min/max · 085f3065
      Takashi Iwai 提交于
      Add new types for TLV dB scale specified with min/max values instead
      of min/step since the resolution can't match always with the one
      a device provides.  For example, usb audio devices give 1/256 dB
      resolution while ALSA TLV is based on 1/100 dB resolution.
      The new min/max types have less problems because the possible
      rounding error happens only at min/max.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      085f3065
  17. 11 6月, 2009 1 次提交
    • K
      ALSA: use card device as parent for jack input-devices · 1f3fff7b
      Kay Sievers 提交于
      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: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      1f3fff7b
  18. 08 6月, 2009 1 次提交
  19. 07 6月, 2009 2 次提交
  20. 05 6月, 2009 1 次提交
  21. 04 6月, 2009 2 次提交
    • J
      ALSA: Core - clean up snd_card_set_id* calls and remove possible id collision · 5fdc18d9
      Jaroslav Kysela 提交于
      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: NJaroslav Kysela <perex@perex.cz>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      5fdc18d9
    • M
      ALSA: Fix double locking of card list in snd_card_register() · 872c7820
      Mark Brown 提交于
      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: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      872c7820
  22. 02 6月, 2009 1 次提交
    • J
      ALSA: Core - add snd_card_set_id() function · 10a8ebbb
      Jaroslav Kysela 提交于
      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: NJaroslav Kysela <perex@perex.cz>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      10a8ebbb
  23. 29 5月, 2009 5 次提交