mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	appl_ptr sync fix when status/control structures are not mmaped
The prepare and reset ioctls can modify appl_ptr, thus the user space must take modified appl_ptr from driver.
This commit is contained in:
		
							parent
							
								
									37e75bfa2c
								
							
						
					
					
						commit
						6987a8555c
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -535,7 +535,7 @@ static int snd_pcm_hw_prepare(snd_pcm_t *pcm)
 | 
			
		|||
		SYSERR("SNDRV_PCM_IOCTL_PREPARE failed");
 | 
			
		||||
		return err;
 | 
			
		||||
	}
 | 
			
		||||
	return sync_ptr(hw, 0);
 | 
			
		||||
	return sync_ptr(hw, SNDRV_PCM_SYNC_PTR_APPL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int snd_pcm_hw_reset(snd_pcm_t *pcm)
 | 
			
		||||
| 
						 | 
				
			
			@ -547,7 +547,7 @@ static int snd_pcm_hw_reset(snd_pcm_t *pcm)
 | 
			
		|||
		SYSERR("SNDRV_PCM_IOCTL_RESET failed");
 | 
			
		||||
		return err;
 | 
			
		||||
	}
 | 
			
		||||
	return sync_ptr(hw, 0);
 | 
			
		||||
	return sync_ptr(hw, SNDRV_PCM_SYNC_PTR_APPL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int snd_pcm_hw_start(snd_pcm_t *pcm)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue