camilladsp icon indicating copy to clipboard operation
camilladsp copied to clipboard

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

Open pavhofman opened this issue 10 months ago • 2 comments

IIUC commit https://github.com/HEnquist/camilladsp/commit/442ca856359f3bb763524e6e375fa19988add437 changed standard alsa buffer size from 2 chunks to 4 chunks. IMO the target_level check https://github.com/HEnquist/camilladsp/blob/76aa55dddc237daa0477bfea45df8bfba6e22cc1/src/config.rs#L1662-L1666 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.

pavhofman avatar Apr 04 '24 17:04 pavhofman

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

HEnquist avatar Apr 04 '24 21:04 HEnquist

Fixed in https://github.com/HEnquist/camilladsp/commit/ca25bdaaadf6f9e95425101edec622c4206e05ad

HEnquist avatar Apr 18 '24 18:04 HEnquist