mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	pcm: dmix: Fix semaphore usage with lockless operation
As Maarten Baert recently reported, the current dmix code applies the
semaphore unnecessarily around mixing streams even when the lockless
mix operation is used on x86.  This was rather introduced mistakenly
at the commit 267d7c7281 ("Add support of little-endian on
i386/x86_64 dmix") where the generic dmix code was included on x86,
too.
For achieving the original performance back, this patch changes the
semaphore handling to be checked at run time instead of statically at
compile time.
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
			
			
This commit is contained in:
		
							parent
							
								
									4759865c86
								
							
						
					
					
						commit
						d824b461ae
					
				
					 5 changed files with 15 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -186,6 +186,7 @@ struct snd_pcm_direct {
 | 
			
		|||
			mix_areas_32_t *remix_areas_32;
 | 
			
		||||
			mix_areas_24_t *remix_areas_24;
 | 
			
		||||
			mix_areas_u8_t *remix_areas_u8;
 | 
			
		||||
			unsigned int use_sem;
 | 
			
		||||
		} dmix;
 | 
			
		||||
		struct {
 | 
			
		||||
			unsigned long long chn_mask;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue