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@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
}
}
- 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 */