diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-10-17 20:01:03 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-10-17 20:16:37 +0530 |
commit | ac469a25c04c206c2483159b07deaa9b7c9d5f7c (patch) | |
tree | e0402f9cac676aff7fd28bc3c8513e1675e6f08c | |
parent | b9ff90fef856be80a299b7ce41ab8cebfe3c6bc5 (diff) |
sink,source: Add the ability to disable alternat sample rate switching
Setting the alternate sample rate to 0 in config disables this feature.
-rw-r--r-- | man/pulse-daemon.conf.5.xml.in | 3 | ||||
-rw-r--r-- | src/modules/alsa/alsa-sink.c | 3 | ||||
-rw-r--r-- | src/modules/alsa/alsa-source.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in index 33ea7920..2c42f8ce 100644 --- a/man/pulse-daemon.conf.5.xml.in +++ b/man/pulse-daemon.conf.5.xml.in @@ -420,7 +420,8 @@ USA. default-rate-rate value or this alternate value, typically 44.1 or 48kHz. Switching between default and alternate values is enabled only when the sinks/sources are suspended. This option - is ignored in passthrough mode where the stream rate will be used.</p> + is ignored in passthrough mode where the stream rate will be used. + If set to zero, this feature is disabled.</p> </option> </section> diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index 0b7bbe00..8ce4ed7b 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -2201,7 +2201,8 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca u->sink->update_requested_latency = sink_update_requested_latency_cb; u->sink->set_state = sink_set_state_cb; u->sink->set_port = sink_set_port_cb; - u->sink->update_rate = sink_update_rate_cb; + if (u->sink->alternate_sample_rate) + u->sink->update_rate = sink_update_rate_cb; u->sink->userdata = u; pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq); diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c index c2794291..180baca9 100644 --- a/src/modules/alsa/alsa-source.c +++ b/src/modules/alsa/alsa-source.c @@ -1939,7 +1939,8 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p u->source->update_requested_latency = source_update_requested_latency_cb; u->source->set_state = source_set_state_cb; u->source->set_port = source_set_port_cb; - u->source->update_rate = source_update_rate_cb; + if (u->source->alternate_sample_rate) + u->source->update_rate = source_update_rate_cb; u->source->userdata = u; pa_source_set_asyncmsgq(u->source, u->thread_mq.inq); |