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

fix alsa hw params constraints #458

Closed
wants to merge 1 commit into from
Closed

Conversation

borine
Copy link
Collaborator

@borine borine commented Jun 11, 2021

While investigating issue #451, I discovered this peculiar oddness with the ioplug hw param handilng. With this change, when an application asks for a period time of 100ms, it is actually given one of that size, no matter whether it sets the buffer size before or after the period. 😄 Hopefully this may even resolve the above mentioned issue !!

Current pcm plugin code results in very strange buffer and period size
selections if the application sets period size before buffer size. This
simple fix corrects that issue. There does not appear to be any clue in
the ALSA docs as to why the period size max needs to be so high, but
looking at other io plugin examples they all appear to set the max
period to at least 1MB and in testing this change always gives sensible
values for both period and bufffer sizes.
@arkq arkq closed this in 95eb25d Jun 11, 2021
arkq pushed a commit that referenced this pull request Jun 11, 2021
Current PCM plug-in code results in very strange buffer and period size
selections if the application sets period size before buffer size. This
simple fix corrects that issue. There does not appear to be any clue in
the ALSA docs as to why the period size max needs to be so high, but
looking at other IO plug-in examples they all appear to set the max
period to at least 1MB and in testing this change always gives sensible
values for both period and buffer sizes.

Closes #458
@borine borine deleted the alsa-param-fix branch June 21, 2021 20:50
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

Successfully merging this pull request may close these issues.

2 participants