mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Get rid of hw_constraint function. It's code now lives inside bt_setconf().
This commit is contained in:
		
							parent
							
								
									77138dd8f7
								
							
						
					
					
						commit
						85a931f333
					
				
					 1 changed files with 4 additions and 15 deletions
				
			
		| 
						 | 
				
			
			@ -410,6 +410,10 @@ static int bt_setconf(struct userdata *u) {
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    u->ss.format = PA_SAMPLE_S16LE;
 | 
			
		||||
    u->ss.rate = u->rate;
 | 
			
		||||
    u->ss.channels = u->channels;
 | 
			
		||||
 | 
			
		||||
    memset(setconf_req, 0, BT_AUDIO_IPC_PACKET_SIZE);
 | 
			
		||||
    setconf_req->h.msg_type = BT_SETCONFIGURATION_REQ;
 | 
			
		||||
    strncpy(setconf_req->device, u->addr, 18);
 | 
			
		||||
| 
						 | 
				
			
			@ -515,14 +519,6 @@ static int bt_getstreamfd(struct userdata *u) {
 | 
			
		|||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int bt_hw_constraint(struct userdata *u) {
 | 
			
		||||
    /*TODO: A2DP */
 | 
			
		||||
    u->ss.format = PA_SAMPLE_S16LE;
 | 
			
		||||
    u->ss.rate = 8000;
 | 
			
		||||
    u->ss.channels = 1;
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
 | 
			
		||||
    struct userdata *u = PA_SINK(o)->userdata;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -768,13 +764,6 @@ int pa__init(pa_module* m) {
 | 
			
		|||
        goto fail;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* configure hw supported sample specs */
 | 
			
		||||
    e = bt_hw_constraint(u);
 | 
			
		||||
    if (e < 0) {
 | 
			
		||||
        pa_log_error("failed to configure sample spec");
 | 
			
		||||
        goto fail;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* create sink */
 | 
			
		||||
    pa_sink_new_data_init(&data);
 | 
			
		||||
    data.driver = __FILE__;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue