sink, source: Don't care about default and alternate rate in passthrough mode
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Fri, 9 Aug 2013 05:51:12 +0000 (08:51 +0300)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Fri, 23 Aug 2013 10:26:43 +0000 (13:26 +0300)
In passthrough mode the device rate is set to match the stream rate,
and the default and alternate rates are ignored.

src/pulsecore/sink.c
src/pulsecore/source.c

index 2f5174e..cd08b99 100644 (file)
@@ -1389,8 +1389,8 @@ bool pa_sink_update_rate(pa_sink *s, uint32_t rate, bool passthrough) {
     if (!s->update_rate)
         return false;
 
-    if (PA_UNLIKELY(default_rate == alternate_rate)) {
-        pa_log_warn("Default and alternate sample rates are the same.");
+    if (PA_UNLIKELY(default_rate == alternate_rate && !passthrough)) {
+        pa_log_debug("Default and alternate sample rates are the same.");
         return false;
     }
 
index 2c8d440..0029454 100644 (file)
@@ -979,8 +979,8 @@ bool pa_source_update_rate(pa_source *s, uint32_t rate, bool passthrough) {
     if (!s->update_rate)
         return false;
 
-    if (PA_UNLIKELY(default_rate == alternate_rate)) {
-        pa_log_warn("Default and alternate sample rates are the same.");
+    if (PA_UNLIKELY(default_rate == alternate_rate && !passthrough)) {
+        pa_log_debug("Default and alternate sample rates are the same.");
         return false;
     }