Bug 46011

Summary: Capture of sound from USB connected audio card (UGM96) doesn't work in 3.5.1 - kernel bug generated: scheduling while atomic
Product: Drivers Reporter: WZab (wzab)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED CODE_FIX    
Severity: normal CC: alan, florian, tiwai, zonque
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.5.1, 3.5.2 Subsystem:
Regression: No Bisected commit-id:
Attachments: Test fix patch
Fix URB cancellation at stream start
Fix URB cancellation at stream start

Description WZab 2012-08-15 09:36:26 UTC
When I start capturing of sound from USB connected UGM96 adapter,
no sound is received and I get the following kernel bug (with 3.4.5 everything works perfect):

Aug 14 16:22:11 WZLap kernel: [40033.410754] BUG: scheduling while atomic: jackd/24140/0x00000005
Aug 14 16:22:11 WZLap kernel: [40033.410762] Modules linked in: snd_seq_dummy nls_utf8 nls_cp437 vfat fat ppp_deflate zlib_deflate bsd_comp ppp_async crc_ccitt ppp_generic slhc snd_hrtimer tun cpufreq_conservative cpufreq_userspace cpufreq_stats cpufreq_powersave ebtable_nat ebtables ipx p8023 p8022 psnap llc hidp parport_pc ppdev lp parport rfcomm bnep binfmt_misc uinput fuse nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp xt_owner iptable_filter ip_tables x_tables loop ecryptfs sha256_generic option usb_wwan usbserial cdc_ether usbnet dm_crypt snd_hda_codec_realtek uvcvideo videobuf2_vmalloc joydev videobuf2_memops videobuf2_core videodev hid_generic media snd_usb_audio snd_hda_intel snd_hda_codec snd_usbmidi_lib snd_pcm_oss snd_mixer_oss snd_hwdep snd_pcm usbhid hid snd_page_alloc snd_seq_midi snd_seq_midi_event arc4 i915 coretemp snd_rawmidi btusb psmouse(O) iwlwifi snd_seq bluetooth nouveau mxm_wmi dell_wmi lpc_ic
Aug 14 16:22:11 WZLap kernel: h ttm snd_seq_device drm_kms_helper snd_timer drm intel_agp mac80211 pcspkr sparse_keymap mfd_core kvm_intel snd cfg80211 intel_gtt dell_laptop acpi_cpufreq i2c_algo_bit rfkill agpgart dcdbas soundcore mperf i2c_i801 evdev serio_raw i2c_core kvm wmi processor microcode video ac button battery ext4 crc16 jbd2 mbcache dm_mod ums_realtek usb_storage sr_mod sd_mod uas cdrom crc_t10dif crc32c_intel ghash_clmulni_intel ahci libahci libata aesni_intel scsi_mod aes_x86_64 aes_generic cryptd r8169 xhci_hcd mii ehci_hcd usbcore usb_common thermal thermal_sys [last unloaded: scsi_wait_scan]
Aug 14 16:22:11 WZLap kernel: [40033.411065] Pid: 24140, comm: jackd Tainted: G           O 3.5.1 #1
Aug 14 16:22:11 WZLap kernel: [40033.411068] Call Trace:
Aug 14 16:22:11 WZLap kernel: [40033.411087]  [<ffffffff813405ff>] ? __schedule_bug+0x43/0x50
Aug 14 16:22:11 WZLap kernel: [40033.411096]  [<ffffffff81344921>] ? __schedule+0x90/0x507
Aug 14 16:22:11 WZLap kernel: [40033.411104]  [<ffffffff81345a8b>] ? _raw_spin_unlock_irqrestore+0x2b/0x37
Aug 14 16:22:11 WZLap kernel: [40033.411112]  [<ffffffff81343d08>] ? schedule_timeout+0xa9/0xe1
Aug 14 16:22:11 WZLap kernel: [40033.411124]  [<ffffffff810455cf>] ? ftrace_raw_event_timer_class+0x8e/0x8e
Aug 14 16:22:11 WZLap kernel: [40033.411143]  [<ffffffffa05f2313>] ? wait_clear_urbs+0x4b/0x71 [snd_usb_audio]
Aug 14 16:22:11 WZLap kernel: [40033.411162]  [<ffffffffa05f2d5b>] ? snd_usb_endpoint_start+0x3e/0x1e9 [snd_usb_audio]
Aug 14 16:22:11 WZLap kernel: [40033.411181]  [<ffffffffa05f861e>] ? start_endpoints+0x24/0x69 [snd_usb_audio]
Aug 14 16:22:11 WZLap kernel: [40033.411196]  [<ffffffffa05f8693>] ? snd_usb_substream_capture_trigger+0x30/0x71 [snd_usb_audio]
Aug 14 16:22:11 WZLap kernel: [40033.411213]  [<ffffffffa059d1ee>] ? snd_pcm_action_group+0x92/0x1bb [snd_pcm]
Aug 14 16:22:11 WZLap kernel: [40033.411228]  [<ffffffffa059d28c>] ? snd_pcm_action_group+0x130/0x1bb [snd_pcm]
Aug 14 16:22:11 WZLap kernel: [40033.411247]  [<ffffffffa059e068>] ? snd_pcm_action_lock_irq+0x53/0x9d [snd_pcm]
Aug 14 16:22:11 WZLap kernel: [40033.411264]  [<ffffffffa059fcaf>] ? snd_pcm_common_ioctl1+0x3c5/0xa47 [snd_pcm]
Aug 14 16:22:11 WZLap kernel: [40033.411283]  [<ffffffffa039a792>] ? snd_seq_timer_get_cur_time+0x6b/0x76 [snd_seq]
Aug 14 16:22:11 WZLap kernel: [40033.411299]  [<ffffffffa0395601>] ? snd_seq_ioctl_get_queue_status+0xbe/0xed [snd_seq]
Aug 14 16:22:11 WZLap kernel: [40033.411315]  [<ffffffffa05a070f>] ? snd_pcm_playback_ioctl1+0x1ce/0x1e4 [snd_pcm]
Aug 14 16:22:11 WZLap kernel: [40033.411332]  [<ffffffffa05a074c>] ? snd_pcm_playback_ioctl+0x27/0x2b [snd_pcm]
Aug 14 16:22:11 WZLap kernel: [40033.411342]  [<ffffffff8110e126>] ? vfs_ioctl+0x1e/0x31
Aug 14 16:22:11 WZLap kernel: [40033.411349]  [<ffffffff8110e90b>] ? do_vfs_ioctl+0x3b8/0x3fa
Aug 14 16:22:11 WZLap kernel: [40033.411358]  [<ffffffff8101390a>] ? read_tsc+0x5/0x14
Aug 14 16:22:11 WZLap kernel: [40033.411366]  [<ffffffff8106ff78>] ? timekeeping_get_ns+0xd/0x2a
Aug 14 16:22:11 WZLap kernel: [40033.411375]  [<ffffffff8110e998>] ? sys_ioctl+0x4b/0x6f
Aug 14 16:22:11 WZLap kernel: [40033.411383]  [<ffffffff8134a0b9>] ? system_call_fastpath+0x16/0x1b
Aug 14 16:22:11 WZLap kernel: [40033.411429] BUG: scheduling while atomic: jackd/24140/0x00000005
Aug 14 16:22:11 WZLap kernel: [40033.411433] Modules linked in: snd_seq_dummy nls_utf8 nls_cp437 vfat fat ppp_deflate zlib_deflate bsd_comp ppp_async crc_ccitt ppp_generic slhc snd_hrtimer tun cpufreq_conservative cpufreq_userspace cpufreq_stats cpufreq_powersave ebtable_nat ebtables ipx p8023 p8022 psnap llc hidp parport_pc ppdev lp parport rfcomm bnep binfmt_misc uinput fuse nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp xt_owner iptable_filter ip_tables x_tables loop ecryptfs sha256_generic option usb_wwan usbserial cdc_ether usbnet dm_crypt snd_hda_codec_realtek uvcvideo videobuf2_vmalloc joydev videobuf2_memops videobuf2_core videodev hid_generic media snd_usb_audio snd_hda_intel snd_hda_codec snd_usbmidi_lib snd_pcm_oss snd_mixer_oss snd_hwdep snd_pcm usbhid hid snd_page_alloc snd_seq_midi snd_seq_midi_event arc4 i915 coretemp snd_rawmidi btusb psmouse(O) iwlwifi snd_seq bluetooth nouveau mxm_wmi dell_wmi lpc_ic
Aug 14 16:22:11 WZLap kernel: h ttm snd_seq_device drm_kms_helper snd_timer drm intel_agp mac80211 pcspkr sparse_keymap mfd_core kvm_intel snd cfg80211 intel_gtt dell_laptop acpi_cpufreq i2c_algo_bit rfkill agpgart dcdbas soundcore mperf i2c_i801 evdev serio_raw i2c_core kvm wmi processor microcode video ac button battery ext4 crc16 jbd2 mbcache dm_mod ums_realtek usb_storage sr_mod sd_mod uas cdrom crc_t10dif crc32c_intel ghash_clmulni_intel ahci libahci libata aesni_intel scsi_mod aes_x86_64 aes_generic cryptd r8169 xhci_hcd mii ehci_hcd usbcore usb_common thermal thermal_sys [last unloaded: scsi_wait_scan]
Aug 14 16:22:11 WZLap kernel: [40033.411687] Pid: 24140, comm: jackd Tainted: G        W  O 3.5.1 #1
Aug 14 16:22:11 WZLap kernel: [40033.411689] Call Trace:
Aug 14 16:22:11 WZLap kernel: [40033.411695]  [<ffffffff813405ff>] ? __schedule_bug+0x43/0x50
Aug 14 16:22:11 WZLap kernel: [40033.411699]  [<ffffffff81344921>] ? __schedule+0x90/0x507
Aug 14 16:22:11 WZLap kernel: [40033.411703]  [<ffffffff81345a8b>] ? _raw_spin_unlock_irqrestore+0x2b/0x37
Aug 14 16:22:11 WZLap kernel: [40033.411707]  [<ffffffff81343d08>] ? schedule_timeout+0xa9/0xe1
Aug 14 16:22:11 WZLap kernel: [40033.411712]  [<ffffffff810455cf>] ? ftrace_raw_event_timer_class+0x8e/0x8e
Aug 14 16:22:11 WZLap kernel: [40033.411745]  [<ffffffffa05f2313>] ? wait_clear_urbs+0x4b/0x71 [snd_usb_audio]
Aug 14 16:22:11 WZLap kernel: [40033.411771]  [<ffffffffa05f2d5b>] ? snd_usb_endpoint_start+0x3e/0x1e9 [snd_usb_audio]
Aug 14 16:22:11 WZLap kernel: [40033.411799]  [<ffffffffa05f861e>] ? start_endpoints+0x24/0x69 [snd_usb_audio]
Aug 14 16:22:11 WZLap kernel: [40033.411822]  [<ffffffffa05f8693>] ? snd_usb_substream_capture_trigger+0x30/0x71 [snd_usb_audio]
Aug 14 16:22:11 WZLap kernel: [40033.411846]  [<ffffffffa059d1ee>] ? snd_pcm_action_group+0x92/0x1bb [snd_pcm]
Aug 14 16:22:11 WZLap kernel: [40033.411870]  [<ffffffffa059d28c>] ? snd_pcm_action_group+0x130/0x1bb [snd_pcm]
Aug 14 16:22:11 WZLap kernel: [40033.411898]  [<ffffffffa059e068>] ? snd_pcm_action_lock_irq+0x53/0x9d [snd_pcm]
Aug 14 16:22:11 WZLap kernel: [40033.411925]  [<ffffffffa059fcaf>] ? snd_pcm_common_ioctl1+0x3c5/0xa47 [snd_pcm]
Aug 14 16:22:11 WZLap kernel: [40033.411951]  [<ffffffffa039a792>] ? snd_seq_timer_get_cur_time+0x6b/0x76 [snd_seq]
Aug 14 16:22:11 WZLap kernel: [40033.411973]  [<ffffffffa0395601>] ? snd_seq_ioctl_get_queue_status+0xbe/0xed [snd_seq]
Aug 14 16:22:11 WZLap kernel: [40033.411996]  [<ffffffffa05a070f>] ? snd_pcm_playback_ioctl1+0x1ce/0x1e4 [snd_pcm]
Aug 14 16:22:11 WZLap kernel: [40033.412022]  [<ffffffffa05a074c>] ? snd_pcm_playback_ioctl+0x27/0x2b [snd_pcm]
Aug 14 16:22:11 WZLap kernel: [40033.412036]  [<ffffffff8110e126>] ? vfs_ioctl+0x1e/0x31
Aug 14 16:22:11 WZLap kernel: [40033.412048]  [<ffffffff8110e90b>] ? do_vfs_ioctl+0x3b8/0x3fa
Aug 14 16:22:11 WZLap kernel: [40033.412059]  [<ffffffff8101390a>] ? read_tsc+0x5/0x14
Aug 14 16:22:11 WZLap kernel: [40033.412070]  [<ffffffff8106ff78>] ? timekeeping_get_ns+0xd/0x2a
Aug 14 16:22:11 WZLap kernel: [40033.412083]  [<ffffffff8110e998>] ? sys_ioctl+0x4b/0x6f
Aug 14 16:22:11 WZLap kernel: [40033.412096]  [<ffffffff8134a0b9>] ? system_call_fastpath+0x16/0x1b


Second occurence:
Aug 15 11:02:31 WZLap kernel: [  626.995482] BUG: scheduling while atomic: jackd/5445/0x00000005
Aug 15 11:02:31 WZLap kernel: [  626.995533] Modules linked in: bridge stp snd_seq_dummy hidp snd_hrtimer tun cpufreq_conservative cpufreq_userspace cpufreq_stats cpufreq_powersave ipx p8023 p8022 psnap llc parport_pc ppdev lp parport rfcomm bnep binfmt_misc uinput fuse nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp xt_owner iptable_filter ip_tables x_tables loop ecryptfs sha256_generic dm_crypt snd_hda_codec_realtek snd_hda_intel snd_hda_codec joydev snd_usb_audio snd_usbmidi_lib snd_hwdep snd_seq_midi snd_pcm_oss snd_seq_midi_event arc4 snd_mixer_oss snd_rawmidi snd_seq snd_pcm uvcvideo btusb videobuf2_vmalloc videobuf2_memops videobuf2_core nouveau videodev media snd_seq_device snd_page_alloc cdc_ether snd_timer i915 hid_generic iwlwifi usbnet mxm_wmi bluetooth option usb_wwan usbserial snd ttm drm_kms_helper drm intel_agp intel_gtt agpgart acpi_cpufreq mperf lpc_ich mfd_core coretemp dell_wmi sparse_keymap psmouse
Aug 15 11:02:31 WZLap kernel: (O) i2c_algo_bit soundcore i2c_i801 i2c_core dell_laptop dcdbas serio_raw evdev pcspkr kvm_intel kvm processor video button ac battery wmi microcode mac80211 cfg80211 rfkill usbhid hid ext4 crc16 jbd2 mbcache dm_mod usb_storage uas sr_mod sd_mod cdrom crc_t10dif crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 aes_generic cryptd ahci libahci libata r8169 scsi_mod mii xhci_hcd ehci_hcd usbcore usb_common thermal thermal_sys [last unloaded: ebtables]
Aug 15 11:02:31 WZLap kernel: [  627.007199] Pid: 5445, comm: jackd Tainted: G           O 3.5.1 #1
Aug 15 11:02:31 WZLap kernel: [  627.007200] Call Trace:
Aug 15 11:02:31 WZLap kernel: [  627.007204]  [<ffffffff813405ff>] ? __schedule_bug+0x43/0x50
Aug 15 11:02:31 WZLap kernel: [  627.007218]  [<ffffffff81344921>] ? __schedule+0x90/0x507
Aug 15 11:02:31 WZLap kernel: [  627.007224]  [<ffffffff81345a8b>] ? _raw_spin_unlock_irqrestore+0x2b/0x37
Aug 15 11:02:31 WZLap kernel: [  627.007231]  [<ffffffff81343d08>] ? schedule_timeout+0xa9/0xe1
Aug 15 11:02:31 WZLap kernel: [  627.007236]  [<ffffffff810455cf>] ? ftrace_raw_event_timer_class+0x8e/0x8e
Aug 15 11:02:31 WZLap kernel: [  627.007265]  [<ffffffffa062f313>] ? wait_clear_urbs+0x4b/0x71 [snd_usb_audio]
Aug 15 11:02:31 WZLap kernel: [  627.007271]  [<ffffffffa062fd5b>] ? snd_usb_endpoint_start+0x3e/0x1e9 [snd_usb_audio]
Aug 15 11:02:31 WZLap kernel: [  627.007275]  [<ffffffffa063561e>] ? start_endpoints+0x24/0x69 [snd_usb_audio]
Aug 15 11:02:31 WZLap kernel: [  627.007279]  [<ffffffffa0635693>] ? snd_usb_substream_capture_trigger+0x30/0x71 [snd_usb_audio]
Aug 15 11:02:31 WZLap kernel: [  627.007282]  [<ffffffffa05ec1ee>] ? snd_pcm_action_group+0x92/0x1bb [snd_pcm]
Aug 15 11:02:31 WZLap kernel: [  627.007287]  [<ffffffffa05ec28c>] ? snd_pcm_action_group+0x130/0x1bb [snd_pcm]
Aug 15 11:02:31 WZLap kernel: [  627.007291]  [<ffffffffa05ed068>] ? snd_pcm_action_lock_irq+0x53/0x9d [snd_pcm]
Aug 15 11:02:31 WZLap kernel: [  627.007294]  [<ffffffffa05eecaf>] ? snd_pcm_common_ioctl1+0x3c5/0xa47 [snd_pcm]
Aug 15 11:02:31 WZLap kernel: [  627.007298]  [<ffffffffa0600792>] ? snd_seq_timer_get_cur_time+0x6b/0x76 [snd_seq]
Aug 15 11:02:31 WZLap kernel: [  627.007304]  [<ffffffffa05ef70f>] ? snd_pcm_playback_ioctl1+0x1ce/0x1e4 [snd_pcm]
Aug 15 11:02:31 WZLap kernel: [  627.007309]  [<ffffffffa05ef74c>] ? snd_pcm_playback_ioctl+0x27/0x2b [snd_pcm]
Aug 15 11:02:31 WZLap kernel: [  627.007313]  [<ffffffff8110e126>] ? vfs_ioctl+0x1e/0x31
Aug 15 11:02:31 WZLap kernel: [  627.007315]  [<ffffffff8110e90b>] ? do_vfs_ioctl+0x3b8/0x3fa
Aug 15 11:02:31 WZLap kernel: [  627.007317]  [<ffffffff8101390a>] ? read_tsc+0x5/0x14
Aug 15 11:02:31 WZLap kernel: [  627.007319]  [<ffffffff8106ff78>] ? timekeeping_get_ns+0xd/0x2a
Aug 15 11:02:31 WZLap kernel: [  627.007321]  [<ffffffff8110e998>] ? sys_ioctl+0x4b/0x6f
Aug 15 11:02:31 WZLap kernel: [  627.007323]  [<ffffffff8134a0b9>] ? system_call_fastpath+0x16/0x1b
Aug 15 11:02:32 WZLap kernel: [  627.024385] BUG: scheduling while atomic: jackd/5445/0x00000005
Aug 15 11:02:32 WZLap kernel: [  627.024386] Modules linked in: bridge stp snd_seq_dummy hidp snd_hrtimer tun cpufreq_conservative cpufreq_userspace cpufreq_stats cpufreq_powersave ipx p8023 p8022 psnap llc parport_pc ppdev lp parport rfcomm bnep binfmt_misc uinput fuse nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp xt_owner iptable_filter ip_tables x_tables loop ecryptfs sha256_generic dm_crypt snd_hda_codec_realtek snd_hda_intel snd_hda_codec joydev snd_usb_audio snd_usbmidi_lib snd_hwdep snd_seq_midi snd_pcm_oss snd_seq_midi_event arc4 snd_mixer_oss snd_rawmidi snd_seq snd_pcm uvcvideo btusb videobuf2_vmalloc videobuf2_memops videobuf2_core nouveau videodev media snd_seq_device snd_page_alloc cdc_ether snd_timer i915 hid_generic iwlwifi usbnet mxm_wmi bluetooth option usb_wwan usbserial snd ttm drm_kms_helper drm intel_agp intel_gtt agpgart acpi_cpufreq mperf lpc_ich mfd_core coretemp dell_wmi sparse_keymap psmouse
Aug 15 11:02:32 WZLap kernel: (O) i2c_algo_bit soundcore i2c_i801 i2c_core dell_laptop dcdbas serio_raw evdev pcspkr kvm_intel kvm processor video button ac battery wmi microcode mac80211 cfg80211 rfkill usbhid hid ext4 crc16 jbd2 mbcache dm_mod usb_storage uas sr_mod sd_mod cdrom crc_t10dif crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 aes_generic cryptd ahci libahci libata r8169 scsi_mod mii xhci_hcd ehci_hcd usbcore usb_common thermal thermal_sys [last unloaded: ebtables]
Aug 15 11:02:32 WZLap kernel: [  627.024436] Pid: 5445, comm: jackd Tainted: G        W  O 3.5.1 #1
Aug 15 11:02:32 WZLap kernel: [  627.024436] Call Trace:
Aug 15 11:02:32 WZLap kernel: [  627.024437]  [<ffffffff813405ff>] ? __schedule_bug+0x43/0x50
Aug 15 11:02:32 WZLap kernel: [  627.024440]  [<ffffffff81344921>] ? __schedule+0x90/0x507
Aug 15 11:02:32 WZLap kernel: [  627.024442]  [<ffffffff81345a8b>] ? _raw_spin_unlock_irqrestore+0x2b/0x37
Aug 15 11:02:32 WZLap kernel: [  627.024444]  [<ffffffff81343d08>] ? schedule_timeout+0xa9/0xe1
Aug 15 11:02:32 WZLap kernel: [  627.024445]  [<ffffffff810455cf>] ? ftrace_raw_event_timer_class+0x8e/0x8e
Aug 15 11:02:32 WZLap kernel: [  627.024448]  [<ffffffffa062f313>] ? wait_clear_urbs+0x4b/0x71 [snd_usb_audio]
Aug 15 11:02:32 WZLap kernel: [  627.024452]  [<ffffffffa062fd5b>] ? snd_usb_endpoint_start+0x3e/0x1e9 [snd_usb_audio]
Aug 15 11:02:32 WZLap kernel: [  627.024456]  [<ffffffffa063561e>] ? start_endpoints+0x24/0x69 [snd_usb_audio]
Aug 15 11:02:32 WZLap kernel: [  627.024459]  [<ffffffffa0635693>] ? snd_usb_substream_capture_trigger+0x30/0x71 [snd_usb_audio]
Aug 15 11:02:32 WZLap kernel: [  627.024462]  [<ffffffffa05ec1ee>] ? snd_pcm_action_group+0x92/0x1bb [snd_pcm]
Aug 15 11:02:32 WZLap kernel: [  627.024466]  [<ffffffffa05ec28c>] ? snd_pcm_action_group+0x130/0x1bb [snd_pcm]
Aug 15 11:02:32 WZLap kernel: [  627.024470]  [<ffffffffa05ed068>] ? snd_pcm_action_lock_irq+0x53/0x9d [snd_pcm]
Aug 15 11:02:32 WZLap kernel: [  627.024473]  [<ffffffffa05eecaf>] ? snd_pcm_common_ioctl1+0x3c5/0xa47 [snd_pcm]
Aug 15 11:02:32 WZLap kernel: [  627.024476]  [<ffffffff811010a2>] ? do_sync_write+0xae/0xe6
Aug 15 11:02:32 WZLap kernel: [  627.024479]  [<ffffffffa05ef70f>] ? snd_pcm_playback_ioctl1+0x1ce/0x1e4 [snd_pcm]
Aug 15 11:02:32 WZLap kernel: [  627.024482]  [<ffffffff8112e844>] ? fsnotify+0x257/0x2a9
Aug 15 11:02:32 WZLap kernel: [  627.024485]  [<ffffffffa05ef74c>] ? snd_pcm_playback_ioctl+0x27/0x2b [snd_pcm]
Aug 15 11:02:32 WZLap kernel: [  627.024488]  [<ffffffff8110e126>] ? vfs_ioctl+0x1e/0x31
Aug 15 11:02:32 WZLap kernel: [  627.024489]  [<ffffffff8110e90b>] ? do_vfs_ioctl+0x3b8/0x3fa
Aug 15 11:02:32 WZLap kernel: [  627.024491]  [<ffffffff8101390a>] ? read_tsc+0x5/0x14
Aug 15 11:02:32 WZLap kernel: [  627.024494]  [<ffffffff8106ff78>] ? timekeeping_get_ns+0xd/0x2a
Aug 15 11:02:32 WZLap kernel: [  627.024496]  [<ffffffff8110e998>] ? sys_ioctl+0x4b/0x6f
Aug 15 11:02:32 WZLap kernel: [  627.024497]  [<ffffffff8134a0b9>] ? system_call_fastpath+0x16/0x1b
Aug 15 11:02:32 WZLap kernel: [  627.025283] BUG: scheduling while atomic: jackd/5445/0x00000005
Aug 15 11:02:32 WZLap kernel: [  627.025283] Modules linked in: bridge stp snd_seq_dummy hidp snd_hrtimer tun cpufreq_conservative cpufreq_userspace cpufreq_stats cpufreq_powersave ipx p8023 p8022 psnap llc parport_pc ppdev lp parport rfcomm bnep binfmt_misc uinput fuse nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp xt_owner iptable_filter ip_tables x_tables loop ecryptfs sha256_generic dm_crypt snd_hda_codec_realtek snd_hda_intel snd_hda_codec joydev snd_usb_audio snd_usbmidi_lib snd_hwdep snd_seq_midi snd_pcm_oss snd_seq_midi_event arc4 snd_mixer_oss snd_rawmidi snd_seq snd_pcm uvcvideo btusb videobuf2_vmalloc videobuf2_memops videobuf2_core nouveau videodev media snd_seq_device snd_page_alloc cdc_ether snd_timer i915 hid_generic iwlwifi usbnet mxm_wmi bluetooth option usb_wwan usbserial snd ttm drm_kms_helper drm intel_agp intel_gtt agpgart acpi_cpufreq mperf lpc_ich mfd_core coretemp dell_wmi sparse_keymap psmouse
Aug 15 11:02:32 WZLap kernel: (O) i2c_algo_bit soundcore i2c_i801 i2c_core dell_laptop dcdbas serio_raw evdev pcspkr kvm_intel kvm processor video button ac battery wmi microcode mac80211 cfg80211 rfkill usbhid hid ext4 crc16 jbd2 mbcache dm_mod usb_storage uas sr_mod sd_mod cdrom crc_t10dif crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 aes_generic cryptd ahci libahci libata r8169 scsi_mod mii xhci_hcd ehci_hcd usbcore usb_common thermal thermal_sys [last unloaded: ebtables]
Aug 15 11:02:32 WZLap kernel: [  627.025341] Pid: 5445, comm: jackd Tainted: G        W  O 3.5.1 #1
Aug 15 11:02:32 WZLap kernel: [  627.025341] Call Trace:
Aug 15 11:02:32 WZLap kernel: [  627.025342]  [<ffffffff813405ff>] ? __schedule_bug+0x43/0x50
Aug 15 11:02:32 WZLap kernel: [  627.025345]  [<ffffffff81344921>] ? __schedule+0x90/0x507
Aug 15 11:02:32 WZLap kernel: [  627.025346]  [<ffffffff81345a8b>] ? _raw_spin_unlock_irqrestore+0x2b/0x37
Aug 15 11:02:32 WZLap kernel: [  627.025348]  [<ffffffff81343d08>] ? schedule_timeout+0xa9/0xe1
Aug 15 11:02:32 WZLap kernel: [  627.025350]  [<ffffffff810455cf>] ? ftrace_raw_event_timer_class+0x8e/0x8e
Aug 15 11:02:32 WZLap kernel: [  627.025353]  [<ffffffffa062f313>] ? wait_clear_urbs+0x4b/0x71 [snd_usb_audio]
Aug 15 11:02:32 WZLap kernel: [  627.025357]  [<ffffffffa062fd5b>] ? snd_usb_endpoint_start+0x3e/0x1e9 [snd_usb_audio]
Aug 15 11:02:32 WZLap kernel: [  627.025361]  [<ffffffffa063561e>] ? start_endpoints+0x24/0x69 [snd_usb_audio]
Aug 15 11:02:32 WZLap kernel: [  627.025364]  [<ffffffffa0635693>] ? snd_usb_substream_capture_trigger+0x30/0x71 [snd_usb_audio]
Aug 15 11:02:32 WZLap kernel: [  627.025367]  [<ffffffffa05ec1ee>] ? snd_pcm_action_group+0x92/0x1bb [snd_pcm]
Aug 15 11:02:32 WZLap kernel: [  627.025371]  [<ffffffffa05ec28c>] ? snd_pcm_action_group+0x130/0x1bb [snd_pcm]
Aug 15 11:02:32 WZLap kernel: [  627.025374]  [<ffffffffa05ed068>] ? snd_pcm_action_lock_irq+0x53/0x9d [snd_pcm]
Aug 15 11:02:32 WZLap kernel: [  627.025378]  [<ffffffffa05eecaf>] ? snd_pcm_common_ioctl1+0x3c5/0xa47 [snd_pcm]
Aug 15 11:02:32 WZLap kernel: [  627.025381]  [<ffffffff811010a2>] ? do_sync_write+0xae/0xe6
Aug 15 11:02:32 WZLap kernel: [  627.025383]  [<ffffffffa05ef70f>] ? snd_pcm_playback_ioctl1+0x1ce/0x1e4 [snd_pcm]
Aug 15 11:02:32 WZLap kernel: [  627.025386]  [<ffffffff8112e844>] ? fsnotify+0x257/0x2a9
Aug 15 11:02:32 WZLap kernel: [  627.025388]  [<ffffffffa05ef74c>] ? snd_pcm_playback_ioctl+0x27/0x2b [snd_pcm]
Aug 15 11:02:32 WZLap kernel: [  627.025391]  [<ffffffff8110e126>] ? vfs_ioctl+0x1e/0x31
Aug 15 11:02:32 WZLap kernel: [  627.025393]  [<ffffffff8110e90b>] ? do_vfs_ioctl+0x3b8/0x3fa
Aug 15 11:02:32 WZLap kernel: [  627.025394]  [<ffffffff8101390a>] ? read_tsc+0x5/0x14
Aug 15 11:02:32 WZLap kernel: [  627.025396]  [<ffffffff8106ff78>] ? timekeeping_get_ns+0xd/0x2a
Aug 15 11:02:32 WZLap kernel: [  627.025398]  [<ffffffff8110e998>] ? sys_ioctl+0x4b/0x6f
Aug 15 11:02:32 WZLap kernel: [  627.025399]  [<ffffffff8134a0b9>] ? system_call_fastpath+0x16/0x1b
Comment 1 Takashi Iwai 2012-08-15 10:31:21 UTC
Looks like a left-over EP deactivation code in snd_usb_endpoint_start() causing the problem.  The deactivation should be called manually in the prepare callback, and let the start without sleeping.

Could you try the patch below?
Comment 2 Takashi Iwai 2012-08-15 10:39:32 UTC
Created attachment 77771 [details]
Test fix patch
Comment 3 WZab 2012-08-15 15:37:36 UTC
I've patched my kernel and recompiled it.
Now I get no kernel bug, but simply information:
[ 201.644625] cannot submit urb 0, error -28: not enough bandwidth
[  218.941094] cannot submit urb 0, error -28: not enough bandwidth
[  250.218323] cannot submit urb 0, error -28: not enough bandwidth
[  355.373665] cannot submit urb 0, error -28: not enough bandwidth

Now I'm trying recompilation of the fresh 3.5.1 sources, patched right after unpacking.
Comment 4 WZab 2012-08-15 16:44:21 UTC
Even after fresh recompilation of patched sources I get the same problem:

In kernel logs:
[  129.679542] cannot submit urb 0, error -28: not enough bandwidth

In qjackctl logs:
ALSA: prepare error for playback on "hw:1" (Broken pipe)
JackAudioDriver::ProcessAsync: read error, stopping...

So the patch prevents kernel bug, but also blocks proper initialization
of the USB sound capture...
Comment 5 Daniel Mack 2012-08-15 18:23:22 UTC
Which kernel did you use before and did does the same hardware work with that older version? IOW: Is this a regression?
Comment 6 WZab 2012-08-15 18:39:35 UTC
Before I used 3.4.5, and it didn't cause any problems.
I can try 3.4.9 and 3.5.2 and let you know about results.
Comment 7 WZab 2012-08-15 18:58:04 UTC
I have one more detail which may be important:

With the 3.5.1 kernel patched with the Takashi's patch the UGM96 works correctly, if connected directly to the USB connector of my machine.

The problem with:
  [7949.470578] cannot submit urb 0, error -28: not enough bandwidth
occurs only when the UGM96 is connected via the Hi-speed USB hub.
I've checked two hubs:

Bus 004 Device 011: ID 0a05:0001  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x0a05 
  idProduct          0x0001 
  bcdDevice            1.00
  iManufacturer           0 
  iProduct                1 USB2.0 Hub
  iSerial                 0 

Bus 004 Device 013: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x05e3 Genesys Logic, Inc.
  idProduct          0x0608 USB-2.0 4-Port HUB
  bcdDevice            9.01
  iManufacturer           0 
  iProduct                1 USB2.0 Hub
  iSerial                 0 

and with both hubs the same problem occurred.

With the older 3.4.5 kernel UGM96 works correctly in all three cases (connected directly and via both hubs).
Comment 8 Daniel Mack 2012-08-15 19:09:16 UTC
Ok, the other bug might in fact be unrelated. We should definitely take Takashi's patch, and then ponder on the other one separately.
Comment 9 WZab 2012-08-15 21:17:03 UTC
The strangest thing, is that in the original 3.5.2 kernel both with UGM96 connected via hub and without hub, I was able to obtain sound capture (however finally the kernel generated bug:

Aug 15 23:08:16 WZLap kernel: [  323.270624] input: EGOSYS, Inc. UGM96 as /devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.3/4-1.3.2/4-1.3.2:1.0/input/input19
Aug 15 23:08:16 WZLap kernel: [  323.271074] hid-generic 0003:0A92:2041.0004: input,hidraw0: USB HID v1.00 Device [EGOSYS, Inc. UGM96] on usb-0000:00:1d.0-1.3.2/input0
Aug 15 23:12:20 WZLap kernel: [  566.841606] BUG: scheduling while atomic: jackd/6419/0x00000005
Aug 15 23:12:20 WZLap kernel: [  566.841615] Modules linked in: snd_seq_dummy snd_hrtimer tun cpufreq_conservative cpufreq_userspace cpufreq_stats cpufreq_powersave ebtable_nat ebtables ipx p8023 p8022 psnap llc parport_pc ppdev lp parport hidp rfcomm bnep binfmt_misc uinput fuse nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp xt_owner iptable_filter ip_tables x_tables loop ecryptfs sha256_generic dm_crypt uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core videodev media hid_generic snd_hda_codec_realtek joydev option usb_wwan usbserial usb_storage usbhid hid snd_usb_audio snd_usbmidi_lib cdc_ether usbnet uas snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss nouveau mxm_wmi ttm snd_mixer_oss i915 drm_kms_helper snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event arc4 snd_rawmidi snd_seq snd_seq_device iwlwifi coretemp drm intel_agp intel_gtt acpi_cpufreq mperf psmouse(O) btusb pcspkr dell_wmi snd_timer agpga
Aug 15 23:12:20 WZLap kernel: rt bluetooth snd evdev serio_raw sparse_keymap i2c_algo_bit i2c_i801 i2c_core lpc_ich mfd_core dell_laptop dcdbas soundcore wmi processor kvm_intel video ac button battery mac80211 cfg80211 rfkill kvm microcode ext4 crc16 jbd2 mbcache dm_mod sr_mod sd_mod cdrom crc_t10dif crc32c_intel ghash_clmulni_intel aesni_intel ahci aes_x86_64 libahci aes_generic libata cryptd scsi_mod r8169 mii xhci_hcd thermal thermal_sys ehci_hcd usbcore usb_common [last unloaded: scsi_wait_scan]
Aug 15 23:12:20 WZLap kernel: [  566.841897] Pid: 6419, comm: jackd Tainted: G           O 3.5.2 #1
Aug 15 23:12:20 WZLap kernel: [  566.841900] Call Trace:
Aug 15 23:12:20 WZLap kernel: [  566.841919]  [<ffffffff813415df>] ? __schedule_bug+0x43/0x50
Aug 15 23:12:20 WZLap kernel: [  566.841930]  [<ffffffff81345901>] ? __schedule+0x90/0x507
Aug 15 23:12:20 WZLap kernel: [  566.841938]  [<ffffffff81346a6b>] ? _raw_spin_unlock_irqrestore+0x2b/0x37
Aug 15 23:12:20 WZLap kernel: [  566.841946]  [<ffffffff81344ce8>] ? schedule_timeout+0xa9/0xe1
Aug 15 23:12:20 WZLap kernel: [  566.841957]  [<ffffffff810455fb>] ? ftrace_raw_event_timer_class+0x8e/0x8e
Aug 15 23:12:20 WZLap kernel: [  566.841977]  [<ffffffffa05c1313>] ? wait_clear_urbs+0x4b/0x71 [snd_usb_audio]
Aug 15 23:12:20 WZLap kernel: [  566.841995]  [<ffffffffa05c1d5b>] ? snd_usb_endpoint_start+0x3e/0x1e9 [snd_usb_audio]
Aug 15 23:12:20 WZLap kernel: [  566.842013]  [<ffffffffa05c761e>] ? start_endpoints+0x24/0x69 [snd_usb_audio]
Aug 15 23:12:20 WZLap kernel: [  566.842027]  [<ffffffffa05c7693>] ? snd_usb_substream_capture_trigger+0x30/0x71 [snd_usb_audio]
Aug 15 23:12:20 WZLap kernel: [  566.842044]  [<ffffffffa04191ee>] ? snd_pcm_action_group+0x92/0x1bb [snd_pcm]
Aug 15 23:12:20 WZLap kernel: [  566.842059]  [<ffffffffa041928c>] ? snd_pcm_action_group+0x130/0x1bb [snd_pcm]
Aug 15 23:12:20 WZLap kernel: [  566.842078]  [<ffffffffa041a068>] ? snd_pcm_action_lock_irq+0x53/0x9d [snd_pcm]
Aug 15 23:12:20 WZLap kernel: [  566.842095]  [<ffffffffa041bcaf>] ? snd_pcm_common_ioctl1+0x3c5/0xa47 [snd_pcm]
Aug 15 23:12:20 WZLap kernel: [  566.842112]  [<ffffffffa041c70f>] ? snd_pcm_playback_ioctl1+0x1ce/0x1e4 [snd_pcm]
Aug 15 23:12:20 WZLap kernel: [  566.842129]  [<ffffffffa041c74c>] ? snd_pcm_playback_ioctl+0x27/0x2b [snd_pcm]
Aug 15 23:12:20 WZLap kernel: [  566.842140]  [<ffffffff8110e162>] ? vfs_ioctl+0x1e/0x31
Aug 15 23:12:20 WZLap kernel: [  566.842148]  [<ffffffff8110e947>] ? do_vfs_ioctl+0x3b8/0x3fa
Aug 15 23:12:20 WZLap kernel: [  566.842158]  [<ffffffff8101390a>] ? read_tsc+0x5/0x14
Aug 15 23:12:20 WZLap kernel: [  566.842166]  [<ffffffff8106ffa4>] ? timekeeping_get_ns+0xd/0x2a
Aug 15 23:12:20 WZLap kernel: [  566.842175]  [<ffffffff8110e9d4>] ? sys_ioctl+0x4b/0x6f
Aug 15 23:12:20 WZLap kernel: [  566.842183]  [<ffffffff8134b079>] ? system_call_fastpath+0x16/0x1b
Aug 15 23:14:23 WZLap kernel: [  689.813689] BUG: scheduling while atomic: jackd/6419/0x00000005
Aug 15 23:14:23 WZLap kernel: [  689.813698] Modules linked in: snd_seq_dummy snd_hrtimer tun cpufreq_conservative cpufreq_userspace cpufreq_stats cpufreq_powersave ebtable_nat ebtables ipx p8023 p8022 psnap llc parport_pc ppdev lp parport hidp rfcomm bnep binfmt_misc uinput fuse nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp xt_owner iptable_filter ip_tables x_tables loop ecryptfs sha256_generic dm_crypt uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core videodev media hid_generic snd_hda_codec_realtek joydev option usb_wwan usbserial usb_storage usbhid hid snd_usb_audio snd_usbmidi_lib cdc_ether usbnet uas snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss nouveau mxm_wmi ttm snd_mixer_oss i915 drm_kms_helper snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event arc4 snd_rawmidi snd_seq snd_seq_device iwlwifi coretemp drm intel_agp intel_gtt acpi_cpufreq mperf psmouse(O) btusb pcspkr dell_wmi snd_timer agpga
Aug 15 23:14:23 WZLap kernel: rt bluetooth snd evdev serio_raw sparse_keymap i2c_algo_bit i2c_i801 i2c_core lpc_ich mfd_core dell_laptop dcdbas soundcore wmi processor kvm_intel video ac button battery mac80211 cfg80211 rfkill kvm microcode ext4 crc16 jbd2 mbcache dm_mod sr_mod sd_mod cdrom crc_t10dif crc32c_intel ghash_clmulni_intel aesni_intel ahci aes_x86_64 libahci aes_generic libata cryptd scsi_mod r8169 mii xhci_hcd thermal thermal_sys ehci_hcd usbcore usb_common [last unloaded: scsi_wait_scan]
Aug 15 23:14:23 WZLap kernel: [  689.813978] Pid: 6419, comm: jackd Tainted: G        W  O 3.5.2 #1
Aug 15 23:14:23 WZLap kernel: [  689.813981] Call Trace:
Aug 15 23:14:23 WZLap kernel: [  689.814000]  [<ffffffff813415df>] ? __schedule_bug+0x43/0x50
Aug 15 23:14:23 WZLap kernel: [  689.814010]  [<ffffffff81345901>] ? __schedule+0x90/0x507
Aug 15 23:14:23 WZLap kernel: [  689.814018]  [<ffffffff81346a6b>] ? _raw_spin_unlock_irqrestore+0x2b/0x37
Aug 15 23:14:23 WZLap kernel: [  689.814026]  [<ffffffff81344ce8>] ? schedule_timeout+0xa9/0xe1
Aug 15 23:14:23 WZLap kernel: [  689.814038]  [<ffffffff810455fb>] ? ftrace_raw_event_timer_class+0x8e/0x8e
Aug 15 23:14:23 WZLap kernel: [  689.814057]  [<ffffffffa05c1313>] ? wait_clear_urbs+0x4b/0x71 [snd_usb_audio]
Aug 15 23:14:23 WZLap kernel: [  689.814075]  [<ffffffffa05c1d5b>] ? snd_usb_endpoint_start+0x3e/0x1e9 [snd_usb_audio]
Aug 15 23:14:23 WZLap kernel: [  689.814093]  [<ffffffffa05c761e>] ? start_endpoints+0x24/0x69 [snd_usb_audio]
Aug 15 23:14:23 WZLap kernel: [  689.814107]  [<ffffffffa05c7693>] ? snd_usb_substream_capture_trigger+0x30/0x71 [snd_usb_audio]
Aug 15 23:14:23 WZLap kernel: [  689.814123]  [<ffffffffa04191ee>] ? snd_pcm_action_group+0x92/0x1bb [snd_pcm]
Aug 15 23:14:23 WZLap kernel: [  689.814139]  [<ffffffffa041928c>] ? snd_pcm_action_group+0x130/0x1bb [snd_pcm]
Aug 15 23:14:23 WZLap kernel: [  689.814157]  [<ffffffffa041a068>] ? snd_pcm_action_lock_irq+0x53/0x9d [snd_pcm]
Aug 15 23:14:23 WZLap kernel: [  689.814174]  [<ffffffffa041bcaf>] ? snd_pcm_common_ioctl1+0x3c5/0xa47 [snd_pcm]
Aug 15 23:14:23 WZLap kernel: [  689.814191]  [<ffffffffa041c70f>] ? snd_pcm_playback_ioctl1+0x1ce/0x1e4 [snd_pcm]
Aug 15 23:14:23 WZLap kernel: [  689.814208]  [<ffffffffa041c74c>] ? snd_pcm_playback_ioctl+0x27/0x2b [snd_pcm]
Aug 15 23:14:23 WZLap kernel: [  689.814218]  [<ffffffff8110e162>] ? vfs_ioctl+0x1e/0x31
Aug 15 23:14:23 WZLap kernel: [  689.814226]  [<ffffffff8110e947>] ? do_vfs_ioctl+0x3b8/0x3fa
Aug 15 23:14:23 WZLap kernel: [  689.814236]  [<ffffffff8101390a>] ? read_tsc+0x5/0x14
Aug 15 23:14:23 WZLap kernel: [  689.814243]  [<ffffffff8106ffa4>] ? timekeeping_get_ns+0xd/0x2a
Aug 15 23:14:23 WZLap kernel: [  689.814252]  [<ffffffff8110e9d4>] ? sys_ioctl+0x4b/0x6f
Aug 15 23:14:23 WZLap kernel: [  689.814260]  [<ffffffff8134b079>] ? system_call_fastpath+0x16/0x1b
Comment 10 WZab 2012-08-15 21:34:58 UTC
After applying the patch to 3.5.2, again capture works with UGM96 connected directly, and generates:
[  129.423617] cannot submit urb 0, error -28: not enough bandwidth
when UGM96 is connected via hub.
Comment 11 WZab 2012-08-15 21:48:01 UTC
Kernel 3.4.9 works with the same hardware - UGM96, both connected directly and via hub, without any problems.
Comment 12 Florian Mickler 2012-08-26 10:50:23 UTC
A patch referencing this bug report has been merged in Linux v3.6-rc3:

commit e9ba389c5ffc4dd29dfe17e00e48877302111135
Author: Takashi Iwai <tiwai@suse.de>
Date:   Wed Aug 15 12:32:00 2012 +0200

    ALSA: usb-audio: Fix scheduling-while-atomic bug in PCM capture stream
Comment 13 WZab 2012-08-27 18:47:19 UTC
Thanks for fixing the main bug, however the second problem, reported in comments #4 and #10 still exists. 
Should I re-report it as another bug (as the subject is not valid any more, it should be rather: "error -28: not enough bandwidth when USB audio capturee device is connected via USB hub")?
Comment 14 Alan 2012-08-28 14:30:32 UTC
Please open a second bug.. it's easier to manage that way
Comment 15 Daniel Mack 2012-08-29 11:24:07 UTC
The patch that was discussed earlier and which made it to mainline already does not do the right thing, I believe. Could you try this one on top of 3.6-rcX please?
Comment 16 Daniel Mack 2012-08-29 11:25:24 UTC
Created attachment 78711 [details]
Fix URB cancellation at stream start
Comment 17 Daniel Mack 2012-08-29 13:33:21 UTC
Created attachment 78751 [details]
Fix URB cancellation at stream start
Comment 18 WZab 2012-09-07 16:47:04 UTC
The attached patch (id=78751) doesn't work with kernel 3.5.3

patch -p1 < ../0001-ALSA-snd-usb-Fix-URB-cancellation-at-stream-start.patch 
patching file sound/usb/endpoint.c
Hunk #3 succeeded at 827 with fuzz 2 (offset 4 lines).
patching file sound/usb/endpoint.h
patching file sound/usb/pcm.c
Hunk #4 FAILED at 544.
Hunk #5 succeeded at 1172 (offset -3 lines).
1 out of 5 hunks FAILED -- saving rejects to file sound/usb/pcm.c.rej
Comment 19 Daniel Mack 2012-09-07 16:49:13 UTC
The patch has already been merged as other people signalled success in testing it. Please go ahead and try Linus' current master branch.

The patch has been marked for stable@ and should be picked up soon.
Comment 20 WZab 2012-09-07 16:54:30 UTC
OK. I can see, that it should be aplied AFTER the previous patch!

#patch -p1 < ../0001-ALSA-usb-audio-Fix-scheduling-while-atomic-bug-in-PC.patch
patching file sound/usb/endpoint.c
patching file sound/usb/pcm.c
# patch -p1 < ../0001-ALSA-snd-usb-Fix-URB-cancellation-at-stream-start.patch 
patching file sound/usb/endpoint.c
patching file sound/usb/endpoint.h
patching file sound/usb/pcm.c
Comment 21 WZab 2012-09-07 17:44:21 UTC
With kernel 3.5.3 compiled with both above patches applied:

When tried to start UGM96 connected via hub - system froze immediately. I had to switch the power off.

When tried to start UGM96 connected directly, I got the following error:
[  113.313284] retire_capture_urb: 3720 callbacks suppressed
[  159.005496] cannot submit urb 0, error -28: not enough bandwidth
Comment 22 Daniel Mack 2012-09-07 17:46:13 UTC
Please try Linus' master branch. There were some other patches for this drivers as well.
Comment 23 WZab 2012-09-07 20:10:36 UTC
I've checked 3.6-rc4.
There are still problems:
with hub - [  137.929189] cannot submit urb 0, error -28: not enough bandwidth

without hub - [  188.164687] retire_capture_urb: 4419 callbacks suppressed
[  188.188062] cannot submit urb 0, error -28: not enough bandwidth

(but these may be different problems - related rather to bug 
https://bugzilla.kernel.org/show_bug.cgi?id=47201 ?
Comment 24 Takashi Iwai 2013-11-15 15:38:27 UTC
The bandwidth issue is not about the sound driver but rather a problem with usb host controller.  If this still happens with 3.12 kernel, please open another bug report.  In that case, it'd be also helpful to test sound.git tree (for-linus branch) as well, since some usb-audio fixes are there for 3.13-rc1.