mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse: also update the profiles when the active one changes
This commit is contained in:
		
							parent
							
								
									efdeceddab
								
							
						
					
					
						commit
						f058f86670
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -369,8 +369,8 @@ static void device_event_info(void *object, const struct pw_device_info *info)
 | 
				
			||||||
				remove_params(&g->card_info.ports, id);
 | 
									remove_params(&g->card_info.ports, id);
 | 
				
			||||||
				g->card_info.n_ports = 0;
 | 
									g->card_info.n_ports = 0;
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			case SPA_PARAM_Route:
 | 
					 | 
				
			||||||
			case SPA_PARAM_Profile:
 | 
								case SPA_PARAM_Profile:
 | 
				
			||||||
 | 
								case SPA_PARAM_Route:
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			default:
 | 
								default:
 | 
				
			||||||
				do_enum = false;
 | 
									do_enum = false;
 | 
				
			||||||
| 
						 | 
					@ -381,9 +381,11 @@ static void device_event_info(void *object, const struct pw_device_info *info)
 | 
				
			||||||
			if (do_enum) {
 | 
								if (do_enum) {
 | 
				
			||||||
				switch (id) {
 | 
									switch (id) {
 | 
				
			||||||
				case SPA_PARAM_EnumProfile:
 | 
									case SPA_PARAM_EnumProfile:
 | 
				
			||||||
 | 
									case SPA_PARAM_Profile:
 | 
				
			||||||
					g->card_info.pending_profiles = true;
 | 
										g->card_info.pending_profiles = true;
 | 
				
			||||||
					break;
 | 
										break;
 | 
				
			||||||
				case SPA_PARAM_EnumRoute:
 | 
									case SPA_PARAM_EnumRoute:
 | 
				
			||||||
 | 
									case SPA_PARAM_Route:
 | 
				
			||||||
					g->card_info.pending_ports = true;
 | 
										g->card_info.pending_ports = true;
 | 
				
			||||||
					break;
 | 
										break;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
| 
						 | 
					@ -501,8 +503,8 @@ static void device_event_param(void *object, int seq,
 | 
				
			||||||
			pw_log_warn("device %d: can't parse profile", g->id);
 | 
								pw_log_warn("device %d: can't parse profile", g->id);
 | 
				
			||||||
			return;
 | 
								return;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		g->card_info.active_profile = index;
 | 
					 | 
				
			||||||
		pw_log_debug("device %d: current profile %d", g->id, index);
 | 
							pw_log_debug("device %d: current profile %d", g->id, index);
 | 
				
			||||||
 | 
							g->card_info.active_profile = index;
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	case SPA_PARAM_EnumRoute:
 | 
						case SPA_PARAM_EnumRoute:
 | 
				
			||||||
| 
						 | 
					@ -545,7 +547,7 @@ static void device_event_param(void *object, int seq,
 | 
				
			||||||
				index);
 | 
									index);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		ng = find_node_for_route(c, g, device);
 | 
							ng = find_node_for_route(c, g, device);
 | 
				
			||||||
		if (props && ng) {
 | 
							if (props && ng && ng->node_info.active_port != index) {
 | 
				
			||||||
			ng->node_info.active_port = index;
 | 
								ng->node_info.active_port = index;
 | 
				
			||||||
			parse_props(ng, props, true);
 | 
								parse_props(ng, props, true);
 | 
				
			||||||
			emit_event(c, ng, PA_SUBSCRIPTION_EVENT_CHANGE);
 | 
								emit_event(c, ng, PA_SUBSCRIPTION_EVENT_CHANGE);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue