mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	alsa: add params to set default internal latency
This commit is contained in:
		
							parent
							
								
									6d196b1d11
								
							
						
					
					
						commit
						a2083d12d4
					
				
					 3 changed files with 11 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -881,6 +881,10 @@ impl_init(const struct spa_handle_factory *factory,
 | 
			
		|||
			this->default_format = spa_alsa_format_from_name(s, strlen(s));
 | 
			
		||||
		} else if (spa_streq(k, SPA_KEY_AUDIO_POSITION)) {
 | 
			
		||||
			spa_alsa_parse_position(&this->default_pos, s, strlen(s));
 | 
			
		||||
		} else if (spa_streq(k, "latency.internal.rate")) {
 | 
			
		||||
			this->process_latency.rate = atoi(s);
 | 
			
		||||
		} else if (spa_streq(k, "latency.internal.ns")) {
 | 
			
		||||
			this->process_latency.ns = atoi(s);
 | 
			
		||||
		} else if (spa_streq(k, "api.alsa.period-size")) {
 | 
			
		||||
			this->default_period_size = atoi(s);
 | 
			
		||||
		} else if (spa_streq(k, "api.alsa.headroom")) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -891,6 +891,10 @@ impl_init(const struct spa_handle_factory *factory,
 | 
			
		|||
			this->default_format = spa_alsa_format_from_name(s, strlen(s));
 | 
			
		||||
		} else if (spa_streq(k, SPA_KEY_AUDIO_POSITION)) {
 | 
			
		||||
			spa_alsa_parse_position(&this->default_pos, s, strlen(s));
 | 
			
		||||
		} else if (spa_streq(k, "latency.internal.rate")) {
 | 
			
		||||
			this->process_latency.rate = atoi(s);
 | 
			
		||||
		} else if (spa_streq(k, "latency.internal.ns")) {
 | 
			
		||||
			this->process_latency.ns = atoi(s);
 | 
			
		||||
		} else if (spa_streq(k, "api.alsa.period-size")) {
 | 
			
		||||
			this->default_period_size = atoi(s);
 | 
			
		||||
		} else if (spa_streq(k, "api.alsa.headroom")) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -102,6 +102,9 @@ rules = [
 | 
			
		|||
                #session.suspend-timeout-seconds = 5      # 0 disables suspend
 | 
			
		||||
                #monitor.channel-volumes = false
 | 
			
		||||
 | 
			
		||||
                #latency.internal.rate  = 256            # internal latency in samples
 | 
			
		||||
                #latency.internal.ns    = 256            # internal latency in nanoseconds
 | 
			
		||||
 | 
			
		||||
                #api.alsa.period-size   = 1024
 | 
			
		||||
                #api.alsa.headroom      = 0
 | 
			
		||||
                #api.alsa.start-delay   = 0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue