mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
source, sink: Support weird sample rates
This fixes assertion failures that manifest themselves with cards that support only weird rates such as 37286Hz. Tested with snd-pcsp. Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=48109
This commit is contained in:
parent
d3d09c949d
commit
42c814b9f3
5 changed files with 30 additions and 45 deletions
|
|
@ -345,8 +345,7 @@ static int parse_sample_rate(pa_config_parser_state *state) {
|
|||
|
||||
c = state->data;
|
||||
|
||||
if (pa_atou(state->rvalue, &r) < 0 || !pa_sample_rate_valid(r) ||
|
||||
!((r % 4000 == 0) || (r % 11025 == 0))) {
|
||||
if (pa_atou(state->rvalue, &r) < 0 || !pa_sample_rate_valid(r)) {
|
||||
pa_log(_("[%s:%u] Invalid sample rate '%s'."), state->filename, state->lineno, state->rvalue);
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -363,8 +362,7 @@ static int parse_alternate_sample_rate(pa_config_parser_state *state) {
|
|||
|
||||
c = state->data;
|
||||
|
||||
if (pa_atou(state->rvalue, &r) < 0 || !pa_sample_rate_valid(r) ||
|
||||
!((r % 4000==0) || (r % 11025 == 0))) {
|
||||
if (pa_atou(state->rvalue, &r) < 0 || !pa_sample_rate_valid(r)) {
|
||||
pa_log(_("[%s:%u] Invalid sample rate '%s'."), state->filename, state->lineno, state->rvalue);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue