mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	Try to fix period_time/period_size problems for direct plugin slaves
This commit is contained in:
		
							parent
							
								
									00fba04f01
								
							
						
					
					
						commit
						b7e8f57314
					
				
					 4 changed files with 16 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -874,7 +874,7 @@ int _snd_pcm_dshare_open(snd_pcm_t **pcmp, const char *name,
 | 
			
		|||
	params.format = SND_PCM_FORMAT_S16;
 | 
			
		||||
	params.rate = 48000;
 | 
			
		||||
	params.channels = 2;
 | 
			
		||||
	params.period_time = 125000;	/* 0.125 seconds */
 | 
			
		||||
	params.period_time = -1;
 | 
			
		||||
	params.buffer_time = -1;
 | 
			
		||||
	bsize = psize = -1;
 | 
			
		||||
	params.periods = 3;
 | 
			
		||||
| 
						 | 
				
			
			@ -890,6 +890,10 @@ int _snd_pcm_dshare_open(snd_pcm_t **pcmp, const char *name,
 | 
			
		|||
	if (err < 0)
 | 
			
		||||
		return err;
 | 
			
		||||
 | 
			
		||||
	/* set a reasonable default */
 | 
			
		||||
	if (psize == -1 && params.period_time == -1)
 | 
			
		||||
		params.period_time = 125000;	/* 0.125 seconds */
 | 
			
		||||
 | 
			
		||||
	params.period_size = psize;
 | 
			
		||||
	params.buffer_size = bsize;
 | 
			
		||||
	err = snd_pcm_dshare_open(pcmp, name, ipc_key, ipc_perm, ¶ms, bindings, slowptr, root, sconf, stream, mode);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue