mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	bluez5: use bigger fallback SCO mtu if kernel doesn't tell us
Use bigger fallback maximum MTU, when kernel fails to tell us, which shouldn't happen but apparently can. We choose the packet size based on incoming data, so these values aren't usually needed so we can just bump them. Also report errors as necessary.
This commit is contained in:
		
							parent
							
								
									ca0e886159
								
							
						
					
					
						commit
						44a166c288
					
				
					 2 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -1514,9 +1514,9 @@ static void sco_ready(struct spa_bt_transport *t)
 | 
			
		|||
	len = sizeof(sco_opt);
 | 
			
		||||
	memset(&sco_opt, 0, len);
 | 
			
		||||
	if (getsockopt(t->fd, SOL_SCO, SCO_OPTIONS, &sco_opt, &len) < 0) {
 | 
			
		||||
		spa_log_warn(backend->log, "getsockopt(SCO_OPTIONS) failed, using defaults");
 | 
			
		||||
		t->read_mtu = 48;
 | 
			
		||||
		t->write_mtu = 48;
 | 
			
		||||
		spa_log_warn(backend->log, "getsockopt(SCO_OPTIONS) failed: %d (%m)", errno);
 | 
			
		||||
		t->read_mtu = 144;
 | 
			
		||||
		t->write_mtu = 144;
 | 
			
		||||
	} else {
 | 
			
		||||
		spa_log_debug(backend->log, "autodetected mtu = %u", sco_opt.mtu);
 | 
			
		||||
		t->read_mtu = sco_opt.mtu;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue