mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	bluetooth: set gain correctly
Send the right command to set the speaker and microphone gain. Note that setting the volume on the Headset should use the unsolicited result code. Receiving the volume from the Headset uses the AT command.
This commit is contained in:
		
							parent
							
								
									97807448dc
								
							
						
					
					
						commit
						398337f3db
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -285,8 +285,8 @@ static void set_speaker_gain(pa_bluetooth_transport *t, uint16_t gain) {
 | 
			
		|||
 | 
			
		||||
    t->speaker_gain = gain;
 | 
			
		||||
 | 
			
		||||
    len = sprintf(buf, "AT+VGS=%d\r", gain);
 | 
			
		||||
    pa_log_debug("RFCOMM >> AT+VGS=%d", gain);
 | 
			
		||||
    len = sprintf(buf, "\r\n+VGS=%d\r\n", gain);
 | 
			
		||||
    pa_log_debug("RFCOMM >> +VGS=%d", gain);
 | 
			
		||||
 | 
			
		||||
    written = write(trfc->rfcomm_fd, buf, len);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -304,8 +304,8 @@ static void set_microphone_gain(pa_bluetooth_transport *t, uint16_t gain) {
 | 
			
		|||
 | 
			
		||||
    t->microphone_gain = gain;
 | 
			
		||||
 | 
			
		||||
    len = sprintf(buf, "AT+VGM=%d\r", gain);
 | 
			
		||||
    pa_log_debug("RFCOMM >> AT+VGM=%d", gain);
 | 
			
		||||
    len = sprintf(buf, "\r\n+VGM=%d\r\n", gain);
 | 
			
		||||
    pa_log_debug("RFCOMM >> +VGM=%d", gain);
 | 
			
		||||
 | 
			
		||||
    written = write (trfc->rfcomm_fd, buf, len);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue