mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	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:
		
							parent
							
								
									fc08c79dad
								
							
						
					
					
						commit
						f03deb5324
					
				
					 2 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -372,6 +372,7 @@ static struct route_info *find_route_info(struct device *dev, struct route *r)
 | 
			
		|||
	if (i == NULL)
 | 
			
		||||
		return NULL;
 | 
			
		||||
 | 
			
		||||
	pw_log_info("device %d: new route %d '%s' found", dev->id, r->index, r->name);
 | 
			
		||||
	i->index = r->index;
 | 
			
		||||
	i->generation = dev->generation;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -417,8 +418,8 @@ static int handle_route(struct device *dev, struct route *r)
 | 
			
		|||
			add_idle_timeout(impl);
 | 
			
		||||
		}
 | 
			
		||||
		free(val);
 | 
			
		||||
		i->generation = dev->generation;
 | 
			
		||||
	}
 | 
			
		||||
	i->generation = dev->generation;
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue