mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	pcm: status dump fix timestamp formatting
nanosecond part formatted with %06 will give incorrect/confusing results: trigger_time: 154.9748287 trigger_time: 154.60109090 trigger_time: 154.110425257 time seems to run backwards... This patch converts to us before printing which gives the correct/expected result: trigger_time: 154.009748 trigger_time: 154.060109 trigger_time: 154.110425 Signed-off-by: Andreas Pape <apape@de.adit-jv.com> Signed-off-by: Mounesh Sutar <sutar.mounesh@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									fe65b00f33
								
							
						
					
					
						commit
						a50496346f
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -2194,9 +2194,10 @@ int snd_pcm_status_dump(snd_pcm_status_t *status, snd_output_t *out)
 | 
			
		|||
	assert(status);
 | 
			
		||||
	snd_output_printf(out, "  state       : %s\n", snd_pcm_state_name((snd_pcm_state_t) status->state));
 | 
			
		||||
	snd_output_printf(out, "  trigger_time: %ld.%06ld\n",
 | 
			
		||||
		status->trigger_tstamp.tv_sec, status->trigger_tstamp.tv_nsec);
 | 
			
		||||
			  status->trigger_tstamp.tv_sec,
 | 
			
		||||
			  status->trigger_tstamp.tv_nsec / 1000);
 | 
			
		||||
	snd_output_printf(out, "  tstamp      : %ld.%06ld\n",
 | 
			
		||||
		status->tstamp.tv_sec, status->tstamp.tv_nsec);
 | 
			
		||||
		status->tstamp.tv_sec, status->tstamp.tv_nsec / 1000);
 | 
			
		||||
	snd_output_printf(out, "  delay       : %ld\n", (long)status->delay);
 | 
			
		||||
	snd_output_printf(out, "  avail       : %ld\n", (long)status->avail);
 | 
			
		||||
	snd_output_printf(out, "  avail_max   : %ld\n", (long)status->avail_max);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue