summaryrefslogtreecommitdiff
path: root/src/daemon
diff options
context:
space:
mode:
authorAlexander E. Patrakov <patrakov@gmail.com>2014-06-02 22:45:31 +0600
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>2014-06-05 15:57:00 +0300
commit42c814b9f320c5868fac98b4291265ca00e79fde (patch)
tree75212b639de36cef3512d2882eba731350716a1c /src/daemon
parentd3d09c949d48c0144ddb0cc2d228a7a19657c72e (diff)
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
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/daemon-conf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
index ce777a673..d0e177c88 100644
--- a/src/daemon/daemon-conf.c
+++ b/src/daemon/daemon-conf.c
@@ -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;
}