mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	acp: use some existing keys and add some new ones
This commit is contained in:
		
							parent
							
								
									79937676a4
								
							
						
					
					
						commit
						7f7a8ccc88
					
				
					 2 changed files with 7 additions and 5 deletions
				
			
		|  | @ -50,6 +50,8 @@ extern "C" { | |||
| 									  *  used in snd_pcm_open() and | ||||
| 									  *  snd_ctl_open(). */ | ||||
| #define SPA_KEY_API_ALSA_CARD		"api.alsa.card"			/**< alsa card number */ | ||||
| #define SPA_KEY_API_ALSA_USE_UCM	"api.alsa.use-ucm"		/**< if UCM should be used */ | ||||
| #define SPA_KEY_API_ALSA_IGNORE_DB	"api.alsa.ignore-dB"		/**< if decibel info should be ignored */ | ||||
| 
 | ||||
| /** info from alsa card_info */ | ||||
| #define SPA_KEY_API_ALSA_CARD_ID	"api.alsa.card.id"		/**< id from card_info */ | ||||
|  |  | |||
|  | @ -1111,13 +1111,13 @@ struct acp_card *acp_card_new(uint32_t index, const struct acp_dict *props) | |||
| 	impl->use_ucm = true; | ||||
| 
 | ||||
| 	if (props) { | ||||
| 		if ((s = acp_dict_lookup(props, "use-ucm")) != NULL) | ||||
| 		if ((s = acp_dict_lookup(props, "api.alsa.use-ucm")) != NULL) | ||||
| 			impl->use_ucm = (strcmp(s, "true") == 0 || atoi(s) == 1); | ||||
| 		if ((s = acp_dict_lookup(props, "profile-set")) != NULL) | ||||
| 			profile_set = s; | ||||
| 		if ((s = acp_dict_lookup(props, "ignore-dB")) != NULL) | ||||
| 		if ((s = acp_dict_lookup(props, "api.alsa.ignore-dB")) != NULL) | ||||
| 			ignore_dB = (strcmp(s, "true") == 0 || atoi(s) == 1); | ||||
| 		if ((s = acp_dict_lookup(props, "profile")) != NULL) | ||||
| 		if ((s = acp_dict_lookup(props, "device.profile-set")) != NULL) | ||||
| 			profile_set = s; | ||||
| 		if ((s = acp_dict_lookup(props, "device.profile")) != NULL) | ||||
| 			profile = s; | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Wim Taymans
						Wim Taymans