mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	topology: Parse HW configurations of physical DAI links in text conf file
Users can configure the runtime supported HW configurations of a physical link by SectionHWConfig. A physical link can refer multiple HW config sections in SectionLink. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									6b4d775b97
								
							
						
					
					
						commit
						f7bf8b0cc8
					
				
					 5 changed files with 236 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -133,6 +133,14 @@ static int tplg_parse_config(snd_tplg_t *tplg, snd_config_t *cfg)
 | 
			
		|||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (strcmp(id, "SectionHWConfig") == 0) {
 | 
			
		||||
			err = tplg_parse_compound(tplg, n, tplg_parse_hw_config,
 | 
			
		||||
				NULL);
 | 
			
		||||
			if (err < 0)
 | 
			
		||||
				return err;
 | 
			
		||||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (strcmp(id, "SectionLink") == 0
 | 
			
		||||
			|| strcmp(id, "SectionBE") == 0) {
 | 
			
		||||
			err = tplg_parse_compound(tplg, n, tplg_parse_link,
 | 
			
		||||
| 
						 | 
				
			
			@ -455,6 +463,7 @@ snd_tplg_t *snd_tplg_new(void)
 | 
			
		|||
	INIT_LIST_HEAD(&tplg->bytes_ext_list);
 | 
			
		||||
	INIT_LIST_HEAD(&tplg->token_list);
 | 
			
		||||
	INIT_LIST_HEAD(&tplg->tuple_list);
 | 
			
		||||
	INIT_LIST_HEAD(&tplg->hw_cfg_list);
 | 
			
		||||
 | 
			
		||||
	return tplg;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -480,6 +489,7 @@ void snd_tplg_free(snd_tplg_t *tplg)
 | 
			
		|||
	tplg_elem_free_list(&tplg->bytes_ext_list);
 | 
			
		||||
	tplg_elem_free_list(&tplg->token_list);
 | 
			
		||||
	tplg_elem_free_list(&tplg->tuple_list);
 | 
			
		||||
	tplg_elem_free_list(&tplg->hw_cfg_list);
 | 
			
		||||
 | 
			
		||||
	free(tplg);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue