mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
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@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
4ffb6fd617
commit
83d44139d3
1 changed files with 6 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue