* snd_usb_caiaq bug?
@ 2009-01-04 16:29 Marco Santamaria
2009-01-07 10:56 ` Takashi Iwai
0 siblings, 1 reply; 21+ messages in thread
From: Marco Santamaria @ 2009-01-04 16:29 UTC (permalink / raw)
To: alsa-devel
Hi,
it's about one year that I'm using my Native Instruments Audio Kontrol 1
(USB2 audio/MIDI interface) only with audio applications and it has been
working well so far.
Now I'm trying to use it with Rosegarden (MIDI) and, as soon as I start
Rosegarden, JACK crashes, the process jackd becomes "uninterruptible" and
with the command dmesg I find the following new lines
[ 1935.173876] BUG: unable to handle kernel NULL pointer dereference at
virtual address 00000044
[ 1935.173885] printing eip: f8a5f6fd *pde = 00000000
[ 1935.173891] Oops: 0000 [#1] PREEMPT SMP
[ 1935.173896] Modules linked in: isofs udf ipv6 af_packet i915 drm rfcomm
l2cap bluetooth ppdev acpi_cpufreq cpufreq_ondemand cpufreq_conservative
cpufreq_stats freq_table cpufreq_userspace cpufreq_powersave dock container
sbs sbshc iptable_filter ip_tables x_tables sbp2 parport_pc lp parport
snd_hda_intel snd_usb_caiaq snd_hwdep snd_pcm_oss snd_mixer_oss arc4
snd_seq_oss snd_pcm ecb blkcipher snd_seq_midi snd_page_alloc joydev
snd_rawmidi snd_seq_midi_event snd_seq iwl3945 sdhci serio_raw mmc_core
iwlwifi_mac80211 video output cfg80211 battery led_class ac snd_timer
snd_seq_device wmi_acer button snd evdev dcdbas iTCO_wdt iTCO_vendor_support
intel_agp shpchp pci_hotplug pcspkr soundcore agpgart psmouse ext3 jbd
mbcache sg sr_mod cdrom sd_mod b44 ata_generic ssb mii ohci1394 ieee1394
ata_piix pata_acpi libata scsi_mod ehci_hcd uhci_hcd usbcore thermal
processor fan fuse
[ 1935.173964]
[ 1935.173967] Pid: 1421, comm: IRQ-18 Not tainted (2.6.24-19-rt #1)
[ 1935.173970] EIP: 0060:[<f8a5f6fd>] EFLAGS: 00010292 CPU: 1
[ 1935.173979] EIP is at snd_rawmidi_transmit_peek+0x1d/0x100 [snd_rawmidi]
[ 1935.173982] EAX: 00000000 EBX: f7106264 ECX: 0000003d EDX: f7106407
[ 1935.173985] ESI: ffffffea EDI: 00000000 EBP: f7106407 ESP: df85be38
[ 1935.173988] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
preempt:00000001
[ 1935.173991] Process IRQ-18 (pid: 1421, ti=df85a000 task=f7d45320
task.ti=df85a000)
[ 1935.173993] Stack: 0000003d 00000000 f7106264 00000000 00000000 df83fc00
f8b8cc09 00000000
[ 1935.174000] f7106264 f710630c 00000000 df83fc00 df83fc00 f710630c
f888c888 00000008
[ 1935.174007] df83fd08 00000000 f710630c f8870770 f728a0c0 f728a0c0
ffffff8d f721e180
[ 1935.174014] Call Trace:
[ 1935.174021] [<f8b8cc09>] snd_usb_caiaq_midi_send+0x29/0x80
[snd_usb_caiaq]
[ 1935.174034] [<f888c888>] usb_hcd_giveback_urb+0x48/0xc0 [usbcore]
[ 1935.174064] [<f8870770>] ehci_urb_done+0x70/0xb0 [ehci_hcd]
[ 1935.174075] [<f887153f>] qh_completions+0x24f/0x430 [ehci_hcd]
[ 1935.174087] [<f8870770>] ehci_urb_done+0x70/0xb0 [ehci_hcd]
[ 1935.174096] [<f887293e>] ehci_work+0x51e/0x810 [ehci_hcd]
[ 1935.174103] [<c010b1e3>] sched_clock+0x13/0x40
[ 1935.174116] [<c0129199>] dequeue_task_rt+0xb9/0x1c0
[ 1935.174129] [<f8875498>] ehci_irq+0x158/0x1c0 [ehci_hcd]
[ 1935.174142] [<f888cb7b>] usb_hcd_irq+0x2b/0x60 [usbcore]
[ 1935.174166] [<c016a9cc>] handle_IRQ_event+0x5c/0x100
[ 1935.174178] [<c016b00a>] thread_simple_irq+0x4a/0x90
[ 1935.174185] [<c016b959>] do_irqd+0x229/0x290
[ 1935.174194] [<c016b730>] do_irqd+0x0/0x290
[ 1935.174199] [<c0141fc2>] kthread+0x42/0x70
[ 1935.174203] [<c0141f80>] kthread+0x0/0x70
[ 1935.174209] [<c0105857>] kernel_thread_helper+0x7/0x10
[ 1935.174217] =======================
[ 1935.174219] Code: 24 10 83 c4 14 c3 bf ea ff ff ff eb e3 90 83 ec 18 89
74 24 0c be ea ff ff ff 89 6c 24 14 89 d5 89 5c 24 08 89 7c 24 10 89 0c 24
<8b> 58 44 8b 7b 04 85 ff 0f 84 8e 00 00 00 8d 43 20 31 f6 89 44
[ 1935.174256] EIP: [<f8a5f6fd>] snd_rawmidi_transmit_peek+0x1d/0x100
[snd_rawmidi] SS:ESP 0068:df85be38
[ 1935.174265] ---[ end trace 9090d02b798b5496 ]---
I already asked to the Rosegarden and JACK people, but they couldn't help
me: it seems to be a driver related problem, as I can happily use
Rosegarden if I run JACK with the internal Intel sound card.
The program versions I'm using are: jackd 0.116.1, rosegarden 1.7.2.
Here's some other outputs:
$ uname -a
Linux din6400 2.6.24-19-rt #1 SMP PREEMPT RT Thu Aug 21 02:08:03 UTC 2008
i686 GNU/Linux
$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.17.
Compiled on Jan 3 2009 for kernel 2.6.24-19-rt (SMP).
$ grep VERSION_STR /usr/include/alsa/version.h
#define SND_LIB_VERSION_STR "1.0.17a"
$ aplay -l
**** Lista di PLAYBACK dispositivi hardware ****
scheda 0: Intel [HDA Intel], dispositivo 0: STAC92xx Analog [STAC92xx
Analog]
Sottoperiferiche: 1/1
Sottoperiferica #0: subdevice #0
scheda 0: Intel [HDA Intel], dispositivo 1: STAC92xx Digital [STAC92xx
Digital]
Sottoperiferiche: 1/1
Sottoperiferica #0: subdevice #0
scheda 1: A1 [Audio Kontrol 1], dispositivo 0: Audio Kontrol 1 [Audio
Kontrol 1]
Sottoperiferiche: 1/2
Sottoperiferica #0: subdevice #0
Sottoperiferica #1: subdevice #1
$ cat /proc/interrupts
CPU0 CPU1
0: 5438968 0 IO-APIC-edge timer
1: 5123 0 IO-APIC-edge i8042
8: 7 0 IO-APIC-edge rtc
9: 2 0 IO-APIC-fasteoi acpi
12: 570309 0 IO-APIC-edge i8042
14: 16584 0 IO-APIC-edge libata
15: 7712 0 IO-APIC-edge libata
16: 312032 0 IO-APIC-fasteoi i915@pci:0000:00:02.0
17: 2 0 IO-APIC-fasteoi ohci1394
18: 269358 0 IO-APIC-fasteoi uhci_hcd:usb1, ehci_hcd:usb5
19: 3999 0 IO-APIC-fasteoi uhci_hcd:usb2, HDA Intel
20: 0 0 IO-APIC-fasteoi uhci_hcd:usb3
21: 0 0 IO-APIC-fasteoi uhci_hcd:usb4
22: 7638 0 IO-APIC-fasteoi eth0
23: 0 0 IO-APIC-fasteoi sdhci:slot0
221: 31667 0 PCI-MSI-edge iwl3945
NMI: 0 0 Non-maskable interrupts
LOC: 266694 2894868 Local timer interrupts
RES: 1091345 1871342 Rescheduling interrupts
CAL: 12287 11042 function call interrupts
TLB: 1395 1581 TLB shootdowns
TRM: 0 0 Thermal event interrupts
SPU: 0 0 Spurious interrupts
ERR: 0
MIS: 0
I do not include the jackd and rosegarden outputs becouse they are quite
long, but, if you think they are useful to understand what is going on, I
can send them too.
Any ideas?
Thank you
Marco
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-04 16:29 snd_usb_caiaq bug? Marco Santamaria
@ 2009-01-07 10:56 ` Takashi Iwai
2009-01-07 15:41 ` Marco Santamaria
0 siblings, 1 reply; 21+ messages in thread
From: Takashi Iwai @ 2009-01-07 10:56 UTC (permalink / raw)
To: Marco Santamaria; +Cc: alsa-devel, Daniel Mack
At Sun, 4 Jan 2009 17:29:47 +0100,
Marco Santamaria wrote:
>
> Hi,
>
> it's about one year that I'm using my Native Instruments Audio Kontrol 1
> (USB2 audio/MIDI interface) only with audio applications and it has been
> working well so far.
> Now I'm trying to use it with Rosegarden (MIDI) and, as soon as I start
> Rosegarden, JACK crashes, the process jackd becomes "uninterruptible" and
> with the command dmesg I find the following new lines
>
> [ 1935.173876] BUG: unable to handle kernel NULL pointer dereference at
> virtual address 00000044
> [ 1935.173885] printing eip: f8a5f6fd *pde = 00000000
> [ 1935.173891] Oops: 0000 [#1] PREEMPT SMP
> [ 1935.173896] Modules linked in: isofs udf ipv6 af_packet i915 drm rfcomm
> l2cap bluetooth ppdev acpi_cpufreq cpufreq_ondemand cpufreq_conservative
> cpufreq_stats freq_table cpufreq_userspace cpufreq_powersave dock container
> sbs sbshc iptable_filter ip_tables x_tables sbp2 parport_pc lp parport
> snd_hda_intel snd_usb_caiaq snd_hwdep snd_pcm_oss snd_mixer_oss arc4
> snd_seq_oss snd_pcm ecb blkcipher snd_seq_midi snd_page_alloc joydev
> snd_rawmidi snd_seq_midi_event snd_seq iwl3945 sdhci serio_raw mmc_core
> iwlwifi_mac80211 video output cfg80211 battery led_class ac snd_timer
> snd_seq_device wmi_acer button snd evdev dcdbas iTCO_wdt iTCO_vendor_support
> intel_agp shpchp pci_hotplug pcspkr soundcore agpgart psmouse ext3 jbd
> mbcache sg sr_mod cdrom sd_mod b44 ata_generic ssb mii ohci1394 ieee1394
> ata_piix pata_acpi libata scsi_mod ehci_hcd uhci_hcd usbcore thermal
> processor fan fuse
> [ 1935.173964]
> [ 1935.173967] Pid: 1421, comm: IRQ-18 Not tainted (2.6.24-19-rt #1)
> [ 1935.173970] EIP: 0060:[<f8a5f6fd>] EFLAGS: 00010292 CPU: 1
> [ 1935.173979] EIP is at snd_rawmidi_transmit_peek+0x1d/0x100 [snd_rawmidi]
> [ 1935.173982] EAX: 00000000 EBX: f7106264 ECX: 0000003d EDX: f7106407
> [ 1935.173985] ESI: ffffffea EDI: 00000000 EBP: f7106407 ESP: df85be38
> [ 1935.173988] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
> preempt:00000001
> [ 1935.173991] Process IRQ-18 (pid: 1421, ti=df85a000 task=f7d45320
> task.ti=df85a000)
> [ 1935.173993] Stack: 0000003d 00000000 f7106264 00000000 00000000 df83fc00
> f8b8cc09 00000000
> [ 1935.174000] f7106264 f710630c 00000000 df83fc00 df83fc00 f710630c
> f888c888 00000008
> [ 1935.174007] df83fd08 00000000 f710630c f8870770 f728a0c0 f728a0c0
> ffffff8d f721e180
> [ 1935.174014] Call Trace:
> [ 1935.174021] [<f8b8cc09>] snd_usb_caiaq_midi_send+0x29/0x80
> [snd_usb_caiaq]
> [ 1935.174034] [<f888c888>] usb_hcd_giveback_urb+0x48/0xc0 [usbcore]
> [ 1935.174064] [<f8870770>] ehci_urb_done+0x70/0xb0 [ehci_hcd]
> [ 1935.174075] [<f887153f>] qh_completions+0x24f/0x430 [ehci_hcd]
> [ 1935.174087] [<f8870770>] ehci_urb_done+0x70/0xb0 [ehci_hcd]
> [ 1935.174096] [<f887293e>] ehci_work+0x51e/0x810 [ehci_hcd]
> [ 1935.174103] [<c010b1e3>] sched_clock+0x13/0x40
> [ 1935.174116] [<c0129199>] dequeue_task_rt+0xb9/0x1c0
> [ 1935.174129] [<f8875498>] ehci_irq+0x158/0x1c0 [ehci_hcd]
> [ 1935.174142] [<f888cb7b>] usb_hcd_irq+0x2b/0x60 [usbcore]
> [ 1935.174166] [<c016a9cc>] handle_IRQ_event+0x5c/0x100
> [ 1935.174178] [<c016b00a>] thread_simple_irq+0x4a/0x90
> [ 1935.174185] [<c016b959>] do_irqd+0x229/0x290
> [ 1935.174194] [<c016b730>] do_irqd+0x0/0x290
> [ 1935.174199] [<c0141fc2>] kthread+0x42/0x70
> [ 1935.174203] [<c0141f80>] kthread+0x0/0x70
> [ 1935.174209] [<c0105857>] kernel_thread_helper+0x7/0x10
> [ 1935.174217] =======================
> [ 1935.174219] Code: 24 10 83 c4 14 c3 bf ea ff ff ff eb e3 90 83 ec 18 89
> 74 24 0c be ea ff ff ff 89 6c 24 14 89 d5 89 5c 24 08 89 7c 24 10 89 0c 24
> <8b> 58 44 8b 7b 04 85 ff 0f 84 8e 00 00 00 8d 43 20 31 f6 89 44
> [ 1935.174256] EIP: [<f8a5f6fd>] snd_rawmidi_transmit_peek+0x1d/0x100
> [snd_rawmidi] SS:ESP 0068:df85be38
> [ 1935.174265] ---[ end trace 9090d02b798b5496 ]---
>
> I already asked to the Rosegarden and JACK people, but they couldn't help
> me: it seems to be a driver related problem, as I can happily use
> Rosegarden if I run JACK with the internal Intel sound card.
How about the patch below?
thanks,
Takashi
---
diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
index 30b57f9..89a29f0 100644
--- a/sound/usb/caiaq/caiaq-midi.c
+++ b/sound/usb/caiaq/caiaq-midi.c
@@ -170,7 +170,6 @@ void snd_usb_caiaq_midi_output_done(struct urb* urb)
return;
snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
- dev->midi_out_substream = NULL;
snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
}
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-07 10:56 ` Takashi Iwai
@ 2009-01-07 15:41 ` Marco Santamaria
2009-01-07 16:35 ` Takashi Iwai
0 siblings, 1 reply; 21+ messages in thread
From: Marco Santamaria @ 2009-01-07 15:41 UTC (permalink / raw)
To: alsa-devel; +Cc: Takashi Iwai, Daniel Mack
I applied the patch (or I think so...). I just removed the line:
dev->midi_out_substream = NULL;
from the function snd_usb_caiaq_midi_output_done in the file caiaq-midi.c.
Then I recompiled the driver.
The main issue is sorted out: I can start and shut down jackd without big
problems.
But with dmesg I still have the following message:
ALSA
/home/marco/build/linux-2.6.24-19-rt/alsa-1.0.17/driver-patched/alsa-driver-1.0.17/acore/rawmidi.c:196:
rawmidi drain error (avail = 4095, buffer_size = 4096)
Not sure if it is safe to ignore it.
Marco
2009/1/7 Takashi Iwai <tiwai@suse.de>
> At Sun, 4 Jan 2009 17:29:47 +0100,
> Marco Santamaria wrote:
> >
> > Hi,
> >
> > it's about one year that I'm using my Native Instruments Audio Kontrol 1
> > (USB2 audio/MIDI interface) only with audio applications and it has been
> > working well so far.
> > Now I'm trying to use it with Rosegarden (MIDI) and, as soon as I start
> > Rosegarden, JACK crashes, the process jackd becomes "uninterruptible" and
> > with the command dmesg I find the following new lines
> >
> > [ 1935.173876] BUG: unable to handle kernel NULL pointer dereference at
> > virtual address 00000044
> > [ 1935.173885] printing eip: f8a5f6fd *pde = 00000000
> > [ 1935.173891] Oops: 0000 [#1] PREEMPT SMP
> > [ 1935.173896] Modules linked in: isofs udf ipv6 af_packet i915 drm
> rfcomm
> > l2cap bluetooth ppdev acpi_cpufreq cpufreq_ondemand cpufreq_conservative
> > cpufreq_stats freq_table cpufreq_userspace cpufreq_powersave dock
> container
> > sbs sbshc iptable_filter ip_tables x_tables sbp2 parport_pc lp parport
> > snd_hda_intel snd_usb_caiaq snd_hwdep snd_pcm_oss snd_mixer_oss arc4
> > snd_seq_oss snd_pcm ecb blkcipher snd_seq_midi snd_page_alloc joydev
> > snd_rawmidi snd_seq_midi_event snd_seq iwl3945 sdhci serio_raw mmc_core
> > iwlwifi_mac80211 video output cfg80211 battery led_class ac snd_timer
> > snd_seq_device wmi_acer button snd evdev dcdbas iTCO_wdt
> iTCO_vendor_support
> > intel_agp shpchp pci_hotplug pcspkr soundcore agpgart psmouse ext3 jbd
> > mbcache sg sr_mod cdrom sd_mod b44 ata_generic ssb mii ohci1394 ieee1394
> > ata_piix pata_acpi libata scsi_mod ehci_hcd uhci_hcd usbcore thermal
> > processor fan fuse
> > [ 1935.173964]
> > [ 1935.173967] Pid: 1421, comm: IRQ-18 Not tainted (2.6.24-19-rt #1)
> > [ 1935.173970] EIP: 0060:[<f8a5f6fd>] EFLAGS: 00010292 CPU: 1
> > [ 1935.173979] EIP is at snd_rawmidi_transmit_peek+0x1d/0x100
> [snd_rawmidi]
> > [ 1935.173982] EAX: 00000000 EBX: f7106264 ECX: 0000003d EDX: f7106407
> > [ 1935.173985] ESI: ffffffea EDI: 00000000 EBP: f7106407 ESP: df85be38
> > [ 1935.173988] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
> > preempt:00000001
> > [ 1935.173991] Process IRQ-18 (pid: 1421, ti=df85a000 task=f7d45320
> > task.ti=df85a000)
> > [ 1935.173993] Stack: 0000003d 00000000 f7106264 00000000 00000000
> df83fc00
> > f8b8cc09 00000000
> > [ 1935.174000] f7106264 f710630c 00000000 df83fc00 df83fc00
> f710630c
> > f888c888 00000008
> > [ 1935.174007] df83fd08 00000000 f710630c f8870770 f728a0c0
> f728a0c0
> > ffffff8d f721e180
> > [ 1935.174014] Call Trace:
> > [ 1935.174021] [<f8b8cc09>] snd_usb_caiaq_midi_send+0x29/0x80
> > [snd_usb_caiaq]
> > [ 1935.174034] [<f888c888>] usb_hcd_giveback_urb+0x48/0xc0 [usbcore]
> > [ 1935.174064] [<f8870770>] ehci_urb_done+0x70/0xb0 [ehci_hcd]
> > [ 1935.174075] [<f887153f>] qh_completions+0x24f/0x430 [ehci_hcd]
> > [ 1935.174087] [<f8870770>] ehci_urb_done+0x70/0xb0 [ehci_hcd]
> > [ 1935.174096] [<f887293e>] ehci_work+0x51e/0x810 [ehci_hcd]
> > [ 1935.174103] [<c010b1e3>] sched_clock+0x13/0x40
> > [ 1935.174116] [<c0129199>] dequeue_task_rt+0xb9/0x1c0
> > [ 1935.174129] [<f8875498>] ehci_irq+0x158/0x1c0 [ehci_hcd]
> > [ 1935.174142] [<f888cb7b>] usb_hcd_irq+0x2b/0x60 [usbcore]
> > [ 1935.174166] [<c016a9cc>] handle_IRQ_event+0x5c/0x100
> > [ 1935.174178] [<c016b00a>] thread_simple_irq+0x4a/0x90
> > [ 1935.174185] [<c016b959>] do_irqd+0x229/0x290
> > [ 1935.174194] [<c016b730>] do_irqd+0x0/0x290
> > [ 1935.174199] [<c0141fc2>] kthread+0x42/0x70
> > [ 1935.174203] [<c0141f80>] kthread+0x0/0x70
> > [ 1935.174209] [<c0105857>] kernel_thread_helper+0x7/0x10
> > [ 1935.174217] =======================
> > [ 1935.174219] Code: 24 10 83 c4 14 c3 bf ea ff ff ff eb e3 90 83 ec 18
> 89
> > 74 24 0c be ea ff ff ff 89 6c 24 14 89 d5 89 5c 24 08 89 7c 24 10 89 0c
> 24
> > <8b> 58 44 8b 7b 04 85 ff 0f 84 8e 00 00 00 8d 43 20 31 f6 89 44
> > [ 1935.174256] EIP: [<f8a5f6fd>] snd_rawmidi_transmit_peek+0x1d/0x100
> > [snd_rawmidi] SS:ESP 0068:df85be38
> > [ 1935.174265] ---[ end trace 9090d02b798b5496 ]---
> >
> > I already asked to the Rosegarden and JACK people, but they couldn't help
> > me: it seems to be a driver related problem, as I can happily use
> > Rosegarden if I run JACK with the internal Intel sound card.
>
> How about the patch below?
>
>
> thanks,
>
> Takashi
>
> ---
> diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
> index 30b57f9..89a29f0 100644
> --- a/sound/usb/caiaq/caiaq-midi.c
> +++ b/sound/usb/caiaq/caiaq-midi.c
> @@ -170,7 +170,6 @@ void snd_usb_caiaq_midi_output_done(struct urb* urb)
> return;
>
> snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
> - dev->midi_out_substream = NULL;
> snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
> }
>
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-07 15:41 ` Marco Santamaria
@ 2009-01-07 16:35 ` Takashi Iwai
2009-01-07 18:46 ` Marco Santamaria
0 siblings, 1 reply; 21+ messages in thread
From: Takashi Iwai @ 2009-01-07 16:35 UTC (permalink / raw)
To: Marco Santamaria; +Cc: alsa-devel, Daniel Mack
At Wed, 7 Jan 2009 16:41:21 +0100,
Marco Santamaria wrote:
>
> I applied the patch (or I think so...). I just removed the line:
>
> dev->midi_out_substream = NULL;
>
> from the function snd_usb_caiaq_midi_output_done in the file caiaq-midi.c.
> Then I recompiled the driver.
>
> The main issue is sorted out: I can start and shut down jackd without big
> problems.
>
> But with dmesg I still have the following message:
>
> ALSA /home/marco/build/linux-2.6.24-19-rt/alsa-1.0.17/driver-patched/
> alsa-driver-1.0.17/acore/rawmidi.c:196: rawmidi drain error (avail = 4095,
> buffer_size = 4096)
>
> Not sure if it is safe to ignore it.
Hmm, what about the patch below?
Takashi
---
diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
index 30b57f9..9557635 100644
--- a/sound/usb/caiaq/caiaq-midi.c
+++ b/sound/usb/caiaq/caiaq-midi.c
@@ -69,7 +69,8 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *dev,
dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
dev->midi_out_buf[1] = 0; /* port */
- len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3, EP1_BUFSIZE-3);
+ len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3,
+ EP1_BUFSIZE - 3);
if (len <= 0)
return;
@@ -87,16 +88,12 @@ static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream *subs
{
struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
- if (dev->midi_out_substream != NULL)
- return;
-
- if (!up) {
+ if (up) {
+ dev->midi_out_substream = substream;
+ snd_usb_caiaq_midi_send(dev, substream);
+ } else {
dev->midi_out_substream = NULL;
- return;
}
-
- dev->midi_out_substream = substream;
- snd_usb_caiaq_midi_send(dev, substream);
}
@@ -169,8 +166,6 @@ void snd_usb_caiaq_midi_output_done(struct urb* urb)
if (!dev->midi_out_substream)
return;
- snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
- dev->midi_out_substream = NULL;
snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
}
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-07 16:35 ` Takashi Iwai
@ 2009-01-07 18:46 ` Marco Santamaria
2009-01-07 20:06 ` Mysth-R
0 siblings, 1 reply; 21+ messages in thread
From: Marco Santamaria @ 2009-01-07 18:46 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Daniel Mack, Mysth-R
The "rawmidi drain error" went away.
Now if I start and shut down jackd nothing bad happens.
But when I launch Rosegarden there are several lines containing the
following new message:
[ 455.025168] ALSA
/home/marco/build/linux-2.6.24-19-rt/alsa-1.0.17/driver-patched/alsa-driver-1.0.17/usb/caiaq/../../alsa-kernel/usb/caiaq/caiaq-midi.c:84:
snd-usb-caiaq log: snd_usb_caiaq_midi_send(f76a5ac0): usb_submit_urb()
failed, -22
Furthermore the first time I rebooted my system, it freezed during the
startup procedure (loading hardware drivers), but it didn't happen again.
Marco
2009/1/7 Takashi Iwai <tiwai@suse.de>
> At Wed, 7 Jan 2009 16:41:21 +0100,
> Marco Santamaria wrote:
> >
> > I applied the patch (or I think so...). I just removed the line:
> >
> > dev->midi_out_substream = NULL;
> >
> > from the function snd_usb_caiaq_midi_output_done in the file
> caiaq-midi.c.
> > Then I recompiled the driver.
> >
> > The main issue is sorted out: I can start and shut down jackd without big
> > problems.
> >
> > But with dmesg I still have the following message:
> >
> > ALSA /home/marco/build/linux-2.6.24-19-rt/alsa-1.0.17/driver-patched/
> > alsa-driver-1.0.17/acore/rawmidi.c:196: rawmidi drain error (avail =
> 4095,
> > buffer_size = 4096)
> >
> > Not sure if it is safe to ignore it.
>
> Hmm, what about the patch below?
>
>
> Takashi
>
> ---
> diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
> index 30b57f9..9557635 100644
> --- a/sound/usb/caiaq/caiaq-midi.c
> +++ b/sound/usb/caiaq/caiaq-midi.c
> @@ -69,7 +69,8 @@ static void snd_usb_caiaq_midi_send(struct
> snd_usb_caiaqdev *dev,
>
> dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
> dev->midi_out_buf[1] = 0; /* port */
> - len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3,
> EP1_BUFSIZE-3);
> + len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3,
> + EP1_BUFSIZE - 3);
>
> if (len <= 0)
> return;
> @@ -87,16 +88,12 @@ static void snd_usb_caiaq_midi_output_trigger(struct
> snd_rawmidi_substream *subs
> {
> struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
>
> - if (dev->midi_out_substream != NULL)
> - return;
> -
> - if (!up) {
> + if (up) {
> + dev->midi_out_substream = substream;
> + snd_usb_caiaq_midi_send(dev, substream);
> + } else {
> dev->midi_out_substream = NULL;
> - return;
> }
> -
> - dev->midi_out_substream = substream;
> - snd_usb_caiaq_midi_send(dev, substream);
> }
>
>
> @@ -169,8 +166,6 @@ void snd_usb_caiaq_midi_output_done(struct urb* urb)
> if (!dev->midi_out_substream)
> return;
>
> - snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
> - dev->midi_out_substream = NULL;
> snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
> }
>
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-07 18:46 ` Marco Santamaria
@ 2009-01-07 20:06 ` Mysth-R
2009-01-07 22:52 ` Takashi Iwai
0 siblings, 1 reply; 21+ messages in thread
From: Mysth-R @ 2009-01-07 20:06 UTC (permalink / raw)
To: Marco Santamaria; +Cc: Takashi Iwai, alsa-devel, Daniel Mack
Hi Takashi,
I have almost the same problem as Marco. (that is why Marco forwarded me
this message).
Well, Now it seems to be almost perfect. Just to explain to you :
I had a problem with Pure data, each time I wanted to enable the alsa midi
(in pure data). Then I had some problem opening some of my patch, making pd
zombified and Jack output tons of "delay of 1666.000 usecs exceeds estimated
spare time of 1140.000; restart ..." until I stop it and run it again.
Now pd works perfectly. I made some others jackd settings, and the "xruns"
messages seems to gone away.
But like Marco I got this message in the output of dmesg :
[ 20.269196] Adding 530136k swap on /dev/sda3. Priority:-1 extents:1
across:530136k
[ 445.142031] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
usb_submit_urb() failed, -22
[ 445.393030] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
usb_submit_urb() failed, -22
[ 445.640986] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
usb_submit_urb() failed, -22
[ 445.892008] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
usb_submit_urb() failed, -22
[ 446.141982] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
usb_submit_urb() failed, -22
[ 446.392962] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
usb_submit_urb() failed, -22
[ 446.640967] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
usb_submit_urb() failed, -22
[ 446.891986] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
usb_submit_urb() failed, -22
[ 461.651199] CPU0: Temperature/speed normal
infos :
kernel : 2.6.26.8-rt12 (with the last patch solving alsa midi problems).
OS : Gentoo 64bits.
Sounds card : NI Audio Kontrol 1
alsa : 1.0.16 (with your patchs now.)
Thank you for your help and your great job. I can use pd now, my main
software to make music. So I am very happy :)
Just a thing, when I press the buttons on the top of the Audio Kontrol 1 I
got qbc (azerty keyboard). but When I move the jog, the system log out.
Did anyone find a way to change the assignation of these buttons ?
Kind regards,
Mysth-R
2009/1/7 Marco Santamaria <marco.santamaria@gmail.com>
> The "rawmidi drain error" went away.
> Now if I start and shut down jackd nothing bad happens.
> But when I launch Rosegarden there are several lines containing the
> following new message:
>
> [ 455.025168] ALSA
> /home/marco/build/linux-2.6.24-19-rt/alsa-1.0.17/driver-patched/alsa-driver-1.0.17/usb/caiaq/../../alsa-kernel/usb/caiaq/caiaq-midi.c:84:
> snd-usb-caiaq log: snd_usb_caiaq_midi_send(f76a5ac0): usb_submit_urb()
> failed, -22
>
> Furthermore the first time I rebooted my system, it freezed during the
> startup procedure (loading hardware drivers), but it didn't happen again.
>
>
> Marco
>
> 2009/1/7 Takashi Iwai <tiwai@suse.de>
>
>> At Wed, 7 Jan 2009 16:41:21 +0100,
>> Marco Santamaria wrote:
>> >
>> > I applied the patch (or I think so...). I just removed the line:
>> >
>> > dev->midi_out_substream = NULL;
>> >
>> > from the function snd_usb_caiaq_midi_output_done in the file
>> caiaq-midi.c.
>> > Then I recompiled the driver.
>> >
>> > The main issue is sorted out: I can start and shut down jackd without
>> big
>> > problems.
>> >
>> > But with dmesg I still have the following message:
>> >
>> > ALSA /home/marco/build/linux-2.6.24-19-rt/alsa-1.0.17/driver-patched/
>> > alsa-driver-1.0.17/acore/rawmidi.c:196: rawmidi drain error (avail =
>> 4095,
>> > buffer_size = 4096)
>> >
>> > Not sure if it is safe to ignore it.
>>
>> Hmm, what about the patch below?
>>
>>
>> Takashi
>>
>> ---
>> diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
>> index 30b57f9..9557635 100644
>> --- a/sound/usb/caiaq/caiaq-midi.c
>> +++ b/sound/usb/caiaq/caiaq-midi.c
>> @@ -69,7 +69,8 @@ static void snd_usb_caiaq_midi_send(struct
>> snd_usb_caiaqdev *dev,
>>
>> dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
>> dev->midi_out_buf[1] = 0; /* port */
>> - len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3,
>> EP1_BUFSIZE-3);
>> + len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3,
>> + EP1_BUFSIZE - 3);
>>
>> if (len <= 0)
>> return;
>> @@ -87,16 +88,12 @@ static void snd_usb_caiaq_midi_output_trigger(struct
>> snd_rawmidi_substream *subs
>> {
>> struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
>>
>> - if (dev->midi_out_substream != NULL)
>> - return;
>> -
>> - if (!up) {
>> + if (up) {
>> + dev->midi_out_substream = substream;
>> + snd_usb_caiaq_midi_send(dev, substream);
>> + } else {
>> dev->midi_out_substream = NULL;
>> - return;
>> }
>> -
>> - dev->midi_out_substream = substream;
>> - snd_usb_caiaq_midi_send(dev, substream);
>> }
>>
>>
>> @@ -169,8 +166,6 @@ void snd_usb_caiaq_midi_output_done(struct urb* urb)
>> if (!dev->midi_out_substream)
>> return;
>>
>> - snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
>> - dev->midi_out_substream = NULL;
>> snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
>> }
>>
>>
>
--
*
***************************************************************************************
* {^_^} Mysth-R {^_^}
* <= Aide Auditive =>
*
* http://myspace.com/mysthr
* http://myspace.com/aideauditive
* http://mysthr.free.fr/Joomla => Site dédié à l'audio sous
Fedora/PlanetCCRMA.
*
***************************************************************************************
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-07 20:06 ` Mysth-R
@ 2009-01-07 22:52 ` Takashi Iwai
2009-01-08 0:59 ` Marco Santamaria
0 siblings, 1 reply; 21+ messages in thread
From: Takashi Iwai @ 2009-01-07 22:52 UTC (permalink / raw)
To: Mysth-R; +Cc: Marco Santamaria, alsa-devel, Daniel Mack
At Wed, 7 Jan 2009 21:06:23 +0100,
Mysth-R wrote:
>
> Hi Takashi,
>
> I have almost the same problem as Marco. (that is why Marco forwarded me this
> message).
>
> Well, Now it seems to be almost perfect. Just to explain to you :
>
> I had a problem with Pure data, each time I wanted to enable the alsa midi (in
> pure data). Then I had some problem opening some of my patch, making pd
> zombified and Jack output tons of "delay of 1666.000 usecs exceeds estimated
> spare time of 1140.000; restart ..." until I stop it and run it again.
>
> Now pd works perfectly. I made some others jackd settings, and the "xruns"
> messages seems to gone away.
>
> But like Marco I got this message in the output of dmesg :
>
> [ 20.269196] Adding 530136k swap on /dev/sda3. Priority:-1 extents:1
> across:530136k
> [ 445.142031] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
> usb_submit_urb() failed, -22
> [ 445.393030] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
> usb_submit_urb() failed, -22
> [ 445.640986] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
> usb_submit_urb() failed, -22
> [ 445.892008] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
> usb_submit_urb() failed, -22
> [ 446.141982] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
> usb_submit_urb() failed, -22
> [ 446.392962] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
> usb_submit_urb() failed, -22
> [ 446.640967] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
> usb_submit_urb() failed, -22
> [ 446.891986] snd-usb-caiaq log: snd_usb_caiaq_midi_send(ffff81007f9380c0):
> usb_submit_urb() failed, -22
OK, what about this patch? Now it checks the URB existence before
submission.
thanks,
Takashi
---
diff --git a/sound/usb/caiaq/caiaq-device.h b/sound/usb/caiaq/caiaq-device.h
index f9fbdba..ab56e73 100644
--- a/sound/usb/caiaq/caiaq-device.h
+++ b/sound/usb/caiaq/caiaq-device.h
@@ -75,6 +75,7 @@ struct snd_usb_caiaqdev {
wait_queue_head_t ep1_wait_queue;
wait_queue_head_t prepare_wait_queue;
int spec_received, audio_parm_answer;
+ int midi_out_active;
char vendor_name[CAIAQ_USB_STR_LEN];
char product_name[CAIAQ_USB_STR_LEN];
diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
index 30b57f9..6b76f7f 100644
--- a/sound/usb/caiaq/caiaq-midi.c
+++ b/sound/usb/caiaq/caiaq-midi.c
@@ -69,7 +69,8 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *dev,
dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
dev->midi_out_buf[1] = 0; /* port */
- len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3, EP1_BUFSIZE-3);
+ len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3,
+ EP1_BUFSIZE - 3);
if (len <= 0)
return;
@@ -81,22 +82,21 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *dev,
if (ret < 0)
log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed, %d\n",
substream, ret);
+ else
+ dev->midi_out_active = 1;
}
static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
{
struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
- if (dev->midi_out_substream != NULL)
- return;
-
- if (!up) {
+ if (up) {
+ dev->midi_out_substream = substream;
+ if (!dev->midi_out_active)
+ snd_usb_caiaq_midi_send(dev, substream);
+ } else {
dev->midi_out_substream = NULL;
- return;
}
-
- dev->midi_out_substream = substream;
- snd_usb_caiaq_midi_send(dev, substream);
}
@@ -163,14 +163,13 @@ void snd_usb_caiaq_midi_output_done(struct urb* urb)
struct snd_usb_caiaqdev *dev = urb->context;
char *buf = urb->transfer_buffer;
+ dev->midi_out_active = 0;
if (urb->status != 0)
return;
if (!dev->midi_out_substream)
return;
- snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
- dev->midi_out_substream = NULL;
snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
}
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-07 22:52 ` Takashi Iwai
@ 2009-01-08 0:59 ` Marco Santamaria
2009-01-08 1:34 ` Marco Santamaria
0 siblings, 1 reply; 21+ messages in thread
From: Marco Santamaria @ 2009-01-08 0:59 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Daniel Mack, Mysth-R
No more errors in dmesg this time. Tomorrow I will apply the patch to the
latest stable version of the alsa-driver (1.0.18).
Please let me know if there are more tests I can do with JACK, Rosegarden,
Ardour or something else.
Do you think that this patch will go in the next version of the alsa-driver?
Thank you very much for your help,
Marco
2009/1/7 Takashi Iwai <tiwai@suse.de>
> At Wed, 7 Jan 2009 21:06:23 +0100,
> Mysth-R wrote:
> >
> > Hi Takashi,
> >
> > I have almost the same problem as Marco. (that is why Marco forwarded me
> this
> > message).
> >
> > Well, Now it seems to be almost perfect. Just to explain to you :
> >
> > I had a problem with Pure data, each time I wanted to enable the alsa
> midi (in
> > pure data). Then I had some problem opening some of my patch, making pd
> > zombified and Jack output tons of "delay of 1666.000 usecs exceeds
> estimated
> > spare time of 1140.000; restart ..." until I stop it and run it again.
> >
> > Now pd works perfectly. I made some others jackd settings, and the
> "xruns"
> > messages seems to gone away.
> >
> > But like Marco I got this message in the output of dmesg :
> >
> > [ 20.269196] Adding 530136k swap on /dev/sda3. Priority:-1 extents:1
> > across:530136k
> > [ 445.142031] snd-usb-caiaq log:
> snd_usb_caiaq_midi_send(ffff81007f9380c0):
> > usb_submit_urb() failed, -22
> > [ 445.393030] snd-usb-caiaq log:
> snd_usb_caiaq_midi_send(ffff81007f9380c0):
> > usb_submit_urb() failed, -22
> > [ 445.640986] snd-usb-caiaq log:
> snd_usb_caiaq_midi_send(ffff81007f9380c0):
> > usb_submit_urb() failed, -22
> > [ 445.892008] snd-usb-caiaq log:
> snd_usb_caiaq_midi_send(ffff81007f9380c0):
> > usb_submit_urb() failed, -22
> > [ 446.141982] snd-usb-caiaq log:
> snd_usb_caiaq_midi_send(ffff81007f9380c0):
> > usb_submit_urb() failed, -22
> > [ 446.392962] snd-usb-caiaq log:
> snd_usb_caiaq_midi_send(ffff81007f9380c0):
> > usb_submit_urb() failed, -22
> > [ 446.640967] snd-usb-caiaq log:
> snd_usb_caiaq_midi_send(ffff81007f9380c0):
> > usb_submit_urb() failed, -22
> > [ 446.891986] snd-usb-caiaq log:
> snd_usb_caiaq_midi_send(ffff81007f9380c0):
> > usb_submit_urb() failed, -22
>
> OK, what about this patch? Now it checks the URB existence before
> submission.
>
>
> thanks,
>
> Takashi
>
> ---
> diff --git a/sound/usb/caiaq/caiaq-device.h
> b/sound/usb/caiaq/caiaq-device.h
> index f9fbdba..ab56e73 100644
> --- a/sound/usb/caiaq/caiaq-device.h
> +++ b/sound/usb/caiaq/caiaq-device.h
> @@ -75,6 +75,7 @@ struct snd_usb_caiaqdev {
> wait_queue_head_t ep1_wait_queue;
> wait_queue_head_t prepare_wait_queue;
> int spec_received, audio_parm_answer;
> + int midi_out_active;
>
> char vendor_name[CAIAQ_USB_STR_LEN];
> char product_name[CAIAQ_USB_STR_LEN];
> diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
> index 30b57f9..6b76f7f 100644
> --- a/sound/usb/caiaq/caiaq-midi.c
> +++ b/sound/usb/caiaq/caiaq-midi.c
> @@ -69,7 +69,8 @@ static void snd_usb_caiaq_midi_send(struct
> snd_usb_caiaqdev *dev,
>
> dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
> dev->midi_out_buf[1] = 0; /* port */
> - len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3,
> EP1_BUFSIZE-3);
> + len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3,
> + EP1_BUFSIZE - 3);
>
> if (len <= 0)
> return;
> @@ -81,22 +82,21 @@ static void snd_usb_caiaq_midi_send(struct
> snd_usb_caiaqdev *dev,
> if (ret < 0)
> log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,
> %d\n",
> substream, ret);
> + else
> + dev->midi_out_active = 1;
> }
>
> static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream
> *substream, int up)
> {
> struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
>
> - if (dev->midi_out_substream != NULL)
> - return;
> -
> - if (!up) {
> + if (up) {
> + dev->midi_out_substream = substream;
> + if (!dev->midi_out_active)
> + snd_usb_caiaq_midi_send(dev, substream);
> + } else {
> dev->midi_out_substream = NULL;
> - return;
> }
> -
> - dev->midi_out_substream = substream;
> - snd_usb_caiaq_midi_send(dev, substream);
> }
>
>
> @@ -163,14 +163,13 @@ void snd_usb_caiaq_midi_output_done(struct urb* urb)
> struct snd_usb_caiaqdev *dev = urb->context;
> char *buf = urb->transfer_buffer;
>
> + dev->midi_out_active = 0;
> if (urb->status != 0)
> return;
>
> if (!dev->midi_out_substream)
> return;
>
> - snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
> - dev->midi_out_substream = NULL;
> snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
> }
>
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-08 0:59 ` Marco Santamaria
@ 2009-01-08 1:34 ` Marco Santamaria
2009-01-08 11:20 ` Takashi Iwai
0 siblings, 1 reply; 21+ messages in thread
From: Marco Santamaria @ 2009-01-08 1:34 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Daniel Mack, Mysth-R
Unfortunately I have to correct my previous message.
After a load test with jack + qsynth + rosegarden (sample rate=88200,
frames/period=256, periods/buffer=3), using a 16 tracks midi file and a
29MB sound font, the following message appeared:
[ 1098.445807] ALSA
/home/marco/build/linux-2.6.24-19-rt/alsa-1.0.17/driver-patched/alsa-driver-1.0.17/usb/caiaq/../../alsa-kernel/usb/caiaq/caiaq-midi.c:84:
snd-usb-caiaq log: snd_usb_caiaq_midi_send(f64c66c0): usb_submit_urb()
failed, -22
Cheers,
Marco
2009/1/8 Marco Santamaria <marco.santamaria@gmail.com>
> No more errors in dmesg this time. Tomorrow I will apply the patch to the
> latest stable version of the alsa-driver (1.0.18).
>
> Please let me know if there are more tests I can do with JACK, Rosegarden,
> Ardour or something else.
>
> Do you think that this patch will go in the next version of the
> alsa-driver?
>
> Thank you very much for your help,
> Marco
>
>
> 2009/1/7 Takashi Iwai <tiwai@suse.de>
>
>> At Wed, 7 Jan 2009 21:06:23 +0100,
>>
>> Mysth-R wrote:
>> >
>> > Hi Takashi,
>> >
>> > I have almost the same problem as Marco. (that is why Marco forwarded me
>> this
>> > message).
>> >
>> > Well, Now it seems to be almost perfect. Just to explain to you :
>> >
>> > I had a problem with Pure data, each time I wanted to enable the alsa
>> midi (in
>> > pure data). Then I had some problem opening some of my patch, making pd
>> > zombified and Jack output tons of "delay of 1666.000 usecs exceeds
>> estimated
>> > spare time of 1140.000; restart ..." until I stop it and run it again.
>> >
>> > Now pd works perfectly. I made some others jackd settings, and the
>> "xruns"
>> > messages seems to gone away.
>> >
>> > But like Marco I got this message in the output of dmesg :
>> >
>> > [ 20.269196] Adding 530136k swap on /dev/sda3. Priority:-1 extents:1
>> > across:530136k
>> > [ 445.142031] snd-usb-caiaq log:
>> snd_usb_caiaq_midi_send(ffff81007f9380c0):
>> > usb_submit_urb() failed, -22
>> > [ 445.393030] snd-usb-caiaq log:
>> snd_usb_caiaq_midi_send(ffff81007f9380c0):
>> > usb_submit_urb() failed, -22
>> > [ 445.640986] snd-usb-caiaq log:
>> snd_usb_caiaq_midi_send(ffff81007f9380c0):
>> > usb_submit_urb() failed, -22
>> > [ 445.892008] snd-usb-caiaq log:
>> snd_usb_caiaq_midi_send(ffff81007f9380c0):
>> > usb_submit_urb() failed, -22
>> > [ 446.141982] snd-usb-caiaq log:
>> snd_usb_caiaq_midi_send(ffff81007f9380c0):
>> > usb_submit_urb() failed, -22
>> > [ 446.392962] snd-usb-caiaq log:
>> snd_usb_caiaq_midi_send(ffff81007f9380c0):
>> > usb_submit_urb() failed, -22
>> > [ 446.640967] snd-usb-caiaq log:
>> snd_usb_caiaq_midi_send(ffff81007f9380c0):
>> > usb_submit_urb() failed, -22
>> > [ 446.891986] snd-usb-caiaq log:
>> snd_usb_caiaq_midi_send(ffff81007f9380c0):
>> > usb_submit_urb() failed, -22
>>
>> OK, what about this patch? Now it checks the URB existence before
>> submission.
>>
>>
>> thanks,
>>
>> Takashi
>>
>> ---
>> diff --git a/sound/usb/caiaq/caiaq-device.h
>> b/sound/usb/caiaq/caiaq-device.h
>> index f9fbdba..ab56e73 100644
>> --- a/sound/usb/caiaq/caiaq-device.h
>> +++ b/sound/usb/caiaq/caiaq-device.h
>> @@ -75,6 +75,7 @@ struct snd_usb_caiaqdev {
>> wait_queue_head_t ep1_wait_queue;
>> wait_queue_head_t prepare_wait_queue;
>> int spec_received, audio_parm_answer;
>> + int midi_out_active;
>>
>> char vendor_name[CAIAQ_USB_STR_LEN];
>> char product_name[CAIAQ_USB_STR_LEN];
>> diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
>> index 30b57f9..6b76f7f 100644
>> --- a/sound/usb/caiaq/caiaq-midi.c
>> +++ b/sound/usb/caiaq/caiaq-midi.c
>> @@ -69,7 +69,8 @@ static void snd_usb_caiaq_midi_send(struct
>> snd_usb_caiaqdev *dev,
>>
>> dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
>> dev->midi_out_buf[1] = 0; /* port */
>> - len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3,
>> EP1_BUFSIZE-3);
>> + len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3,
>> + EP1_BUFSIZE - 3);
>>
>> if (len <= 0)
>> return;
>> @@ -81,22 +82,21 @@ static void snd_usb_caiaq_midi_send(struct
>> snd_usb_caiaqdev *dev,
>> if (ret < 0)
>> log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,
>> %d\n",
>> substream, ret);
>> + else
>> + dev->midi_out_active = 1;
>> }
>>
>> static void snd_usb_caiaq_midi_output_trigger(struct
>> snd_rawmidi_substream *substream, int up)
>> {
>> struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
>>
>> - if (dev->midi_out_substream != NULL)
>> - return;
>> -
>> - if (!up) {
>> + if (up) {
>> + dev->midi_out_substream = substream;
>> + if (!dev->midi_out_active)
>> + snd_usb_caiaq_midi_send(dev, substream);
>> + } else {
>> dev->midi_out_substream = NULL;
>> - return;
>> }
>> -
>> - dev->midi_out_substream = substream;
>> - snd_usb_caiaq_midi_send(dev, substream);
>> }
>>
>>
>> @@ -163,14 +163,13 @@ void snd_usb_caiaq_midi_output_done(struct urb* urb)
>> struct snd_usb_caiaqdev *dev = urb->context;
>> char *buf = urb->transfer_buffer;
>>
>> + dev->midi_out_active = 0;
>> if (urb->status != 0)
>> return;
>>
>> if (!dev->midi_out_substream)
>> return;
>>
>> - snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
>> - dev->midi_out_substream = NULL;
>> snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
>> }
>>
>>
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-08 1:34 ` Marco Santamaria
@ 2009-01-08 11:20 ` Takashi Iwai
2009-01-08 14:26 ` Mysth-R
0 siblings, 1 reply; 21+ messages in thread
From: Takashi Iwai @ 2009-01-08 11:20 UTC (permalink / raw)
To: Marco Santamaria; +Cc: alsa-devel, Daniel Mack, Mysth-R
At Thu, 8 Jan 2009 02:34:46 +0100,
Marco Santamaria wrote:
>
> Unfortunately I have to correct my previous message.
>
> After a load test with jack + qsynth + rosegarden (sample rate=88200, frames/
> period=256, periods/buffer=3), using a 16 tracks midi file and a 29MB sound
> font, the following message appeared:
>
> [ 1098.445807] ALSA /home/marco/build/linux-2.6.24-19-rt/alsa-1.0.17/
> driver-patched/alsa-driver-1.0.17/usb/caiaq/../../alsa-kernel/usb/caiaq/
> caiaq-midi.c:84: snd-usb-caiaq log: snd_usb_caiaq_midi_send(f64c66c0):
> usb_submit_urb() failed, -22
Hmm... what about this version?
Takashi
---
diff --git a/sound/usb/caiaq/caiaq-device.h b/sound/usb/caiaq/caiaq-device.h
index f9fbdba..ab56e73 100644
--- a/sound/usb/caiaq/caiaq-device.h
+++ b/sound/usb/caiaq/caiaq-device.h
@@ -75,6 +75,7 @@ struct snd_usb_caiaqdev {
wait_queue_head_t ep1_wait_queue;
wait_queue_head_t prepare_wait_queue;
int spec_received, audio_parm_answer;
+ int midi_out_active;
char vendor_name[CAIAQ_USB_STR_LEN];
char product_name[CAIAQ_USB_STR_LEN];
diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
index 30b57f9..18bbe38 100644
--- a/sound/usb/caiaq/caiaq-midi.c
+++ b/sound/usb/caiaq/caiaq-midi.c
@@ -59,6 +59,11 @@ static int snd_usb_caiaq_midi_output_open(struct snd_rawmidi_substream *substrea
static int snd_usb_caiaq_midi_output_close(struct snd_rawmidi_substream *substream)
{
+ struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
+ if (dev->midi_out_active) {
+ usb_kill_urb(&dev->midi_out_urb);
+ dev->midi_out_active = 0;
+ }
return 0;
}
@@ -69,7 +74,8 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *dev,
dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
dev->midi_out_buf[1] = 0; /* port */
- len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3, EP1_BUFSIZE-3);
+ len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3,
+ EP1_BUFSIZE - 3);
if (len <= 0)
return;
@@ -79,24 +85,24 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *dev,
ret = usb_submit_urb(&dev->midi_out_urb, GFP_ATOMIC);
if (ret < 0)
- log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed, %d\n",
- substream, ret);
+ log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,"
+ "ret=%d, len=%d\n",
+ substream, ret, len);
+ else
+ dev->midi_out_active = 1;
}
static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
{
struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
- if (dev->midi_out_substream != NULL)
- return;
-
- if (!up) {
+ if (up) {
+ dev->midi_out_substream = substream;
+ if (!dev->midi_out_active)
+ snd_usb_caiaq_midi_send(dev, substream);
+ } else {
dev->midi_out_substream = NULL;
- return;
}
-
- dev->midi_out_substream = substream;
- snd_usb_caiaq_midi_send(dev, substream);
}
@@ -163,14 +169,13 @@ void snd_usb_caiaq_midi_output_done(struct urb* urb)
struct snd_usb_caiaqdev *dev = urb->context;
char *buf = urb->transfer_buffer;
+ dev->midi_out_active = 0;
if (urb->status != 0)
return;
if (!dev->midi_out_substream)
return;
- snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
- dev->midi_out_substream = NULL;
snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
}
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-08 11:20 ` Takashi Iwai
@ 2009-01-08 14:26 ` Mysth-R
2009-01-08 14:37 ` Takashi Iwai
0 siblings, 1 reply; 21+ messages in thread
From: Mysth-R @ 2009-01-08 14:26 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Marco Santamaria, alsa-devel, Daniel Mack
Hi,
I tried the last patch, and I think we got it. I made some few tests, and
every thing is Ok for me now. No more crash, no more messages in dmesg.
I just had a warning during compilation, but I think this is not really
important :
sound/usb/caiaq/caiaq-midi.c: In function
\u2018snd_usb_caiaq_midi_output_done\u2019:
sound/usb/caiaq/caiaq-midi.c:170: attention : unused variable
\u2018buf\u2019
Perhaps this is not the same line (170) as you but, in my file, it concerns
the last function.
Thank you very much for your help !
Cheers,
Mysth-R
2009/1/8 Takashi Iwai <tiwai@suse.de>
> At Thu, 8 Jan 2009 02:34:46 +0100,
> Marco Santamaria wrote:
> >
> > Unfortunately I have to correct my previous message.
> >
> > After a load test with jack + qsynth + rosegarden (sample rate=88200,
> frames/
> > period=256, periods/buffer=3), using a 16 tracks midi file and a 29MB
> sound
> > font, the following message appeared:
> >
> > [ 1098.445807] ALSA /home/marco/build/linux-2.6.24-19-rt/alsa-1.0.17/
> > driver-patched/alsa-driver-1.0.17/usb/caiaq/../../alsa-kernel/usb/caiaq/
> > caiaq-midi.c:84: snd-usb-caiaq log: snd_usb_caiaq_midi_send(f64c66c0):
> > usb_submit_urb() failed, -22
>
> Hmm... what about this version?
>
>
> Takashi
>
> ---
> diff --git a/sound/usb/caiaq/caiaq-device.h
> b/sound/usb/caiaq/caiaq-device.h
> index f9fbdba..ab56e73 100644
> --- a/sound/usb/caiaq/caiaq-device.h
> +++ b/sound/usb/caiaq/caiaq-device.h
> @@ -75,6 +75,7 @@ struct snd_usb_caiaqdev {
> wait_queue_head_t ep1_wait_queue;
> wait_queue_head_t prepare_wait_queue;
> int spec_received, audio_parm_answer;
> + int midi_out_active;
>
> char vendor_name[CAIAQ_USB_STR_LEN];
> char product_name[CAIAQ_USB_STR_LEN];
> diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
> index 30b57f9..18bbe38 100644
> --- a/sound/usb/caiaq/caiaq-midi.c
> +++ b/sound/usb/caiaq/caiaq-midi.c
> @@ -59,6 +59,11 @@ static int snd_usb_caiaq_midi_output_open(struct
> snd_rawmidi_substream *substrea
>
> static int snd_usb_caiaq_midi_output_close(struct snd_rawmidi_substream
> *substream)
> {
> + struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
> + if (dev->midi_out_active) {
> + usb_kill_urb(&dev->midi_out_urb);
> + dev->midi_out_active = 0;
> + }
> return 0;
> }
>
> @@ -69,7 +74,8 @@ static void snd_usb_caiaq_midi_send(struct
> snd_usb_caiaqdev *dev,
>
> dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
> dev->midi_out_buf[1] = 0; /* port */
> - len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3,
> EP1_BUFSIZE-3);
> + len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3,
> + EP1_BUFSIZE - 3);
>
> if (len <= 0)
> return;
> @@ -79,24 +85,24 @@ static void snd_usb_caiaq_midi_send(struct
> snd_usb_caiaqdev *dev,
>
> ret = usb_submit_urb(&dev->midi_out_urb, GFP_ATOMIC);
> if (ret < 0)
> - log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,
> %d\n",
> - substream, ret);
> + log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,"
> + "ret=%d, len=%d\n",
> + substream, ret, len);
> + else
> + dev->midi_out_active = 1;
> }
>
> static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream
> *substream, int up)
> {
> struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
>
> - if (dev->midi_out_substream != NULL)
> - return;
> -
> - if (!up) {
> + if (up) {
> + dev->midi_out_substream = substream;
> + if (!dev->midi_out_active)
> + snd_usb_caiaq_midi_send(dev, substream);
> + } else {
> dev->midi_out_substream = NULL;
> - return;
> }
> -
> - dev->midi_out_substream = substream;
> - snd_usb_caiaq_midi_send(dev, substream);
> }
>
>
> @@ -163,14 +169,13 @@ void snd_usb_caiaq_midi_output_done(struct urb* urb)
> struct snd_usb_caiaqdev *dev = urb->context;
> char *buf = urb->transfer_buffer;
>
> + dev->midi_out_active = 0;
> if (urb->status != 0)
> return;
>
> if (!dev->midi_out_substream)
> return;
>
> - snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
> - dev->midi_out_substream = NULL;
> snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
> }
>
>
--
*
***************************************************************************************
* {^_^} Mysth-R {^_^}
* <= Aide Auditive =>
*
* http://myspace.com/mysthr
* http://myspace.com/aideauditive
* http://mysthr.free.fr/Joomla => Site dédié à l'audio sous
Fedora/PlanetCCRMA.
*
***************************************************************************************
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-08 14:26 ` Mysth-R
@ 2009-01-08 14:37 ` Takashi Iwai
2009-01-08 14:43 ` Mysth-R
` (2 more replies)
0 siblings, 3 replies; 21+ messages in thread
From: Takashi Iwai @ 2009-01-08 14:37 UTC (permalink / raw)
To: Mysth-R; +Cc: Marco Santamaria, alsa-devel, Daniel Mack
At Thu, 8 Jan 2009 15:26:39 +0100,
Mysth-R wrote:
>
> Hi,
>
> I tried the last patch, and I think we got it. I made some few tests, and
> every thing is Ok for me now. No more crash, no more messages in dmesg.
> I just had a warning during compilation, but I think this is not really
> important :
>
> sound/usb/caiaq/caiaq-midi.c: In function \u2018snd_usb_caiaq_midi_output_done
> \u2019:
> sound/usb/caiaq/caiaq-midi.c:170: attention : unused variable \u2018buf\u2019
>
> Perhaps this is not the same line (170) as you but, in my file, it concerns
> the last function.
OK, it's simple to fix.
The below is the latest version I committed now to sound git tree.
It'll be pushed to 2.6.29 (and stable kernels) later.
Please let me know if you still encounter relevant problems.
thanks,
Takashi
---
diff --git a/sound/usb/caiaq/caiaq-device.h b/sound/usb/caiaq/caiaq-device.h
index f9fbdba..ab56e73 100644
--- a/sound/usb/caiaq/caiaq-device.h
+++ b/sound/usb/caiaq/caiaq-device.h
@@ -75,6 +75,7 @@ struct snd_usb_caiaqdev {
wait_queue_head_t ep1_wait_queue;
wait_queue_head_t prepare_wait_queue;
int spec_received, audio_parm_answer;
+ int midi_out_active;
char vendor_name[CAIAQ_USB_STR_LEN];
char product_name[CAIAQ_USB_STR_LEN];
diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
index 30b57f9..f19fd36 100644
--- a/sound/usb/caiaq/caiaq-midi.c
+++ b/sound/usb/caiaq/caiaq-midi.c
@@ -59,6 +59,11 @@ static int snd_usb_caiaq_midi_output_open(struct snd_rawmidi_substream *substrea
static int snd_usb_caiaq_midi_output_close(struct snd_rawmidi_substream *substream)
{
+ struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
+ if (dev->midi_out_active) {
+ usb_kill_urb(&dev->midi_out_urb);
+ dev->midi_out_active = 0;
+ }
return 0;
}
@@ -69,7 +74,8 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *dev,
dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
dev->midi_out_buf[1] = 0; /* port */
- len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3, EP1_BUFSIZE-3);
+ len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3,
+ EP1_BUFSIZE - 3);
if (len <= 0)
return;
@@ -79,24 +85,24 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *dev,
ret = usb_submit_urb(&dev->midi_out_urb, GFP_ATOMIC);
if (ret < 0)
- log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed, %d\n",
- substream, ret);
+ log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,"
+ "ret=%d, len=%d\n",
+ substream, ret, len);
+ else
+ dev->midi_out_active = 1;
}
static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
{
struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
- if (dev->midi_out_substream != NULL)
- return;
-
- if (!up) {
+ if (up) {
+ dev->midi_out_substream = substream;
+ if (!dev->midi_out_active)
+ snd_usb_caiaq_midi_send(dev, substream);
+ } else {
dev->midi_out_substream = NULL;
- return;
}
-
- dev->midi_out_substream = substream;
- snd_usb_caiaq_midi_send(dev, substream);
}
@@ -161,16 +167,14 @@ int snd_usb_caiaq_midi_init(struct snd_usb_caiaqdev *device)
void snd_usb_caiaq_midi_output_done(struct urb* urb)
{
struct snd_usb_caiaqdev *dev = urb->context;
- char *buf = urb->transfer_buffer;
+ dev->midi_out_active = 0;
if (urb->status != 0)
return;
if (!dev->midi_out_substream)
return;
- snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
- dev->midi_out_substream = NULL;
snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
}
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-08 14:37 ` Takashi Iwai
@ 2009-01-08 14:43 ` Mysth-R
2009-01-08 14:46 ` Takashi Iwai
2009-01-08 22:14 ` Daniel Mack
2009-01-08 20:06 ` Marco Santamaria
2009-01-08 22:11 ` Daniel Mack
2 siblings, 2 replies; 21+ messages in thread
From: Mysth-R @ 2009-01-08 14:43 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Marco Santamaria, alsa-devel, Daniel Mack
> OK, it's simple to fix.
> The below is the latest version I committed now to sound git tree.
> It'll be pushed to 2.6.29 (and stable kernels) later.
>
Ok cool !
> Please let me know if you still encounter relevant problems.
>
> No problem... Thank you again for your help.
By the way is there any plan to make buttons and lights to work on the Audio
Kontrol 1 ? It could be a really cool feature.
Cheers,
Mysth-R
---
diff --git a/sound/usb/caiaq/caiaq-device.h b/sound/usb/caiaq/caiaq-device.h
index f9fbdba..ab56e73 100644
--- a/sound/usb/caiaq/caiaq-device.h
+++ b/sound/usb/caiaq/caiaq-device.h
@@ -75,6 +75,7 @@ struct snd_usb_caiaqdev {
wait_queue_head_t ep1_wait_queue;
wait_queue_head_t prepare_wait_queue;
int spec_received, audio_parm_answer;
+ int midi_out_active;
char vendor_name[CAIAQ_USB_STR_LEN];
char product_name[CAIAQ_USB_STR_LEN];
diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
> index 30b57f9..f19fd36 100644
> --- a/sound/usb/caiaq/caiaq-midi.c
> +++ b/sound/usb/caiaq/caiaq-midi.c
> @@ -59,6 +59,11 @@ static int snd_usb_caiaq_midi_output_open(struct
> snd_rawmidi_substream *substrea
>
> static int snd_usb_caiaq_midi_output_close(struct snd_rawmidi_substream
> *substream)
> {
> + struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
> + if (dev->midi_out_active) {
> + usb_kill_urb(&dev->midi_out_urb);
> + dev->midi_out_active = 0;
> + }
> return 0;
> }
>
> @@ -69,7 +74,8 @@ static void snd_usb_caiaq_midi_send(struct
> snd_usb_caiaqdev *dev,
>
> dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
> dev->midi_out_buf[1] = 0; /* port */
> - len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3,
> EP1_BUFSIZE-3);
> + len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3,
> + EP1_BUFSIZE - 3);
>
> if (len <= 0)
> return;
> @@ -79,24 +85,24 @@ static void snd_usb_caiaq_midi_send(struct
> snd_usb_caiaqdev *dev,
>
> ret = usb_submit_urb(&dev->midi_out_urb, GFP_ATOMIC);
> if (ret < 0)
> - log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,
> %d\n",
> - substream, ret);
> + log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,"
> + "ret=%d, len=%d\n",
> + substream, ret, len);
> + else
> + dev->midi_out_active = 1;
> }
>
> static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream
> *substream, int up)
> {
> struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
>
> - if (dev->midi_out_substream != NULL)
> - return;
> -
> - if (!up) {
> + if (up) {
> + dev->midi_out_substream = substream;
> + if (!dev->midi_out_active)
> + snd_usb_caiaq_midi_send(dev, substream);
> + } else {
> dev->midi_out_substream = NULL;
> - return;
> }
> -
> - dev->midi_out_substream = substream;
> - snd_usb_caiaq_midi_send(dev, substream);
> }
>
>
> @@ -161,16 +167,14 @@ int snd_usb_caiaq_midi_init(struct snd_usb_caiaqdev
> *device)
> void snd_usb_caiaq_midi_output_done(struct urb* urb)
> {
> struct snd_usb_caiaqdev *dev = urb->context;
> - char *buf = urb->transfer_buffer;
>
> + dev->midi_out_active = 0;
> if (urb->status != 0)
> return;
>
> if (!dev->midi_out_substream)
> return;
>
> - snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
> - dev->midi_out_substream = NULL;
> snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
> }
>
>
--
*
***************************************************************************************
* {^_^} Mysth-R {^_^}
* <= Aide Auditive =>
*
* http://myspace.com/mysthr
* http://myspace.com/aideauditive
* http://mysthr.free.fr/Joomla => Site dédié à l'audio sous
Fedora/PlanetCCRMA.
*
***************************************************************************************
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-08 14:43 ` Mysth-R
@ 2009-01-08 14:46 ` Takashi Iwai
2009-01-08 22:14 ` Daniel Mack
1 sibling, 0 replies; 21+ messages in thread
From: Takashi Iwai @ 2009-01-08 14:46 UTC (permalink / raw)
To: Mysth-R; +Cc: Marco Santamaria, alsa-devel, Daniel Mack
At Thu, 8 Jan 2009 15:43:22 +0100,
Mysth-R wrote:
>
> OK, it's simple to fix.
> The below is the latest version I committed now to sound git tree.
> It'll be pushed to 2.6.29 (and stable kernels) later.
>
> Ok cool !
>
> Please let me know if you still encounter relevant problems.
>
> No problem... Thank you again for your help.
> By the way is there any plan to make buttons and lights to work on the Audio
> Kontrol 1 ? It could be a really cool feature.
This is rather a question to Daniel... :)
Takashi
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-08 14:37 ` Takashi Iwai
2009-01-08 14:43 ` Mysth-R
@ 2009-01-08 20:06 ` Marco Santamaria
2009-01-08 22:11 ` Daniel Mack
2 siblings, 0 replies; 21+ messages in thread
From: Marco Santamaria @ 2009-01-08 20:06 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Daniel Mack, Mysth-R
I can confirm, after another load test with midi applications (that caused
rosegarden and jack to crash several times...), that the last patch works
without error messages.
Which version of alsa corresponds to kernel 2.6.29?
Thanks again,
Marco
2009/1/8 Takashi Iwai <tiwai@suse.de>
> At Thu, 8 Jan 2009 15:26:39 +0100,
> Mysth-R wrote:
> >
> > Hi,
> >
> > I tried the last patch, and I think we got it. I made some few tests, and
> > every thing is Ok for me now. No more crash, no more messages in dmesg.
> > I just had a warning during compilation, but I think this is not really
> > important :
> >
> > sound/usb/caiaq/caiaq-midi.c: In function
> \u2018snd_usb_caiaq_midi_output_done
> > \u2019:
> > sound/usb/caiaq/caiaq-midi.c:170: attention : unused variable
> \u2018buf\u2019
> >
> > Perhaps this is not the same line (170) as you but, in my file, it
> concerns
> > the last function.
>
> OK, it's simple to fix.
> The below is the latest version I committed now to sound git tree.
> It'll be pushed to 2.6.29 (and stable kernels) later.
>
> Please let me know if you still encounter relevant problems.
>
>
> thanks,
>
> Takashi
>
> ---
> diff --git a/sound/usb/caiaq/caiaq-device.h
> b/sound/usb/caiaq/caiaq-device.h
> index f9fbdba..ab56e73 100644
> --- a/sound/usb/caiaq/caiaq-device.h
> +++ b/sound/usb/caiaq/caiaq-device.h
> @@ -75,6 +75,7 @@ struct snd_usb_caiaqdev {
> wait_queue_head_t ep1_wait_queue;
> wait_queue_head_t prepare_wait_queue;
> int spec_received, audio_parm_answer;
> + int midi_out_active;
>
> char vendor_name[CAIAQ_USB_STR_LEN];
> char product_name[CAIAQ_USB_STR_LEN];
> diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
> index 30b57f9..f19fd36 100644
> --- a/sound/usb/caiaq/caiaq-midi.c
> +++ b/sound/usb/caiaq/caiaq-midi.c
> @@ -59,6 +59,11 @@ static int snd_usb_caiaq_midi_output_open(struct
> snd_rawmidi_substream *substrea
>
> static int snd_usb_caiaq_midi_output_close(struct snd_rawmidi_substream
> *substream)
> {
> + struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
> + if (dev->midi_out_active) {
> + usb_kill_urb(&dev->midi_out_urb);
> + dev->midi_out_active = 0;
> + }
> return 0;
> }
>
> @@ -69,7 +74,8 @@ static void snd_usb_caiaq_midi_send(struct
> snd_usb_caiaqdev *dev,
>
> dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
> dev->midi_out_buf[1] = 0; /* port */
> - len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3,
> EP1_BUFSIZE-3);
> + len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3,
> + EP1_BUFSIZE - 3);
>
> if (len <= 0)
> return;
> @@ -79,24 +85,24 @@ static void snd_usb_caiaq_midi_send(struct
> snd_usb_caiaqdev *dev,
>
> ret = usb_submit_urb(&dev->midi_out_urb, GFP_ATOMIC);
> if (ret < 0)
> - log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,
> %d\n",
> - substream, ret);
> + log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,"
> + "ret=%d, len=%d\n",
> + substream, ret, len);
> + else
> + dev->midi_out_active = 1;
> }
>
> static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream
> *substream, int up)
> {
> struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
>
> - if (dev->midi_out_substream != NULL)
> - return;
> -
> - if (!up) {
> + if (up) {
> + dev->midi_out_substream = substream;
> + if (!dev->midi_out_active)
> + snd_usb_caiaq_midi_send(dev, substream);
> + } else {
> dev->midi_out_substream = NULL;
> - return;
> }
> -
> - dev->midi_out_substream = substream;
> - snd_usb_caiaq_midi_send(dev, substream);
> }
>
>
> @@ -161,16 +167,14 @@ int snd_usb_caiaq_midi_init(struct snd_usb_caiaqdev
> *device)
> void snd_usb_caiaq_midi_output_done(struct urb* urb)
> {
> struct snd_usb_caiaqdev *dev = urb->context;
> - char *buf = urb->transfer_buffer;
>
> + dev->midi_out_active = 0;
> if (urb->status != 0)
> return;
>
> if (!dev->midi_out_substream)
> return;
>
> - snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
> - dev->midi_out_substream = NULL;
> snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
> }
>
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-08 14:37 ` Takashi Iwai
2009-01-08 14:43 ` Mysth-R
2009-01-08 20:06 ` Marco Santamaria
@ 2009-01-08 22:11 ` Daniel Mack
2009-01-09 6:54 ` Takashi Iwai
2 siblings, 1 reply; 21+ messages in thread
From: Daniel Mack @ 2009-01-08 22:11 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Marco Santamaria, alsa-devel, Mysth-R
Hi Takashi,
On Thu, Jan 08, 2009 at 03:37:30PM +0100, Takashi Iwai wrote:
> > every thing is Ok for me now. No more crash, no more messages in dmesg.
> > I just had a warning during compilation, but I think this is not really
> > important :
> >
> > sound/usb/caiaq/caiaq-midi.c: In function \u2018snd_usb_caiaq_midi_output_done
> > \u2019:
> > sound/usb/caiaq/caiaq-midi.c:170: attention : unused variable \u2018buf\u2019
> >
> > Perhaps this is not the same line (170) as you but, in my file, it concerns
> > the last function.
>
> OK, it's simple to fix.
> The below is the latest version I committed now to sound git tree.
> It'll be pushed to 2.6.29 (and stable kernels) later.
Thanks a lot for your help - I was on vacation until now and had very
limited ways to follow that thread. I would, however, apprectiate the
driver version number would be increased for this change, as it makes
tracking of user error reports better trackable.
Do you want me to send in a patch for that or is it easier if you do
it yourself?
Thanks and best regards,
Daniel
> ---
> diff --git a/sound/usb/caiaq/caiaq-device.h b/sound/usb/caiaq/caiaq-device.h
> index f9fbdba..ab56e73 100644
> --- a/sound/usb/caiaq/caiaq-device.h
> +++ b/sound/usb/caiaq/caiaq-device.h
> @@ -75,6 +75,7 @@ struct snd_usb_caiaqdev {
> wait_queue_head_t ep1_wait_queue;
> wait_queue_head_t prepare_wait_queue;
> int spec_received, audio_parm_answer;
> + int midi_out_active;
>
> char vendor_name[CAIAQ_USB_STR_LEN];
> char product_name[CAIAQ_USB_STR_LEN];
> diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c
> index 30b57f9..f19fd36 100644
> --- a/sound/usb/caiaq/caiaq-midi.c
> +++ b/sound/usb/caiaq/caiaq-midi.c
> @@ -59,6 +59,11 @@ static int snd_usb_caiaq_midi_output_open(struct snd_rawmidi_substream *substrea
>
> static int snd_usb_caiaq_midi_output_close(struct snd_rawmidi_substream *substream)
> {
> + struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
> + if (dev->midi_out_active) {
> + usb_kill_urb(&dev->midi_out_urb);
> + dev->midi_out_active = 0;
> + }
> return 0;
> }
>
> @@ -69,7 +74,8 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *dev,
>
> dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
> dev->midi_out_buf[1] = 0; /* port */
> - len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3, EP1_BUFSIZE-3);
> + len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3,
> + EP1_BUFSIZE - 3);
>
> if (len <= 0)
> return;
> @@ -79,24 +85,24 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *dev,
>
> ret = usb_submit_urb(&dev->midi_out_urb, GFP_ATOMIC);
> if (ret < 0)
> - log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed, %d\n",
> - substream, ret);
> + log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,"
> + "ret=%d, len=%d\n",
> + substream, ret, len);
> + else
> + dev->midi_out_active = 1;
> }
>
> static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
> {
> struct snd_usb_caiaqdev *dev = substream->rmidi->private_data;
>
> - if (dev->midi_out_substream != NULL)
> - return;
> -
> - if (!up) {
> + if (up) {
> + dev->midi_out_substream = substream;
> + if (!dev->midi_out_active)
> + snd_usb_caiaq_midi_send(dev, substream);
> + } else {
> dev->midi_out_substream = NULL;
> - return;
> }
> -
> - dev->midi_out_substream = substream;
> - snd_usb_caiaq_midi_send(dev, substream);
> }
>
>
> @@ -161,16 +167,14 @@ int snd_usb_caiaq_midi_init(struct snd_usb_caiaqdev *device)
> void snd_usb_caiaq_midi_output_done(struct urb* urb)
> {
> struct snd_usb_caiaqdev *dev = urb->context;
> - char *buf = urb->transfer_buffer;
>
> + dev->midi_out_active = 0;
> if (urb->status != 0)
> return;
>
> if (!dev->midi_out_substream)
> return;
>
> - snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]);
> - dev->midi_out_substream = NULL;
> snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
> }
>
Acked-by: Daniel Mack <daniel@caiaq.de>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-08 14:43 ` Mysth-R
2009-01-08 14:46 ` Takashi Iwai
@ 2009-01-08 22:14 ` Daniel Mack
1 sibling, 0 replies; 21+ messages in thread
From: Daniel Mack @ 2009-01-08 22:14 UTC (permalink / raw)
To: Mysth-R; +Cc: Takashi Iwai, Marco Santamaria, alsa-devel
On Thu, Jan 08, 2009 at 03:43:22PM +0100, Mysth-R wrote:
> > Please let me know if you still encounter relevant problems.
> >
> > No problem... Thank you again for your help.
> By the way is there any plan to make buttons and lights to work on the Audio
> Kontrol 1 ? It could be a really cool feature.
That's done already: Buttons are exported as Linux input device (if
enabled in kernel config) and LEDs can be controlled using the ALSA
controllers API (amixer and friends). Did you try that?
Best regards,
Daniel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-08 22:11 ` Daniel Mack
@ 2009-01-09 6:54 ` Takashi Iwai
2009-01-10 12:53 ` Marco Santamaria
0 siblings, 1 reply; 21+ messages in thread
From: Takashi Iwai @ 2009-01-09 6:54 UTC (permalink / raw)
To: Daniel Mack; +Cc: Marco Santamaria, alsa-devel, Mysth-R
At Thu, 8 Jan 2009 23:11:53 +0100,
Daniel Mack wrote:
>
> Hi Takashi,
>
> On Thu, Jan 08, 2009 at 03:37:30PM +0100, Takashi Iwai wrote:
> > > every thing is Ok for me now. No more crash, no more messages in dmesg.
> > > I just had a warning during compilation, but I think this is not really
> > > important :
> > >
> > > sound/usb/caiaq/caiaq-midi.c: In function \u2018snd_usb_caiaq_midi_output_done
> > > \u2019:
> > > sound/usb/caiaq/caiaq-midi.c:170: attention : unused variable \u2018buf\u2019
> > >
> > > Perhaps this is not the same line (170) as you but, in my file, it concerns
> > > the last function.
> >
> > OK, it's simple to fix.
> > The below is the latest version I committed now to sound git tree.
> > It'll be pushed to 2.6.29 (and stable kernels) later.
>
> Thanks a lot for your help - I was on vacation until now and had very
> limited ways to follow that thread. I would, however, apprectiate the
> driver version number would be increased for this change, as it makes
> tracking of user error reports better trackable.
>
> Do you want me to send in a patch for that or is it easier if you do
> it yourself?
I increased the version to 1.3.10 now.
thanks,
Takashi
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-09 6:54 ` Takashi Iwai
@ 2009-01-10 12:53 ` Marco Santamaria
2009-01-11 12:03 ` Takashi Iwai
0 siblings, 1 reply; 21+ messages in thread
From: Marco Santamaria @ 2009-01-10 12:53 UTC (permalink / raw)
To: Takashi Iwai, Daniel Mack, alsa-devel; +Cc: Mysth-R
During a Rosegarden session a qsampler crash caused the following output in
dmesg:
[11530.642970] qsampler[22794]: segfault at 00000008 eip b73f52c5 esp
bfe77e20 error 4
[13278.161113] ALSA
/home/marco/build/alsa-1.0.17/linux-2.6.24-23-rt/driver/alsa-driver-1.0.17/usb/caiaq/../../alsa-kernel/usb/caiaq/caiaq-midi.c:90:
snd-usb-caiaq log: snd_usb_caiaq_midi_send(f6d52b40): usb_submit_urb()
failed,ret=-22, len=61
[13720.859888] qjackctl.bin[22273]: segfault at 00000314 eip b7b07a7f esp
bfbe8f54 error 4
There are segmentation fault errors from qsampler and qjackctl, but perhaps
there's also a problem in caiaq-midi.c .
Regards,
Marco
2009/1/9 Takashi Iwai <tiwai@suse.de>
> At Thu, 8 Jan 2009 23:11:53 +0100,
> Daniel Mack wrote:
> >
> > Hi Takashi,
> >
> > On Thu, Jan 08, 2009 at 03:37:30PM +0100, Takashi Iwai wrote:
> > > > every thing is Ok for me now. No more crash, no more messages in
> dmesg.
> > > > I just had a warning during compilation, but I think this is not
> really
> > > > important :
> > > >
> > > > sound/usb/caiaq/caiaq-midi.c: In function
> \u2018snd_usb_caiaq_midi_output_done
> > > > \u2019:
> > > > sound/usb/caiaq/caiaq-midi.c:170: attention : unused variable
> \u2018buf\u2019
> > > >
> > > > Perhaps this is not the same line (170) as you but, in my file, it
> concerns
> > > > the last function.
> > >
> > > OK, it's simple to fix.
> > > The below is the latest version I committed now to sound git tree.
> > > It'll be pushed to 2.6.29 (and stable kernels) later.
> >
> > Thanks a lot for your help - I was on vacation until now and had very
> > limited ways to follow that thread. I would, however, apprectiate the
> > driver version number would be increased for this change, as it makes
> > tracking of user error reports better trackable.
> >
> > Do you want me to send in a patch for that or is it easier if you do
> > it yourself?
>
> I increased the version to 1.3.10 now.
>
>
> thanks,
>
> Takashi
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-10 12:53 ` Marco Santamaria
@ 2009-01-11 12:03 ` Takashi Iwai
2009-01-12 14:30 ` Marco Santamaria
0 siblings, 1 reply; 21+ messages in thread
From: Takashi Iwai @ 2009-01-11 12:03 UTC (permalink / raw)
To: Marco Santamaria; +Cc: alsa-devel, Mysth-R
At Sat, 10 Jan 2009 13:53:24 +0100,
Marco Santamaria wrote:
>
> During a Rosegarden session a qsampler crash caused the following output in
> dmesg:
>
> [11530.642970] qsampler[22794]: segfault at 00000008 eip b73f52c5 esp bfe77e20
> error 4
> [13278.161113] ALSA /home/marco/build/alsa-1.0.17/linux-2.6.24-23-rt/driver/
> alsa-driver-1.0.17/usb/caiaq/../../alsa-kernel/usb/caiaq/caiaq-midi.c:90:
> snd-usb-caiaq log: snd_usb_caiaq_midi_send(f6d52b40): usb_submit_urb()
> failed,ret=-22, len=61
> [13720.859888] qjackctl.bin[22273]: segfault at 00000314 eip b7b07a7f esp
> bfbe8f54 error 4
>
> There are segmentation fault errors from qsampler and qjackctl, but perhaps
> there's also a problem in caiaq-midi.c .
Might be, but difficult to judge as now since the error seems
happening after qsampler, and the urb error itself seems
non-critical.
Takashi
>
> Regards,
> Marco
>
> 2009/1/9 Takashi Iwai <tiwai@suse.de>
>
> At Thu, 8 Jan 2009 23:11:53 +0100,
> Daniel Mack wrote:
> >
> > Hi Takashi,
> >
> > On Thu, Jan 08, 2009 at 03:37:30PM +0100, Takashi Iwai wrote:
> > > > every thing is Ok for me now. No more crash, no more messages in
> dmesg.
> > > > I just had a warning during compilation, but I think this is not
> really
> > > > important :
> > > >
> > > > sound/usb/caiaq/caiaq-midi.c: In function \
> u2018snd_usb_caiaq_midi_output_done
> > > > \u2019:
> > > > sound/usb/caiaq/caiaq-midi.c:170: attention : unused variable \
> u2018buf\u2019
> > > >
> > > > Perhaps this is not the same line (170) as you but, in my file, it
> concerns
> > > > the last function.
> > >
> > > OK, it's simple to fix.
> > > The below is the latest version I committed now to sound git tree.
> > > It'll be pushed to 2.6.29 (and stable kernels) later.
> >
> > Thanks a lot for your help - I was on vacation until now and had very
> > limited ways to follow that thread. I would, however, apprectiate the
> > driver version number would be increased for this change, as it makes
> > tracking of user error reports better trackable.
> >
> > Do you want me to send in a patch for that or is it easier if you do
> > it yourself?
>
> I increased the version to 1.3.10 now.
>
> thanks,
>
> Takashi
>
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: snd_usb_caiaq bug?
2009-01-11 12:03 ` Takashi Iwai
@ 2009-01-12 14:30 ` Marco Santamaria
0 siblings, 0 replies; 21+ messages in thread
From: Marco Santamaria @ 2009-01-12 14:30 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Mysth-R
I wanted to report this, just in case it was related to the patch you made
to solve our problem.
Thank you very much,
Marco
2009/1/11 Takashi Iwai <tiwai@suse.de>
> At Sat, 10 Jan 2009 13:53:24 +0100,
> Marco Santamaria wrote:
> >
> > During a Rosegarden session a qsampler crash caused the following output
> in
> > dmesg:
> >
> > [11530.642970] qsampler[22794]: segfault at 00000008 eip b73f52c5 esp
> bfe77e20
> > error 4
> > [13278.161113] ALSA
> /home/marco/build/alsa-1.0.17/linux-2.6.24-23-rt/driver/
> > alsa-driver-1.0.17/usb/caiaq/../../alsa-kernel/usb/caiaq/caiaq-midi.c:90:
> > snd-usb-caiaq log: snd_usb_caiaq_midi_send(f6d52b40): usb_submit_urb()
> > failed,ret=-22, len=61
> > [13720.859888] qjackctl.bin[22273]: segfault at 00000314 eip b7b07a7f esp
> > bfbe8f54 error 4
> >
> > There are segmentation fault errors from qsampler and qjackctl, but
> perhaps
> > there's also a problem in caiaq-midi.c .
>
> Might be, but difficult to judge as now since the error seems
> happening after qsampler, and the urb error itself seems
> non-critical.
>
>
> Takashi
>
> >
> > Regards,
> > Marco
> >
> > 2009/1/9 Takashi Iwai <tiwai@suse.de>
> >
> > At Thu, 8 Jan 2009 23:11:53 +0100,
> > Daniel Mack wrote:
> > >
> > > Hi Takashi,
> > >
> > > On Thu, Jan 08, 2009 at 03:37:30PM +0100, Takashi Iwai wrote:
> > > > > every thing is Ok for me now. No more crash, no more messages
> in
> > dmesg.
> > > > > I just had a warning during compilation, but I think this is
> not
> > really
> > > > > important :
> > > > >
> > > > > sound/usb/caiaq/caiaq-midi.c: In function \
> > u2018snd_usb_caiaq_midi_output_done
> > > > > \u2019:
> > > > > sound/usb/caiaq/caiaq-midi.c:170: attention : unused variable \
> > u2018buf\u2019
> > > > >
> > > > > Perhaps this is not the same line (170) as you but, in my file,
> it
> > concerns
> > > > > the last function.
> > > >
> > > > OK, it's simple to fix.
> > > > The below is the latest version I committed now to sound git
> tree.
> > > > It'll be pushed to 2.6.29 (and stable kernels) later.
> > >
> > > Thanks a lot for your help - I was on vacation until now and had
> very
> > > limited ways to follow that thread. I would, however, apprectiate
> the
> > > driver version number would be increased for this change, as it
> makes
> > > tracking of user error reports better trackable.
> > >
> > > Do you want me to send in a patch for that or is it easier if you
> do
> > > it yourself?
> >
> > I increased the version to 1.3.10 now.
> >
> > thanks,
> >
> > Takashi
> >
> >
>
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2009-01-12 14:30 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-04 16:29 snd_usb_caiaq bug? Marco Santamaria
2009-01-07 10:56 ` Takashi Iwai
2009-01-07 15:41 ` Marco Santamaria
2009-01-07 16:35 ` Takashi Iwai
2009-01-07 18:46 ` Marco Santamaria
2009-01-07 20:06 ` Mysth-R
2009-01-07 22:52 ` Takashi Iwai
2009-01-08 0:59 ` Marco Santamaria
2009-01-08 1:34 ` Marco Santamaria
2009-01-08 11:20 ` Takashi Iwai
2009-01-08 14:26 ` Mysth-R
2009-01-08 14:37 ` Takashi Iwai
2009-01-08 14:43 ` Mysth-R
2009-01-08 14:46 ` Takashi Iwai
2009-01-08 22:14 ` Daniel Mack
2009-01-08 20:06 ` Marco Santamaria
2009-01-08 22:11 ` Daniel Mack
2009-01-09 6:54 ` Takashi Iwai
2009-01-10 12:53 ` Marco Santamaria
2009-01-11 12:03 ` Takashi Iwai
2009-01-12 14:30 ` Marco Santamaria
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.