[pulseaudio-commits] src/modules

Arun Raghavan arun at kemper.freedesktop.org
Sun Sep 29 20:05:43 PDT 2013


 src/modules/alsa/alsa-ucm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 24d2fa5415f660799a38295586298a96ba27b695
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date:   Mon Sep 30 08:32:16 2013 +0530

    alsa-ucm: Don't allow Playback/CaptureRate to be 0
    
    This was a review comment on the original patch that I missed fixing.

diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
index 47ff926..2c0e87e 100644
--- a/src/modules/alsa/alsa-ucm.c
+++ b/src/modules/alsa/alsa-ucm.c
@@ -263,7 +263,7 @@ static int ucm_get_device_property(
         /* get rate */
         if ((value = pa_proplist_gets(device->proplist, PA_ALSA_PROP_UCM_PLAYBACK_RATE)) ||
             (value = pa_proplist_gets(verb->proplist, PA_ALSA_PROP_UCM_PLAYBACK_RATE))) {
-            if (pa_atou(value, &ui) == 0 && ui < PA_RATE_MAX) {
+            if (pa_atou(value, &ui) > 0 && ui < PA_RATE_MAX) {
                 pa_log_debug("UCM playback device %s rate %d", device_name, ui);
                 device->playback_rate = ui;
             } else
@@ -284,7 +284,7 @@ static int ucm_get_device_property(
         /* get rate */
         if ((value = pa_proplist_gets(device->proplist, PA_ALSA_PROP_UCM_CAPTURE_RATE)) ||
             (value = pa_proplist_gets(verb->proplist, PA_ALSA_PROP_UCM_CAPTURE_RATE))) {
-            if (pa_atou(value, &ui) == 0 && ui < PA_RATE_MAX) {
+            if (pa_atou(value, &ui) > 0 && ui < PA_RATE_MAX) {
                 pa_log_debug("UCM capture device %s rate %d", device_name, ui);
                 device->capture_rate = ui;
             } else



More information about the pulseaudio-commits mailing list