mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	ucm: Add command 'get _file' to get the config file name of the opened card
After opening a card, this command can show the name of the actually loaded configuration file, either matches the card name or card long name. So developers can check if there is a device-sepcific configuration file available for a given card. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									4b9297e65f
								
							
						
					
					
						commit
						e93d93a8cd
					
				
					 2 changed files with 15 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1528,6 +1528,20 @@ int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
 | 
			
		|||
                        goto __end;
 | 
			
		||||
                }
 | 
			
		||||
	        err = 0;
 | 
			
		||||
	} else if (strcmp(identifier, "_file") == 0) {
 | 
			
		||||
		/* get the conf file name of the opened card */
 | 
			
		||||
		if ((uc_mgr->card_name == NULL)
 | 
			
		||||
		    || (uc_mgr->conf_file_name[0] == '\0')) {
 | 
			
		||||
			err = -ENOENT;
 | 
			
		||||
			goto __end;
 | 
			
		||||
		}
 | 
			
		||||
		*value = strndup(uc_mgr->conf_file_name, MAX_FILE);
 | 
			
		||||
		if (*value == NULL) {
 | 
			
		||||
			err = -ENOMEM;
 | 
			
		||||
			goto __end;
 | 
			
		||||
		}
 | 
			
		||||
		err = 0;
 | 
			
		||||
 | 
			
		||||
	} else if (identifier[0] == '_') {
 | 
			
		||||
		err = -ENOENT;
 | 
			
		||||
		goto __end;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue