[LAD] Re: Status of Pipewire

2023-02-10 Thread Fons Adriaensen
On Thu, Feb 09, 2023 at 01:34:52PM +0100, Wim Taymans wrote:

> real JACK is more mature and does things differently (mostly device
> wakeup with IRQ instead of timers)

The real difference between the two methods is 'sample count'
versus 'time' as the source of the event that starts a period.

I always wondered why one would use a timer, it just amounts
to polling. Suppose you look every 1 ms to check if there
are enough samples for a period. That means you can be up
to 1 ms late. Compare that to the period time of 1.33 ms
when using 64 samples / 48 kHz. Up to 3/4 of the available
time to compute a period could be lost...

Or am I missing something ?

Ciao,

-- 
FA

___
Linux-audio-dev mailing list -- linux-audio-dev@lists.linuxaudio.org
To unsubscribe send an email to linux-audio-dev-le...@lists.linuxaudio.org


[LAD] Re: Status of Pipewire - Ryzen 5

2023-02-10 Thread John Rigg
On Fri, Feb 10, 2023 at 06:32:36PM +, Will Godfrey wrote:
> On Thu, 9 Feb 2023 20:18:59 +
> John Rigg  wrote:
> >Have you turned off hyperthreading on the Ryzen system (usually called SMT in
> >BIOS settings on AMD)? I keep SMT turned off on my Ryzen systems to avoid
> >possible scheduling problems. So far no problems with 6.x kernels with 
> >dynamic
> >preempt enabled.
> >
> OK. That works thanks. Strange it wasn't needed for kernel 5.10.

The scheduler was modified to allow dynamic preemption (preemption
can be turned on and off with kernel command line), starting with
5.12 kernel.

John
___
Linux-audio-dev mailing list -- linux-audio-dev@lists.linuxaudio.org
To unsubscribe send an email to linux-audio-dev-le...@lists.linuxaudio.org


[LAD] Re: Status of Pipewire

2023-02-10 Thread Len Ovens
I think it is too bad that pipewire does not just use the system libjack 
and allow setting server name. Then both could run as separate jack 
servers. Building a Jack->jack bridge with SRC would not be too hard 
either. For many people, leaving pw server to default would just work but 
for others setting the server name to pipewire would allow jackd to start 
as normal, no comflict.


I suppose it would be possible to leave the system libjack active and 
start a zita-j2n instance with pw-jack and a zita-n2j without as a bridge. 
Clunky for sure but maybe a purpose built zita-pjbridge could work better. 
(peanut butter and jam?)



--
Len Ovens
www.ovenwerks.net
___
Linux-audio-dev mailing list -- linux-audio-dev@lists.linuxaudio.org
To unsubscribe send an email to linux-audio-dev-le...@lists.linuxaudio.org


[LAD] Re: Status of Pipewire - Ryzen 5

2023-02-10 Thread Will Godfrey
On Thu, 9 Feb 2023 20:18:59 +
John Rigg  wrote:

>On Thu, Feb 09, 2023 at 02:33:18PM +, Will Godfrey wrote:
>> 
>> Something that may (or may not be related)
>> There seems to be something odd with Linux image 6.1 preempt
>> 
>> On a Ryzen 5, Rosegarden keeps randomly losing the transport timer
>> sometimes freezing for nearly a second (then blasts poor yoshimi with bunches
>> of notes on all 16 channels). This doesn't happen with the 'normal' 6.1 
>> kernel,
>> nor does it happen with 5.10 preempt.
>> 
>> However the exact same setup on an older Intel Pentium has no problems at 
>> all.  
>
>Have you turned off hyperthreading on the Ryzen system (usually called SMT in
>BIOS settings on AMD)? I keep SMT turned off on my Ryzen systems to avoid
>possible scheduling problems. So far no problems with 6.x kernels with dynamic
>preempt enabled.
>
>John
OK. That works thanks. Strange it wasn't needed for kernel 5.10.

-- 
Will J Godfrey {apparently now an 'elderly'}
https://willgodfrey.bandcamp.com/
http://yoshimi.github.io
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
___
Linux-audio-dev mailing list -- linux-audio-dev@lists.linuxaudio.org
To unsubscribe send an email to linux-audio-dev-le...@lists.linuxaudio.org


[LAD] Re: Status of Pipewire

2023-02-10 Thread Len Ovens

On 2023-02-08 04:03, Lorenzo Sutton wrote:


I recently reinstalled my uses Manjaro (Arch-based) and I see I _do_
have a 'pipewire' package installed, but it looks like I'm actually
running pulseaudio (?) and am able to run jack and use my
jack-pulseaudio sink _if_ needed - as I have usually done since years.


Yes, however, the packaging is ever changing so what I have to say may 
be true for some people and not for others. At some point (ubuntu 22.04 
here but already different in for 23.04) both pulse and pipewire are 
installed and set up in systemd so that if pulse is enabled, it takes 
the resources first and pipewire fails to start. So disabling pulse with 
systemctl (as a user not root) will switch to pipewire at least for 
desktop use. If the right (wrong?) pipewire-jack (not sure the right 
package name and it is changing anyway) package is installed, a file is 
created in /etc/ld.so.conf.d/ that basically tells the system that 
libjack is located in /usr/lib/*/pipewire*/jack/. This means that any 
jack client will use this lib and connect to pw instead of jack. This 
includes jackd(bus), jack_control, etc. To start jackd(bus) one must 
first remove /etc/ld.so.conf.d/*pipewire* and do an ldcoonfig (both as 
root of course). Then there is a pw configuration change that should 
make pw bridge to jackd... I haven't got so far as seeing how that 
works.


I can (via script) change between a system that runs pulse/jack and a 
system that runs pipewire so far. However life has been busy and I have 
not played with it enough to say more.



pactl load-module module-jack-sink
pactl load-module module-jack-source


This does not seem possible. There is some sort of pw/jack bridge but 
there can only ever be one (that I can tell) and it will only ever have 
a number of ports automatically determined by PW rather than the very 
flexible modules listed above. Hopefully that changes.


It is supposed to be possible to either: use pw for desktop with a 
bridge to jack for deterministic audio or use pw as jack and use jackd 
as a device. The second would require running jackd(bus) from a script 
that points jackd(bus) at the right libjack.


so far PW has been reasonably good for desktop and jack functions for me 
except for Ardour exports where freerun is required. I am running it at 
1024 buffer size only though because... the ALSA FW stack seems limited 
compared to ffado. ALSA fw seems limited to 256/2 and above where ffado 
will run reliably at 16/2. When I say limited to 256/2 I mean that jackd 
using the alsa fw stack with crash if the latency is set lower.


As such, I have an interest in being able to use jackd in a PW 
environment, not so I can run at 16/2 but at least low enough to use my 
computer as a guitar effect in real time which pw does not allow.


--
Len Ovens
www.OvenWerks.net
___
Linux-audio-dev mailing list -- linux-audio-dev@lists.linuxaudio.org
To unsubscribe send an email to linux-audio-dev-le...@lists.linuxaudio.org