mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	bluetooth: set better priorities for profiles
Since HSP had higher priority than A2DP, the default profile when connecting a new headset was HSP. To me it makes more sense to default to high-quality output. We already have some automatic policies to switch to HSP when it's needed. I also made the A2DP source and HSP/HFP gateway profiles have lower priority than the A2DP sink and HSP headset profiles. The A2DP source and HSP/HFP gateway profiles should only be activated if the remote device initiates audio streaming, so it makes sense to have lower priority for those profiles. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=103058
This commit is contained in:
		
							parent
							
								
									51bae8d547
								
							
						
					
					
						commit
						85daab2725
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -1861,7 +1861,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_pro
 | 
			
		|||
    switch (profile) {
 | 
			
		||||
    case PA_BLUETOOTH_PROFILE_A2DP_SINK:
 | 
			
		||||
        cp = pa_card_profile_new(name, _("High Fidelity Playback (A2DP Sink)"), sizeof(pa_bluetooth_profile_t));
 | 
			
		||||
        cp->priority = 10;
 | 
			
		||||
        cp->priority = 40;
 | 
			
		||||
        cp->n_sinks = 1;
 | 
			
		||||
        cp->n_sources = 0;
 | 
			
		||||
        cp->max_sink_channels = 2;
 | 
			
		||||
| 
						 | 
				
			
			@ -1873,7 +1873,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_pro
 | 
			
		|||
 | 
			
		||||
    case PA_BLUETOOTH_PROFILE_A2DP_SOURCE:
 | 
			
		||||
        cp = pa_card_profile_new(name, _("High Fidelity Capture (A2DP Source)"), sizeof(pa_bluetooth_profile_t));
 | 
			
		||||
        cp->priority = 10;
 | 
			
		||||
        cp->priority = 20;
 | 
			
		||||
        cp->n_sinks = 0;
 | 
			
		||||
        cp->n_sources = 1;
 | 
			
		||||
        cp->max_sink_channels = 0;
 | 
			
		||||
| 
						 | 
				
			
			@ -1885,7 +1885,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_pro
 | 
			
		|||
 | 
			
		||||
    case PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT:
 | 
			
		||||
        cp = pa_card_profile_new(name, _("Headset Head Unit (HSP/HFP)"), sizeof(pa_bluetooth_profile_t));
 | 
			
		||||
        cp->priority = 20;
 | 
			
		||||
        cp->priority = 30;
 | 
			
		||||
        cp->n_sinks = 1;
 | 
			
		||||
        cp->n_sources = 1;
 | 
			
		||||
        cp->max_sink_channels = 1;
 | 
			
		||||
| 
						 | 
				
			
			@ -1898,7 +1898,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_pro
 | 
			
		|||
 | 
			
		||||
    case PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY:
 | 
			
		||||
        cp = pa_card_profile_new(name, _("Headset Audio Gateway (HSP/HFP)"), sizeof(pa_bluetooth_profile_t));
 | 
			
		||||
        cp->priority = 20;
 | 
			
		||||
        cp->priority = 10;
 | 
			
		||||
        cp->n_sinks = 1;
 | 
			
		||||
        cp->n_sources = 1;
 | 
			
		||||
        cp->max_sink_channels = 1;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue