mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	ucm: handle correctly Linked configuration
BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/54 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
		
							parent
							
								
									cebe0fe0f9
								
							
						
					
					
						commit
						d77fb47318
					
				
					 1 changed files with 17 additions and 0 deletions
				
			
		| 
						 | 
					@ -41,6 +41,12 @@
 | 
				
			||||||
 * misc
 | 
					 * misc
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int get_value(snd_use_case_mgr_t *uc_mgr,
 | 
				
			||||||
 | 
								const char *identifier,
 | 
				
			||||||
 | 
								char **value,
 | 
				
			||||||
 | 
								const char *mod_dev_name,
 | 
				
			||||||
 | 
								const char *verb_name,
 | 
				
			||||||
 | 
								int exact);
 | 
				
			||||||
static int get_value1(snd_use_case_mgr_t *uc_mgr, char **value,
 | 
					static int get_value1(snd_use_case_mgr_t *uc_mgr, char **value,
 | 
				
			||||||
                      struct list_head *value_list, const char *identifier);
 | 
					                      struct list_head *value_list, const char *identifier);
 | 
				
			||||||
static int get_value3(snd_use_case_mgr_t *uc_mgr,
 | 
					static int get_value3(snd_use_case_mgr_t *uc_mgr,
 | 
				
			||||||
| 
						 | 
					@ -575,6 +581,17 @@ static int import_master_config(snd_use_case_mgr_t *uc_mgr)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static int check_empty_configuration(snd_use_case_mgr_t *uc_mgr)
 | 
					static int check_empty_configuration(snd_use_case_mgr_t *uc_mgr)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						int err;
 | 
				
			||||||
 | 
						char *value;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						err = get_value(uc_mgr, "Linked", &value, NULL, NULL, 1);
 | 
				
			||||||
 | 
						if (err >= 0) {
 | 
				
			||||||
 | 
							err = strcasecmp(value, "true") == 0 ||
 | 
				
			||||||
 | 
							      strcmp(value, "1") == 0;
 | 
				
			||||||
 | 
							free(value);
 | 
				
			||||||
 | 
							if (err)
 | 
				
			||||||
 | 
								return 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if (!list_empty(&uc_mgr->verb_list))
 | 
						if (!list_empty(&uc_mgr->verb_list))
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
	if (!list_empty(&uc_mgr->boot_list))
 | 
						if (!list_empty(&uc_mgr->boot_list))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue