mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	dmix - Enable auto format detection as default
The direct plugins have the automatic format-detection feature but it wasn't enabled properly in the interface. Now you can pass the format "unchanged" to make the plugin detect a proper format. This will change the default format of some drivers, such as, HD-audio.
This commit is contained in:
		
							parent
							
								
									91fc64cefb
								
							
						
					
					
						commit
						35d4f9b8d7
					
				
					 3 changed files with 11 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -874,7 +874,11 @@ int snd_pcm_direct_initialize_slave(snd_pcm_direct_t *dmix, snd_pcm_t *spcm, str
 | 
			
		|||
			return ret;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	ret = snd_pcm_hw_params_set_format(spcm, hw_params, params->format);
 | 
			
		||||
	if (params->format == SND_PCM_FORMAT_UNKNOWN)
 | 
			
		||||
		ret = -EINVAL;
 | 
			
		||||
	else
 | 
			
		||||
		ret = snd_pcm_hw_params_set_format(spcm, hw_params,
 | 
			
		||||
						   params->format);
 | 
			
		||||
	if (ret < 0) {
 | 
			
		||||
		static const snd_pcm_format_t dmix_formats[] = {
 | 
			
		||||
			SND_PCM_FORMAT_S32,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue