From 85a931f3334c7e743a3f7afdca7e23d5989ba672 Mon Sep 17 00:00:00 2001 From: João Paulo Rechi Vita Date: Sat, 16 Aug 2008 16:00:32 -0300 Subject: Get rid of hw_constraint function. It's code now lives inside bt_setconf(). --- src/modules/module-bt-device.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'src/modules') diff --git a/src/modules/module-bt-device.c b/src/modules/module-bt-device.c index 95257dad..e808cfb7 100644 --- a/src/modules/module-bt-device.c +++ b/src/modules/module-bt-device.c @@ -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__; -- cgit