mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	alsa: warn when the htimestamp seems wrong
The htimestamp should be close to the current_time, if it is further away that the threshold, something is wrong.
This commit is contained in:
		
							parent
							
								
									98f138dbe0
								
							
						
					
					
						commit
						3dab0091bb
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -2014,7 +2014,12 @@ static int get_avail(struct state *state, uint64_t current_time, snd_pcm_uframes | ||||||
| 
 | 
 | ||||||
| 		spa_log_trace_fp(state->log, "%"PRIu64" %"PRIu64" %"PRIi64, current_time, then, diff); | 		spa_log_trace_fp(state->log, "%"PRIu64" %"PRIu64" %"PRIi64, current_time, then, diff); | ||||||
| 
 | 
 | ||||||
|  | 		if (SPA_ABS(diff) < state->threshold) { | ||||||
| 			*delay += diff; | 			*delay += diff; | ||||||
|  | 		} else if ((missed = ratelimit_test(&state->rate_limit, current_time)) >= 0) { | ||||||
|  | 			spa_log_warn(state->log, "%s: (%d missed) impossible htimestamp diff:%"PRIi64, | ||||||
|  | 				state->props.device, missed, diff); | ||||||
|  | 		} | ||||||
| 	} | 	} | ||||||
| 	return SPA_MIN(avail, state->buffer_frames); | 	return SPA_MIN(avail, state->buffer_frames); | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Wim Taymans
						Wim Taymans