<div dir="ltr">This is incredible !!<br><br>well, after some days googling, compiling kernel and tweaking my laptop (set_rlimit, setpci latency_timer, rtirq, etc...) I got the same results. But testing again and again I found that I got crackling sounds with my firewire sound card (using freebob or ffado), and also with my usb sound card. Tests were : <br>
<br>frame/period : 256&nbsp; ; Period/buffer : 3 ==&gt; bad !<br>Frame/period : 512 ; Period/buffer : 3&nbsp; ==&gt; bad !<br>Frame/period : 1024 ; Period/buffer : 3 ==&gt; ok but with an unacceptable latency : 64 ms...<br><br>finally I thought that it was a pd issue, and in some kind of aspect it was. (due to too much midi messages at the same time).<br>
But when I tried my patch with :<br>frame/period : 64 ; Period/buffer : 3 ==&gt; it was ok !!!<br><br>So strange ?! Why does it works with a latency of 4ms or 64ms and does not work for other settings ?<br>Well I am happy because I used to play live... so a 4ms latency is really good for me. But I would like to understand ?!<br>
<br>Cheers,<br>Mysth-R<br><br><br><div class="gmail_quote">2008/9/27 Mysth-R <span dir="ltr">&lt;<a href="mailto:mysthr21@gmail.com">mysthr21@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr"><br><br><div class="gmail_quote">2008/9/25 Pieter Palmers <span dir="ltr">&lt;<a href="mailto:pieterp@joow.be" target="_blank">pieterp@joow.be</a>&gt;</span><div><div></div><div class="Wj3C7c"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Mysth-R wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
2008/9/24 Pieter Palmers &lt;<a href="mailto:pieterp@joow.be" target="_blank">pieterp@joow.be</a> &lt;mailto:<a href="mailto:pieterp@joow.be" target="_blank">pieterp@joow.be</a>&gt;&gt;<div><br>
<br>
 &nbsp; &nbsp;Mysth-R wrote:<br>
<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;2008/9/23 Pieter Palmers &lt;<a href="mailto:pieterp@joow.be" target="_blank">pieterp@joow.be</a><br></div>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;mailto:<a href="mailto:pieterp@joow.be" target="_blank">pieterp@joow.be</a>&gt; &lt;mailto:<a href="mailto:pieterp@joow.be" target="_blank">pieterp@joow.be</a><div><div></div><div><br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;mailto:<a href="mailto:pieterp@joow.be" target="_blank">pieterp@joow.be</a>&gt;&gt;&gt;<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Mysth-R wrote:<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Hi,<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I&#39;ve got a strange behaviour with my midi controller and/or<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freebob/ffado.<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I made a pure data patch, with a midi learn function. So<br>
 &nbsp; &nbsp; &nbsp; &nbsp;I can<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; control everything with my midi controller.<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; When I use jack with Freebob or ffado (I tested both) and a<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Presonus Firebox, I got cracking sounds every time I move<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; faders, pots from my Midi Controler.<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; When I use jack with alsa and a poor usb berhinger UCA202 it<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; works perfectly : no cracking sounds<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Is your midi controller attached to the Presonus box or is it<br>
 &nbsp; &nbsp; &nbsp; &nbsp;a USB<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; midi controller?<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;I tried with USB and directly attached to the Presonus. My<br>
 &nbsp; &nbsp; &nbsp; &nbsp;controller is a Korg microKontrol, but I tried with another<br>
 &nbsp; &nbsp; &nbsp; &nbsp;controller too (an EMU I think)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;I also tried with Jackd and Jackdmp , cause I am on Gentoo 64bits.<br>
<br>
<br>
 &nbsp; &nbsp;Strange...<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; What settings do you use for jackd?<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;My settings are :<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;/usr/bin/jackd -R -dfirewire -r48000 -p256 -n3<br>
<br>
 &nbsp; &nbsp;does it happen with higher buffer sizes too?<br>
<br>
 &nbsp; &nbsp;try increasing the priority of jackd to 65:<br>
 &nbsp; &nbsp;/usr/bin/jackd -R -P65 -dfirewire -r48000 -p256 -n3<br>
<br>
 &nbsp; &nbsp;I suspect that it has something to do with the kernel layer since<br>
 &nbsp; &nbsp;it&#39;s present in both freebob and ffado.<br>
<br>
<br>
Ok I have made some tests<br>
<br>
First test :<br>
priority : 65<br>
frame/period : 4096<br>
Test OK !! :)<br>
<br>
Second test :<br>
Priority : 65<br>
Frame/period : 512<br>
It cracks !<br>
<br>
Last test :<br>
Priority : 65<br>
Frame / period : 1024<br>
Test OK !!<br>
&nbsp;A friend of mine just tell me that my pd patch works find with his config, and freebob : no cracks !<br>
What, in your mind, could be the problem ? software ? hardware ?<br>
</div></div></blockquote>
<br>
You seem to be running a Ricoh 1394 chipset, that can be a problem. I think you&#39;re experiencing a hardware issue.<br>
</blockquote></div></div><div><br>Yes I got a ricoh but I had too much issues with it. Now I use an ExpressCard with firewire extension, and it has a Texas Instrument chip (see the two last line of the lspci result).<br>
Perhpas due to a rate transfer of the Express Card ....<br>
&nbsp;</div><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Also, for me the pd patch crackles without doing anything, but then again I don&#39;t know how to use pd properly.<br>
</blockquote></div><div><br>You can try to run pd with :<br><br>$ pd -rt -jack -alsamidi<br><br><br>&nbsp;</div><div><div></div><div class="Wj3C7c"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
<br>
Greets,<br>
<br>
Pieter<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
on my gentoo I have compiled my own kernel (2.6.25.4-rt5). But on the open suse I took the one from Jacklab (<a href="http://2.6.22.13" target="_blank">2.6.22.13</a> &lt;<a href="http://2.6.22.13" target="_blank">http://2.6.22.13</a>&gt;)<div>

<div></div><div><br>
<br>
<br>
#################################################<br>
Some more infos :<br>
1- lspci<br>
2- cat /proc/interrupts<br>
3- rtirq<br>
4- limit.conf<br>
<br>
<br>
###############################################&quot;<br>
1- lspci &nbsp;:<br>
<br>
mysthr2@localhost ~ $ sudo lspci<br>
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)<br>
00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express PCI Express Root Port (rev 03)<br>
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)<br>
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)<br>
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)<br>
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01)<br>
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)<br>
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)<br>
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)<br>
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)<br>
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)<br>
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)<br>
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)<br>
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 01)<br>
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)<br>
01:00.0 VGA compatible controller: nVidia Corporation GeForce Go 7900 GS (rev a1)<br>
03:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)<br>
03:01.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller<br>
03:01.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)<br>
03:01.2 System peripheral: Ricoh Co Ltd Device 0843 (rev 01)<br>
03:01.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 0a)<br>
03:01.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 05)<br>
0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)<br>
0d:00.0 PCI bridge: Texas Instruments XIO2000(A)/XIO2200(A) PCI Express-to-PCI Bridge (rev 03)<br>
0e:00.0 FireWire (IEEE 1394): Texas Instruments XIO2200(A) IEEE-1394a-2000 Controller (PHY/Link) (rev 01)<br>
mysthr2@localhost ~ $<br>
<br>
<br>
#########################################################<br>
2- cat /proc/interrupts<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CPU0 &nbsp; &nbsp; &nbsp; CPU1 &nbsp; &nbsp; &nbsp; &nbsp;0: &nbsp; &nbsp;1558526 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-edge &nbsp; &nbsp; &nbsp;timer<br>
 &nbsp;1: &nbsp; &nbsp; &nbsp; 1313 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-edge &nbsp; &nbsp; &nbsp;i8042<br>
 &nbsp;8: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-edge &nbsp; &nbsp; &nbsp;rtc<br>
 &nbsp;9: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-fasteoi &nbsp; acpi<br>
&nbsp;12: &nbsp; &nbsp; &nbsp; &nbsp;123 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-edge &nbsp; &nbsp; &nbsp;i8042<br>
&nbsp;14: &nbsp; &nbsp; &nbsp;11715 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-edge &nbsp; &nbsp; &nbsp;ata_piix<br>
&nbsp;15: &nbsp; &nbsp; &nbsp; &nbsp; 97 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-edge &nbsp; &nbsp; &nbsp;ata_piix<br>
&nbsp;16: &nbsp; &nbsp; &nbsp;48553 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-fasteoi &nbsp; nvidia<br>
&nbsp;17: &nbsp; &nbsp; &nbsp; 1495 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-fasteoi &nbsp; eth0<br>
&nbsp;19: &nbsp; &nbsp; &nbsp; &nbsp; 83 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-fasteoi &nbsp; ohci1394, ohci1394<br>
&nbsp;20: &nbsp; &nbsp; &nbsp; 6296 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-fasteoi &nbsp; ehci_hcd:usb1, uhci_hcd:usb2<br>
&nbsp;21: &nbsp; &nbsp; &nbsp; &nbsp;106 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-fasteoi &nbsp; uhci_hcd:usb3, HDA Intel<br>
&nbsp;22: &nbsp; &nbsp; &nbsp; &nbsp; 92 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-fasteoi &nbsp; uhci_hcd:usb4<br>
&nbsp;23: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; IO-APIC-fasteoi &nbsp; uhci_hcd:usb5<br>
NMI: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; Non-maskable interrupts<br>
LOC: &nbsp; &nbsp; &nbsp;39497 &nbsp; &nbsp;1450011 &nbsp; Local timer interrupts<br>
RES: &nbsp; &nbsp; &nbsp;35829 &nbsp; &nbsp; &nbsp;46345 &nbsp; Rescheduling interrupts<br>
CAL: &nbsp; &nbsp; &nbsp; &nbsp; 38 &nbsp; &nbsp; &nbsp; &nbsp; 43 &nbsp; function call interrupts<br>
TLB: &nbsp; &nbsp; &nbsp; &nbsp;259 &nbsp; &nbsp; &nbsp; &nbsp;469 &nbsp; TLB shootdowns<br>
TRM: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; Thermal event interrupts<br>
THR: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; Threshold APIC interrupts<br>
SPU: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; Spurious interrupts<br>
ERR: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0<br>
<br>
##################################################<br>
<br>
3- rtirq :<br>
<br>
#!/bin/sh<br>
#<br>
# Copyright (c) 2004-2007 rncbc aka Rui Nuno Capela.<br>
#<br>
# /etc/conf.d/rtirq<br>
#<br>
# Configuration for IRQ thread tunning,<br>
# for realtime-preempt enabled kernels.<br>
#<br>
# This program is free software; you can redistribute it and/or modify it<br>
# under the terms of the GNU General Public License version 2 or later.<br>
#<br>
<br>
# IRQ thread service names<br>
# (space separated list, from higher to lower priority).<br>
RTIRQ_NAME_LIST=&quot;rtc ohci1394 i8042&quot;<br>
<br>
# Highest priority.<br>
RTIRQ_PRIO_HIGH=99<br>
<br>
# Priority decrease step.<br>
RTIRQ_PRIO_DECR=10<br>
<br>
# Whether to reset all IRQ threads to SCHED_OTHER.<br>
RTIRQ_RESET_ALL=0<br>
<br>
# On kernel configurations that support it,<br>
# which services should be NOT threaded<br>
# (space separated list).<br>
RTIRQ_NON_THREADED=&quot;rtc ohci1394&quot;<br>
<br>
# Process names which will be forced to the<br>
# highest realtime priority range (99-91)<br>
# (space separated list, from highest to lower priority).<br>
# RTIRQ_HIGH_LIST=&quot;softirq-timer&quot;<br>
<br>
<br>
#############################################################&quot;<br>
4- limits.conf<br>
<br>
@audio &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; rtprio &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;99<br>
@audio &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; nice &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-10<br>
@audio &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; memlock &nbsp; &nbsp; &nbsp; &nbsp; 1774000<br>
<br>
<br>
###########################################################<br>
<br>
That&#39;s all !! :)<br>
Cheers,<br>
<br>
Mysth-R<br>
<br>
-- <br>
* ***************************************************************************************<br>
* {^_^} Mysth-R {^_^}<br>
* &lt;= Aide Auditive =&gt;<br>
*<br>
* <a href="http://myspace.com/mysthr" target="_blank">http://myspace.com/mysthr</a><br>
* <a href="http://myspace.com/aideauditive" target="_blank">http://myspace.com/aideauditive</a><br>
* <a href="http://mysthr.free.fr/Joomla" target="_blank">http://mysthr.free.fr/Joomla</a> =&gt; Site dédié à l&#39;audio sous Fedora/PlanetCCRMA.<br>
* ***************************************************************************************<br>
</div></div></blockquote>
<br>
</blockquote></div></div></div><div><div></div><div class="Wj3C7c"><br><br clear="all"><br>-- <br>* ***************************************************************************************<br>* &nbsp;{^_^} Mysth-R {^_^}<br>* &nbsp;&lt;= Aide Auditive =&gt;<br>
*<br>* <a href="http://myspace.com/mysthr" target="_blank">http://myspace.com/mysthr</a><br>
* <a href="http://myspace.com/aideauditive" target="_blank">http://myspace.com/aideauditive</a><br>* <a href="http://mysthr.free.fr/Joomla" target="_blank">http://mysthr.free.fr/Joomla</a> &nbsp;=&gt; Site dédié à l&#39;audio sous Fedora/PlanetCCRMA.<br>
* ***************************************************************************************<br>

</div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>* ***************************************************************************************<br>* &nbsp;{^_^} Mysth-R {^_^}<br>* &nbsp;&lt;= Aide Auditive =&gt;<br>*<br>* <a href="http://myspace.com/mysthr">http://myspace.com/mysthr</a><br>
* <a href="http://myspace.com/aideauditive">http://myspace.com/aideauditive</a><br>* <a href="http://mysthr.free.fr/Joomla">http://mysthr.free.fr/Joomla</a> &nbsp;=&gt; Site dédié à l&#39;audio sous Fedora/PlanetCCRMA.<br>* ***************************************************************************************<br>

</div>