mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	acp: add fallback alibpref just in case
Until we are sure that everybody has a recent enough version of alsa-lib 1.2.5
This commit is contained in:
		
							parent
							
								
									1f85d06317
								
							
						
					
					
						commit
						8132c4e2b4
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
					@ -242,9 +242,13 @@ static void init_device(pa_card *impl, pa_alsa_device *dev, pa_alsa_direction_t
 | 
				
			||||||
	dev->ports = pa_hashmap_new(pa_idxset_string_hash_func,
 | 
						dev->ports = pa_hashmap_new(pa_idxset_string_hash_func,
 | 
				
			||||||
			pa_idxset_string_compare_func);
 | 
								pa_idxset_string_compare_func);
 | 
				
			||||||
	if (m->ucm_context.ucm) {
 | 
						if (m->ucm_context.ucm) {
 | 
				
			||||||
		const char *alibpref;
 | 
							const char *alibpref = NULL;
 | 
				
			||||||
		dev->ucm_context = &m->ucm_context;
 | 
							dev->ucm_context = &m->ucm_context;
 | 
				
			||||||
		if ((snd_use_case_get(impl->ucm.ucm_mgr, "_alibpref", &alibpref) == 0)) {
 | 
							if ((snd_use_case_get(impl->ucm.ucm_mgr, "_alibpref", &alibpref) != 0))
 | 
				
			||||||
 | 
								alibpref = NULL;
 | 
				
			||||||
 | 
							if (alibpref == NULL)
 | 
				
			||||||
 | 
								alibpref = spa_aprintf("_ucm%04X.", impl->card.index);
 | 
				
			||||||
 | 
							if (alibpref != NULL) {
 | 
				
			||||||
			char **d;
 | 
								char **d;
 | 
				
			||||||
			for (d = m->device_strings; *d; d++) {
 | 
								for (d = m->device_strings; *d; d++) {
 | 
				
			||||||
				if (pa_startswith(*d, alibpref)) {
 | 
									if (pa_startswith(*d, alibpref)) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue