On 28. 08. 23 20:35, Pierre-Louis Bossart wrote:
On 8/28/23 12:59, Curtis Malainey wrote:
On Sat, Aug 26, 2023 at 4:28 AM Jaroslav Kysela <perex@xxxxxxxx> wrote:
On 24. 08. 23 23:33, cujomalainey@xxxxxxxxxxxx wrote:
From: Curtis Malainey <cujomalainey@xxxxxxxxxxxx>
Sometimes userspace may want to use a reference channel to cancel echos
when using video chat, this value identifies the device which carries
that channel.
The UCM modifier should be used for this - see "Echo Reference" comments in
use-case.h.
Note that this allows additional setup (in Sequences) for this stream.
Jaroslav
I was under the impression modifiers were state manipulators that
acted upon existing devices/pcms and did not designate their own PCM.
That is at least how we use them in CRAS.
Are there any examples of how to designate a PCM? I don't see any
modifiers at all in ucm-conf repo.
I will second Curtis' request for clarifications.
I naively thought that modifiers would be used to e.g. select a 'Deep
Buffer' output for low-power playback, or different capture streams
based on the needs of the applications. It's not uncommon for capture
applications to request different PCM streams for raw, AEC processed,
AEC+NS processed data.
Echo reference is not really something that varies based on any
qualifiers. And specifically in the Chrome case we want userspace to
open the PCM echo reference device whenever the playback is used. So
it's not really a use-case dependent thing but more a way to express a
dependency between PCM devices.
It seems that there are some assumptions. I will try to address some things:
You can enable/use multiple modifiers per device.
The modifiers may define extra PCM streams in the standard Value section - you
can use CapturePCM value for the modifier like "Echo Reference". Modifiers may
alter the characteristics of the original UCM device stream (using command
sequences), too.
Modifiers are an extra layer on top of devices. I don't think that we have any
default relation between the modifier PCM device and the original PCM device
(from the UCM device definition). A new value to describe this (like
"ReplacePlaybackPCM 1") may be introduced. Another issue is when multiple
modifiers with this description are active - they conflict, so it should be
described somewhere, too. Perhaps, "ConflictingModifier" array may be added to
API. But those extensions are not required for the "Echo Reference" modifier.
Jaroslav
--
Jaroslav Kysela <perex@xxxxxxxx>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.