Skip to content
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

Param target_level sanity check - 4 * buffer size instead of 2 * buffer size #335

Open
pavhofman opened this issue Apr 4, 2024 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@pavhofman
Copy link
Contributor

IIUC commit 442ca85 changed standard alsa buffer size from 2 chunks to 4 chunks. IMO the target_level check

camilladsp/src/config.rs

Lines 1662 to 1666 in 76aa55d

if conf.devices.target_level() >= 2 * conf.devices.chunksize {
let msg = format!(
"target_level can't be larger than {}",
2 * conf.devices.chunksize
);
should be raised accordingly, so that any value up to buffer size can be assigned.

My tests on a low-power CPU USB gadget -> resampling -> I2S -> gadget loopback where the capture + resampling thread takes > 70% of CPU core suggest the optimal target_limit value for such a use case would be 3 * chunksize. The above change would allow that value.

Thanks a lot for considering,

Pavel.

@HEnquist
Copy link
Owner

HEnquist commented Apr 4, 2024

Thanks! I forgot to change the limit in the check, will do!

@HEnquist
Copy link
Owner

Fixed in ca25bda

@HEnquist HEnquist added this to the 3.0 milestone Apr 18, 2024
@HEnquist HEnquist added the enhancement New feature or request label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants