New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Digidesign Mbox 3] Does ucm SplitPCM add latency? #238
Comments
Do you use PA ? Do you have installed alsa-lib version 1.2.8 ? |
pipewire 1:0.3.59-5 (pipewire-jack, pipewire-pulse) I noticed when using carla to connect my mic to output, using the same latency config, when using UCM a little more lag. I'm going to measure the latency now. |
Tested latency. Using UCM: 38.604 Without UCM: 14.312 |
The latency is configurable. For USB profiles, the 10ms period size is the default. You may lower this value in /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf. |
Indeed, lowering that variable to 1 lowered the latency to 12ms Put this below line 233 of USB-Audio.conf Gonna test it, and submit a patch if I have no issues. |
The minimal sample chunk size for the USB audio devices is 1ms (1000) and I think that PW expects the total buffer to be more large, so values 4000-6000 may give almost similar results with the lower CPU overhead. Could you test? |
And actually setting SplitPCMPeriodTime to 1 gives me the lowest cpu usage. 🤷 ¯_(ツ)_/¯ |
Could you show output from |
I think the "pcm0*" comes first, sub0 comes after With 10000
with 1
|
updated my comment |
So the lowest possible value is 500 (0.5ms) -- 1000000/(48000/24). But this is too low value for the normal operation. If you set the direct profile (or don't use UCM) which values do you see here? |
Without UCM, the values are as follow:
|
So it's setup for 1000000/(48000/32) -- config value approx. 667 . It's really close to 500. |
BTW: Do you use the default pipewire configuration or do you modified the latency (quantum) in PW ? It seems that the configuration is not default where the period size is usually around 1024 samples (21.3ms at 48000Hz rate). |
I was testing always live with So i have (Mic1_in --> "LSP Latency Meter" --> speaker_out) in carla, my physical microphone at 5cm of my speaker. Carla shows (Buffer size 64, Sample rate 48000) PD: I really thank you for your help, not very much docs for alsaucm. |
This solves latency issues with UCM Solving this alsa-project#238
#237
I've correctly configured ucm profile, but I notice a small latency added when using UCM vs not using it (having the default alsa analog-surround4.0 profile)
Is this the expected behavior of SplitPCM in UCM?
The text was updated successfully, but these errors were encountered: