1. 13 11月, 2014 1 次提交
  2. 11 11月, 2014 2 次提交
  3. 10 11月, 2014 3 次提交
    • T
      ALSA: usb-audio: Fix Oops by composite quirk enhancement · 85a81813
      Takashi Iwai 提交于
      The quirk argument itself was used as iterator, so it cannot be taken
      back to the original value, obviously.
      
      Fixes: d4b8fc66 ('ALSA: usb-audio: Allow multiple entries for the same iface in composite quirk')
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      85a81813
    • T
      ALSA: usb-audio: Allow multiple entries for the same iface in composite quirk · d4b8fc66
      Takashi Iwai 提交于
      Currently the composite quirk doesn't work when multiple entries are
      assigned to the same interface because it marks the interface as
      claimed then checks whether the interface has been already claimed for
      the secondary entry.  But, if you look at the code, you'll notice that
      multiple entries are allowed if the entry is the current interface;
      i.e. the current behavior is anyway inconsistent, and this is an
      unintended shortcoming.
      
      This patch fixes the problem by marking the relevant interfaces as
      claimed after applying the all composite entries.  This fix will be
      needed for the upcoming enhancements for Digidesign Mbox 1 quirks.
      Reviewed-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d4b8fc66
    • T
      ALSA: pcm: Add snd_pcm_stop_xrun() helper · 1fb8510c
      Takashi Iwai 提交于
      Add a new helper function snd_pcm_stop_xrun() to the standard sequnce
      lock/snd_pcm_stop(XRUN)/unlock by a single call, and replace the
      existing open codes with this helper.
      
      The function checks the PCM running state to prevent setting the wrong
      state, too, for more safety.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      1fb8510c
  4. 06 11月, 2014 1 次提交
    • T
      ALSA: usb-audio: Trigger PCM XRUN at XRUN · 67e22500
      Takashi Iwai 提交于
      The usb-audio driver detects XRUN at its complete callback, but the
      actual code to trigger PCM XRUN is commented out because it caused
      deadlock in the past.  This patch revives the PCM trigger properly.
      It resulted in more than just enabling snd_pcm_stop(), but it had to
      deduce the PCM substream with proper NULL checks and holds the stream
      lock around the call.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      67e22500
  5. 05 11月, 2014 1 次提交
    • T
      ALSA: usb-audio: Fix device_del() sysfs warnings at disconnect · 0725dda2
      Takashi Iwai 提交于
      Some USB-audio devices show weird sysfs warnings at disconnecting the
      devices, e.g.
       usb 1-3: USB disconnect, device number 3
       ------------[ cut here ]------------
       WARNING: CPU: 0 PID: 973 at fs/sysfs/group.c:216 device_del+0x39/0x180()
       sysfs group ffffffff8183df40 not found for kobject 'midiC1D0'
       Call Trace:
        [<ffffffff814a3e38>] ? dump_stack+0x49/0x71
        [<ffffffff8103cb72>] ? warn_slowpath_common+0x82/0xb0
        [<ffffffff8103cc55>] ? warn_slowpath_fmt+0x45/0x50
        [<ffffffff813521e9>] ? device_del+0x39/0x180
        [<ffffffff81352339>] ? device_unregister+0x9/0x20
        [<ffffffff81352384>] ? device_destroy+0x34/0x40
        [<ffffffffa00ba29f>] ? snd_unregister_device+0x7f/0xd0 [snd]
        [<ffffffffa025124e>] ? snd_rawmidi_dev_disconnect+0xce/0x100 [snd_rawmidi]
        [<ffffffffa00c0192>] ? snd_device_disconnect+0x62/0x90 [snd]
        [<ffffffffa00c025c>] ? snd_device_disconnect_all+0x3c/0x60 [snd]
        [<ffffffffa00bb574>] ? snd_card_disconnect+0x124/0x1a0 [snd]
        [<ffffffffa02e54e8>] ? usb_audio_disconnect+0x88/0x1c0 [snd_usb_audio]
        [<ffffffffa015260e>] ? usb_unbind_interface+0x5e/0x1b0 [usbcore]
        [<ffffffff813553e9>] ? __device_release_driver+0x79/0xf0
        [<ffffffff81355485>] ? device_release_driver+0x25/0x40
        [<ffffffff81354e11>] ? bus_remove_device+0xf1/0x130
        [<ffffffff813522b9>] ? device_del+0x109/0x180
        [<ffffffffa01501d5>] ? usb_disable_device+0x95/0x1f0 [usbcore]
        [<ffffffffa014634f>] ? usb_disconnect+0x8f/0x190 [usbcore]
        [<ffffffffa0149179>] ? hub_thread+0x539/0x13a0 [usbcore]
        [<ffffffff810669f5>] ? sched_clock_local+0x15/0x80
        [<ffffffff81066c98>] ? sched_clock_cpu+0xb8/0xd0
        [<ffffffff81070730>] ? bit_waitqueue+0xb0/0xb0
        [<ffffffffa0148c40>] ? usb_port_resume+0x430/0x430 [usbcore]
        [<ffffffffa0148c40>] ? usb_port_resume+0x430/0x430 [usbcore]
        [<ffffffff8105973e>] ? kthread+0xce/0xf0
        [<ffffffff81059670>] ? kthread_create_on_node+0x1c0/0x1c0
        [<ffffffff814a8b7c>] ? ret_from_fork+0x7c/0xb0
        [<ffffffff81059670>] ? kthread_create_on_node+0x1c0/0x1c0
       ---[ end trace 40b1928d1136b91e ]---
      
      This comes from the fact that usb-audio driver may receive the
      disconnect callback multiple times, per each usb interface.  When a
      device has both audio and midi interfaces, it gets called twice, and
      currently the driver tries to release resources at the last call.
      At this point, the first parent interface has been already deleted,
      thus deleting a child of the first parent hits such a warning.
      
      For fixing this problem, we need to call snd_card_disconnect() and
      cancel pending operations at the very first disconnect while the
      release of the whole objects waits until the last disconnect call.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80931Reported-and-tested-by: NTomas Gayoso <tgayoso@gmail.com>
      Reported-and-tested-by: NChris J Arges <chris.j.arges@canonical.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      0725dda2
  6. 04 11月, 2014 3 次提交
  7. 21 10月, 2014 2 次提交
  8. 20 10月, 2014 1 次提交
  9. 19 10月, 2014 1 次提交
  10. 07 10月, 2014 1 次提交
  11. 24 9月, 2014 1 次提交
  12. 22 9月, 2014 1 次提交
  13. 08 9月, 2014 2 次提交
  14. 10 8月, 2014 1 次提交
  15. 06 8月, 2014 2 次提交
  16. 04 8月, 2014 2 次提交
  17. 26 6月, 2014 1 次提交
    • T
      ALSA: usb-audio: Fix races at disconnection and PCM closing · 92a586bd
      Takashi Iwai 提交于
      When a USB-audio device is disconnected while PCM is still running, we
      still see some race: the disconnect callback calls
      snd_usb_endpoint_free() that calls release_urbs() and then kfree()
      while a PCM stream would be closed at the same time and calls
      stop_endpoints() that leads to wait_clear_urbs().  That is, the EP
      object might be deallocated while a PCM stream is syncing with
      wait_clear_urbs() with the same EP.
      
      Basically calling multiple wait_clear_urbs() would work fine, also
      calling wait_clear_urbs() and release_urbs() would work, too, as
      wait_clear_urbs() just reads some fields in ep.  The problem is the
      succeeding kfree() in snd_pcm_endpoint_free().
      
      This patch moves out the EP deallocation into the later point, the
      destructor callback.  At this stage, all PCMs must have been already
      closed, so it's safe to free the objects.
      Reported-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      92a586bd
  18. 25 5月, 2014 2 次提交
  19. 03 5月, 2014 4 次提交
  20. 28 4月, 2014 1 次提交
  21. 10 4月, 2014 1 次提交
  22. 07 4月, 2014 1 次提交
  23. 05 3月, 2014 1 次提交
  24. 27 2月, 2014 1 次提交
  25. 26 2月, 2014 1 次提交
    • T
      ALSA: usb-audio: Use standard printk helpers · 0ba41d91
      Takashi Iwai 提交于
      Convert with dev_err() and co from snd_printk(), etc.
      As there are too deep indirections (e.g. ep->chip->dev->dev),
      a few new local macros, usb_audio_err() & co, are introduced.
      
      Also, the device numbers in some messages are dropped, as they are
      shown in the prefix automatically.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      0ba41d91
  26. 17 2月, 2014 2 次提交