2023-06-15 21:27:13 +03:00
|
|
|
context.modules = [
|
|
|
|
|
{ name = libpipewire-module-protocol-native }
|
|
|
|
|
]
|
|
|
|
|
|
2023-06-23 20:15:26 +03:00
|
|
|
wireplumber.profiles = {
|
2024-09-02 17:00:53 +03:00
|
|
|
test_inherited = {
|
2023-06-23 20:15:26 +03:00
|
|
|
virtual.four = required
|
2024-09-02 17:00:53 +03:00
|
|
|
support.zero = required
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
test = {
|
|
|
|
|
inherits = [ test_inherited ]
|
|
|
|
|
support.zero = disabled
|
internal-comp-loader: implement before/after dependencies for components
In some cases, requires/wants dependencies are not enough. As we saw in
!617, the m-standard-event-source module needs to be loaded after all
the hooks, otherwise there may be missed events that the hook was
supposed to "catch", but they were delivered before the hook was actually
loaded. In a similar fashion, we have in purpose put all the "monitor"
components at the every end of the array because if we load them earlier,
they will create devices and nodes before all the hooks are in place to
react.
While in standard configuration we can work this around, in extended
user configurations with custom components, it is impossible to do this
without overriding the entire components array.
To fix this properly, introduce before/after dependencies. They work in
a similar fashion as they work with event hooks. They do not implicitly
"pull" any components to be loaded, but they affect the ordering if the
mentioned components are indeed present.
Note that for backwards compatibility reasons and unlike systemd units,
the "requires"/"wants" targets imply an "after" dependency on them.
Fixes: #600
2024-08-31 20:33:42 +03:00
|
|
|
support.nine = required
|
|
|
|
|
support.ten = required
|
|
|
|
|
support.eleven = required
|
2023-06-23 20:15:26 +03:00
|
|
|
}
|
2023-06-15 21:27:13 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
wireplumber.components = [
|
|
|
|
|
# expected load order:
|
internal-comp-loader: implement before/after dependencies for components
In some cases, requires/wants dependencies are not enough. As we saw in
!617, the m-standard-event-source module needs to be loaded after all
the hooks, otherwise there may be missed events that the hook was
supposed to "catch", but they were delivered before the hook was actually
loaded. In a similar fashion, we have in purpose put all the "monitor"
components at the every end of the array because if we load them earlier,
they will create devices and nodes before all the hooks are in place to
react.
While in standard configuration we can work this around, in extended
user configurations with custom components, it is impossible to do this
without overriding the entire components array.
To fix this properly, introduce before/after dependencies. They work in
a similar fashion as they work with event hooks. They do not implicitly
"pull" any components to be loaded, but they affect the ordering if the
mentioned components are indeed present.
Note that for backwards compatibility reasons and unlike systemd units,
the "requires"/"wants" targets imply an "after" dependency on them.
Fixes: #600
2024-08-31 20:33:42 +03:00
|
|
|
# five, one, seven, ten, eleven, six, two, three, four, nine
|
2023-06-15 21:27:13 +03:00
|
|
|
# eight is not loaded - optional feature
|
2024-09-02 17:00:53 +03:00
|
|
|
{
|
|
|
|
|
name = zero
|
|
|
|
|
type = test
|
|
|
|
|
provides = support.zero
|
|
|
|
|
}
|
2023-06-15 21:27:13 +03:00
|
|
|
{
|
|
|
|
|
name = one
|
|
|
|
|
type = test
|
|
|
|
|
provides = support.one
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
name = two
|
|
|
|
|
type = test
|
|
|
|
|
provides = support.two
|
2023-11-14 12:42:32 +02:00
|
|
|
requires = [ support.one ]
|
2023-06-15 21:27:13 +03:00
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
type = virtual
|
|
|
|
|
provides = virtual.four
|
2023-11-14 12:42:32 +02:00
|
|
|
requires = [ INVALID ]
|
2023-06-15 21:27:13 +03:00
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
name = three
|
|
|
|
|
type = test
|
2023-11-14 12:42:32 +02:00
|
|
|
provides = INVALID
|
2023-06-15 21:27:13 +03:00
|
|
|
wants = [ support.two ]
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
name = four
|
|
|
|
|
type = test
|
|
|
|
|
provides = support.four
|
|
|
|
|
requires = [ support.five ]
|
|
|
|
|
wants = [ support.three ]
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
name = five
|
|
|
|
|
type = test
|
|
|
|
|
provides = support.five
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
name = six
|
|
|
|
|
type = test
|
|
|
|
|
provides = support.six
|
|
|
|
|
requires = [ support.one ]
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
name = seven
|
|
|
|
|
type = test
|
|
|
|
|
requires = [ support.five ]
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
name = eight
|
|
|
|
|
type = test
|
|
|
|
|
provides = support.eight
|
|
|
|
|
requires = [ support.four ]
|
|
|
|
|
}
|
internal-comp-loader: implement before/after dependencies for components
In some cases, requires/wants dependencies are not enough. As we saw in
!617, the m-standard-event-source module needs to be loaded after all
the hooks, otherwise there may be missed events that the hook was
supposed to "catch", but they were delivered before the hook was actually
loaded. In a similar fashion, we have in purpose put all the "monitor"
components at the every end of the array because if we load them earlier,
they will create devices and nodes before all the hooks are in place to
react.
While in standard configuration we can work this around, in extended
user configurations with custom components, it is impossible to do this
without overriding the entire components array.
To fix this properly, introduce before/after dependencies. They work in
a similar fashion as they work with event hooks. They do not implicitly
"pull" any components to be loaded, but they affect the ordering if the
mentioned components are indeed present.
Note that for backwards compatibility reasons and unlike systemd units,
the "requires"/"wants" targets imply an "after" dependency on them.
Fixes: #600
2024-08-31 20:33:42 +03:00
|
|
|
{
|
|
|
|
|
name = nine
|
|
|
|
|
type = test
|
|
|
|
|
provides = support.nine
|
|
|
|
|
after = [ support.ten ]
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
name = ten
|
|
|
|
|
type = test
|
|
|
|
|
provides = support.ten
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
name = eleven
|
|
|
|
|
type = test
|
|
|
|
|
provides = support.eleven
|
|
|
|
|
before = [ support.nine, support.six ]
|
|
|
|
|
}
|
2023-06-15 21:27:13 +03:00
|
|
|
]
|
2023-11-14 12:42:32 +02:00
|
|
|
|
|
|
|
|
wireplumber.components.rules = [
|
|
|
|
|
{
|
|
|
|
|
matches = [
|
|
|
|
|
{
|
|
|
|
|
name = two
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
actions = {
|
|
|
|
|
merge = {
|
|
|
|
|
# final array should be [ support.one, support.six ]
|
|
|
|
|
# if this fails, support.six will not be loaded
|
|
|
|
|
requires = [ support.six ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
matches = [
|
|
|
|
|
{
|
|
|
|
|
name = three
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
actions = {
|
|
|
|
|
merge = {
|
|
|
|
|
provides = support.three
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
matches = [
|
|
|
|
|
{
|
|
|
|
|
provides = virtual.four
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
actions = {
|
|
|
|
|
override = {
|
|
|
|
|
requires = [ support.four ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|