mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Revert "card: Support adding ports dynamically"
This reverts commita9c3f2fb0f. It has been recently agreed that ports should somehow have some physical meaning, leading to the port merge in module-bluetooth-device. With this assumption in mind, it is very unlikely that a card would add or remove ports dynamically. Therefore, the core can be simplified by removing the support for this. The revert affects the code added to module-card-restore in commita1a0ad1af2, which can now be partially removed. Conflicts: src/pulsecore/card.c src/pulsecore/core.h
This commit is contained in:
		
							parent
							
								
									e2cb872120
								
							
						
					
					
						commit
						3d65e9c49e
					
				
					 4 changed files with 0 additions and 64 deletions
				
			
		| 
						 | 
				
			
			@ -114,25 +114,6 @@ void pa_card_add_profile(pa_card *c, pa_card_profile *profile) {
 | 
			
		|||
    pa_hook_fire(&c->core->hooks[PA_CORE_HOOK_CARD_PROFILE_ADDED], profile);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void pa_card_add_ports(pa_card *c, pa_hashmap *ports) {
 | 
			
		||||
    pa_device_port *p;
 | 
			
		||||
    void *state;
 | 
			
		||||
 | 
			
		||||
    pa_assert(c);
 | 
			
		||||
    pa_assert(ports);
 | 
			
		||||
 | 
			
		||||
    /* take ownership of the ports */
 | 
			
		||||
    PA_HASHMAP_FOREACH(p, ports, state) {
 | 
			
		||||
        p->card = c;
 | 
			
		||||
        pa_assert_se(pa_hashmap_put(c->ports, p->name, p) >= 0);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, c->index);
 | 
			
		||||
 | 
			
		||||
    while ((p = pa_hashmap_steal_first(ports)) != NULL)
 | 
			
		||||
        pa_hook_fire(&c->core->hooks[PA_CORE_HOOK_PORT_ADDED], p);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void pa_card_new_data_set_profile(pa_card_new_data *data, const char *profile) {
 | 
			
		||||
    pa_assert(data);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue