mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	bluez5: set clock name in SCO source and sink
This commit is contained in:
		
							parent
							
								
									b4d33843a6
								
							
						
					
					
						commit
						88987101ca
					
				
					 2 changed files with 18 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -57,9 +57,12 @@ static struct spa_log_topic log_topic = SPA_LOG_TOPIC(0, "spa.bluez5.sink.sco");
 | 
			
		|||
#undef SPA_LOG_TOPIC_DEFAULT
 | 
			
		||||
#define SPA_LOG_TOPIC_DEFAULT &log_topic
 | 
			
		||||
 | 
			
		||||
#define DEFAULT_CLOCK_NAME	"clock.system.monotonic"
 | 
			
		||||
 | 
			
		||||
struct props {
 | 
			
		||||
	uint32_t min_latency;
 | 
			
		||||
	uint32_t max_latency;
 | 
			
		||||
	char clock_name[64];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define MAX_BUFFERS 32
 | 
			
		||||
| 
						 | 
				
			
			@ -167,6 +170,7 @@ static void reset_props(struct props *props)
 | 
			
		|||
{
 | 
			
		||||
	props->min_latency = default_min_latency;
 | 
			
		||||
	props->max_latency = default_max_latency;
 | 
			
		||||
	strncpy(props->clock_name, DEFAULT_CLOCK_NAME, sizeof(props->clock_name));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int impl_node_enum_params(void *object, int seq,
 | 
			
		||||
| 
						 | 
				
			
			@ -305,6 +309,11 @@ static int impl_node_set_io(void *object, uint32_t id, void *data, size_t size)
 | 
			
		|||
	switch (id) {
 | 
			
		||||
	case SPA_IO_Clock:
 | 
			
		||||
		this->clock = data;
 | 
			
		||||
		if (this->clock != NULL) {
 | 
			
		||||
			spa_scnprintf(this->clock->name,
 | 
			
		||||
					sizeof(this->clock->name),
 | 
			
		||||
					"%s", this->props.clock_name);
 | 
			
		||||
		}
 | 
			
		||||
		break;
 | 
			
		||||
	case SPA_IO_Position:
 | 
			
		||||
		this->position = data;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue