mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	bluetooth: don't init profile when off
This commit is contained in:
		
							parent
							
								
									683548e8bc
								
							
						
					
					
						commit
						7a8be7f91e
					
				
					 1 changed files with 10 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -1559,6 +1559,7 @@ static int setup_bt(struct userdata *u) {
 | 
			
		|||
static int init_profile(struct userdata *u) {
 | 
			
		||||
    int r = 0;
 | 
			
		||||
    pa_assert(u);
 | 
			
		||||
    pa_assert(u->profile != PROFILE_OFF);
 | 
			
		||||
 | 
			
		||||
    if (setup_bt(u) < 0)
 | 
			
		||||
        return -1;
 | 
			
		||||
| 
						 | 
				
			
			@ -1688,6 +1689,8 @@ static int card_set_profile(pa_card *c, pa_card_profile *new_profile) {
 | 
			
		|||
    u->sample_spec = u->requested_sample_spec;
 | 
			
		||||
 | 
			
		||||
    init_bt(u);
 | 
			
		||||
 | 
			
		||||
    if (u->profile != PROFILE_OFF)
 | 
			
		||||
        init_profile(u);
 | 
			
		||||
 | 
			
		||||
    if (u->sink || u->source)
 | 
			
		||||
| 
						 | 
				
			
			@ -1909,6 +1912,7 @@ int pa__init(pa_module* m) {
 | 
			
		|||
    if (init_bt(u) < 0)
 | 
			
		||||
        goto fail;
 | 
			
		||||
 | 
			
		||||
    if (u->profile != PROFILE_OFF)
 | 
			
		||||
        if (init_profile(u) < 0)
 | 
			
		||||
            goto fail;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1948,6 +1952,7 @@ int pa__init(pa_module* m) {
 | 
			
		|||
/*         } */
 | 
			
		||||
/*     } */
 | 
			
		||||
 | 
			
		||||
    if (u->sink || u->source)
 | 
			
		||||
        if (start_thread(u) < 0)
 | 
			
		||||
            goto fail;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue