mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	bluez5: sco-io: fallback packet size when read size unknown should be even
Reported write MTU is odd for some adapters, which will misalign CVSD frames, so round fallback value to even.
This commit is contained in:
		
							parent
							
								
									e095105e57
								
							
						
					
					
						commit
						808b54bc19
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -186,7 +186,7 @@ int spa_bt_sco_io_write(struct spa_bt_sco_io *io, uint8_t *buf, int size)
 | 
				
			||||||
	uint16_t packet_size;
 | 
						uint16_t packet_size;
 | 
				
			||||||
	uint8_t *buf_start = buf;
 | 
						uint8_t *buf_start = buf;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	packet_size = (io->read_size > 0) ? SPA_MIN(io->write_mtu, io->read_size) : io->write_mtu;
 | 
						packet_size = (io->read_size > 0) ? SPA_MIN(io->write_mtu, io->read_size) : (io->write_mtu / 2) * 2;
 | 
				
			||||||
	spa_assert(packet_size > 0);
 | 
						spa_assert(packet_size > 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (size < packet_size) {
 | 
						if (size < packet_size) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue