media-session: try to avoid switching away from hdmi

When HDMI goes to sleep the profile becomes unavailable. Avoid
switching to Off in that case.
This commit is contained in:
Wim Taymans 2021-01-28 15:41:14 +01:00
parent fc08c79dad
commit f03deb5324
2 changed files with 7 additions and 1 deletions

View file

@ -271,6 +271,11 @@ static int handle_profile(struct device *dev)
pw_log_info("device '%s': active profile '%s' unavailable",
dev->name, pr.name);
/* ignore hdmi profile removal of unavailable, this can happen
* when the screen is put to sleep */
if (strstr(pr.name, "hdmi") != NULL)
return 0;
dev->restored = false;
}
}