On Sun, 14 Jun 2020, at 9:18 AM, Jaroslav Kysela wrote: > Dne 10. 06. 20 v 11:20 Arun Raghavan napsal(a): > > On Wed, 10 Jun 2020, at 5:15 AM, Tanu Kaskinen wrote: > >> Hi, > >> > >> I did some work in PulseAudio's UCM code, and I got frustrated by the > >> "combined port" concept. We spend a lot of effort supporting the case > >> where one port represents multiple UCM devices, but I don't understand > >> why we do that. Do you know some use case for that? I would like to > >> drop the feature altogether. > > > > UCM has the notion of being able to have multiple concurrently active devices in a verb. For example, for a phone with headphones plugged in, when a ringtone/alarm needs to be played, you might want to enable the handset and headphone device. > > > > This is done with the SupportedDevices/ConflictDevices options in UCM. > > > > While the use case is still relevant, I'm not sure if there are better ways to do this. I'll let Jaroslav chime in on that. > > At first, there's a bug in the PA code which skips the combination of the > devices without both supported/conflicting lists: > > diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c > index 1dfb0e08b..9f7a84c52 100644 > --- a/src/modules/alsa/alsa-ucm.c > +++ b/src/modules/alsa/alsa-ucm.c > @@ -1182,9 +1182,6 @@ static int ucm_check_conformance( > return 0; > } > } > - } else { /* not support any other devices */ > - pa_log_debug("Not support any other devices"); > - return 0; > } > > pa_log_debug("Device added to combination, number %d", dev_num + 1); > > > ... but the specification is really straight about this case (use-case.h): > > "Note that at most one of the supported/conflicting devs lists has > any entries, and when neither is present, all devices are supported." > > So my above patch will follow the specification. > > The simultaneous use of UCM devices is allowed. But I agree that the usability > for the desktop is a bit questionable. Users mostly expect to route the audio > to one device. The multiple devices are a lot of noise, so I'm okay not being spec-compliant here. If this becomes problematic, we can make it a config flag on the module. Better yet, we could change the UCM spec in this regard if other clients also agree. -- Arun _______________________________________________ pulseaudio-discuss mailing list pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss