[pulseaudio-commits] src/modules

Tanu Kaskinen tanuk at kemper.freedesktop.org
Wed Feb 6 04:00:12 PST 2013


 src/modules/alsa/alsa-ucm.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 83d44139d3550ebd867d61cf1b4564370d56e5e4
Author: David Henningsson <david.henningsson at canonical.com>
Date:   Tue Feb 5 09:22:17 2013 +0100

    alsa-ucm: Fallback to stereo duplex
    
    If 'PlaybackChannels' and 'CaptureChannels' are absent in the UCM
    file for a device, assume the device is stereo duplex.
    
    Reported-by: Luke Yelavich <luke.yelavich at canonical.com>
    Signed-off-by: David Henningsson <david.henningsson at canonical.com>

diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
index 80e98ea..9e62dcb 100644
--- a/src/modules/alsa/alsa-ucm.c
+++ b/src/modules/alsa/alsa-ucm.c
@@ -247,7 +247,12 @@ static int ucm_get_device_property(
         }
     }
 
-    pa_assert(device->playback_channels || device->capture_channels);
+    if (device->playback_channels == 0 && device->capture_channels == 0) {
+        pa_log_warn("UCM file does not specify 'PlaybackChannels' or 'CaptureChannels'"
+                    "for device %s, assuming stereo duplex.", device_name);
+        device->playback_channels = 2;
+        device->capture_channels = 2;
+    }
 
     /* get priority of device */
     if (device->playback_channels) { /* sink device */



More information about the pulseaudio-commits mailing list