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

Improved support for ALSA devices for buffer = 2 x period #375

Closed
siraaris opened this issue Nov 10, 2024 · 3 comments
Closed

Improved support for ALSA devices for buffer = 2 x period #375

siraaris opened this issue Nov 10, 2024 · 3 comments

Comments

@siraaris
Copy link

In a recent DIY thread investigation of running CDSP with rate adjustments via Loopback identified a potential issue in CDSP supporting playback devices where the buffer size is limited to 2x period.

A note was mentioned that implementing another thread as in Coreaudio and Wasapi in ALSA would help this case.

I'm creating this issue as placeholder.

Incidentally using the "alsa_optional_params" code to set the capture period to the same as the Loopback play period seems to help reduce xruns.

Ready to assist when/if this issue gets traction!

@siraaris
Copy link
Author

siraaris commented Nov 10, 2024

A data point. Running with the following configuration:

devices:
multithreaded: true
samplerate: 96000
chunksize: 1920
queuelimit: 4

silence_threshold: -80
silence_timeout: 0

volume_ramp_time: 100.0

enable_rate_adjust: true

adjust_period: 2

capture:
type: Alsa
device: "hw:CARD=Loopback,DEV=1"
format: S32LE
channels: 2
period: 1920
buffersize: 7680

playback:
type: Alsa
device: "plughw:CARD=HDSPMx2673a5,DEV=0"
format: S32LE
channels: 32
period: 2048
buffersize: 4096

xruns are minimal (1 observed in 8 hours!).

1 Loopback/pcm0p/sub0 Loopback/pcm1c/sub0 HDSPMx2673a5/pcm0p/sub0
2 0 0 1
3 1920 1920 2048
4 3840 7680 4096

Screenshot 2024-11-10 at 1 49 24 pm

@siraaris
Copy link
Author

Whilst the above does not report xruns, there are clearly audible periodic clicks.

@HEnquist
Copy link
Owner

Closing in favor of #376

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants