mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	acp: do not overwrite properties of PCM with that of the card
The properties of the card might overwrite those of the PCM.
For example, the cards's `alsa.id` will be set on the PCM too
since 37a51533e0 ("acp: add more properties for the card").
To avoid that, call `pa_alsa_init_proplist_card()` first
in `pa_alsa_init_proplist_pcm_info()` instead of last.
See #4135
			
			
This commit is contained in:
		
							parent
							
								
									e82a02bd89
								
							
						
					
					
						commit
						0a631d61e6
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -1020,6 +1020,9 @@ void pa_alsa_init_proplist_pcm_info(pa_core *c, pa_proplist *p, snd_pcm_info_t *
 | 
				
			||||||
    pa_assert(p);
 | 
					    pa_assert(p);
 | 
				
			||||||
    pa_assert(pcm_info);
 | 
					    pa_assert(pcm_info);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if ((card = snd_pcm_info_get_card(pcm_info)) >= 0)
 | 
				
			||||||
 | 
					        pa_alsa_init_proplist_card(c, p, card);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_proplist_sets(p, PA_PROP_DEVICE_API, "alsa");
 | 
					    pa_proplist_sets(p, PA_PROP_DEVICE_API, "alsa");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ((class = snd_pcm_info_get_class(pcm_info)) <= SND_PCM_CLASS_LAST) {
 | 
					    if ((class = snd_pcm_info_get_class(pcm_info)) <= SND_PCM_CLASS_LAST) {
 | 
				
			||||||
| 
						 | 
					@ -1048,9 +1051,6 @@ void pa_alsa_init_proplist_pcm_info(pa_core *c, pa_proplist *p, snd_pcm_info_t *
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_proplist_setf(p, "alsa.device", "%u", snd_pcm_info_get_device(pcm_info));
 | 
					    pa_proplist_setf(p, "alsa.device", "%u", snd_pcm_info_get_device(pcm_info));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ((card = snd_pcm_info_get_card(pcm_info)) >= 0)
 | 
					 | 
				
			||||||
        pa_alsa_init_proplist_card(c, p, card);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    sync_id = snd_pcm_info_get_sync(pcm_info);
 | 
					    sync_id = snd_pcm_info_get_sync(pcm_info);
 | 
				
			||||||
    pa_proplist_setf(p, "alsa.sync.id", "%08x:%08x:%08x:%08x",
 | 
					    pa_proplist_setf(p, "alsa.sync.id", "%08x:%08x:%08x:%08x",
 | 
				
			||||||
			sync_id.id32[0], sync_id.id32[1], sync_id.id32[2], sync_id.id32[3]);
 | 
								sync_id.id32[0], sync_id.id32[1], sync_id.id32[2], sync_id.id32[3]);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue