Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wireplumber
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
wireplumber
Commits
e43d2d52
Commit
e43d2d52
authored
5 years ago
by
George Kiagiadakis
Browse files
Options
Downloads
Patches
Plain Diff
softdsp-endpoint: destroy the DSP->node link when the DSP becomes idle
parent
3c201b61
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/module-pw-audio-softdsp-endpoint.c
+18
-5
18 additions, 5 deletions
modules/module-pw-audio-softdsp-endpoint.c
with
18 additions
and
5 deletions
modules/module-pw-audio-softdsp-endpoint.c
+
18
−
5
View file @
e43d2d52
...
...
@@ -91,6 +91,8 @@ on_dsp_running (WpPwAudioSoftdspEndpoint *self)
pw_properties_setf
(
props
,
PW_LINK_INPUT_PORT_ID
,
"%d"
,
-
1
);
}
g_debug
(
"%p linking DSP to node"
,
self
);
/* Create the link */
self
->
link_proxy
=
pw_core_proxy_create_object
(
self
->
core_proxy
,
"link-factory"
,
PW_TYPE_INTERFACE_Link
,
PW_VERSION_LINK
,
&
props
->
dict
,
0
);
...
...
@@ -99,6 +101,16 @@ on_dsp_running (WpPwAudioSoftdspEndpoint *self)
pw_properties_free
(
props
);
}
static
void
on_dsp_idle
(
WpPwAudioSoftdspEndpoint
*
self
)
{
if
(
self
->
link_proxy
!=
NULL
)
{
g_debug
(
"%p unlinking DSP from node"
,
self
);
pw_proxy_destroy
(
self
->
link_proxy
);
self
->
link_proxy
=
NULL
;
}
}
static
void
dsp_node_event_info
(
void
*
data
,
const
struct
pw_node_info
*
info
)
{
...
...
@@ -110,14 +122,15 @@ dsp_node_event_info (void *data, const struct pw_node_info *info)
/* Handle the different states */
switch
(
info
->
state
)
{
case
PW_NODE_STATE_IDLE
:
break
;
on_dsp_idle
(
self
);
break
;
case
PW_NODE_STATE_RUNNING
:
on_dsp_running
(
self
);
break
;
on_dsp_running
(
self
);
break
;
case
PW_NODE_STATE_SUSPENDED
:
break
;
break
;
default:
break
;
break
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment