From aa1974b7a022db6b3733ec8247c863ca3e9e6c5d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 29 Sep 2008 21:40:52 +0200 Subject: Use the same module parameter names for module-bluetooth-device as for most other modules --- src/modules/bluetooth/module-bluetooth-device.c | 27 ++++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/modules/bluetooth') diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index e76264a4..86109f70 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -63,8 +63,8 @@ PA_MODULE_DESCRIPTION("Bluetooth audio sink and source"); PA_MODULE_VERSION(PACKAGE_VERSION); PA_MODULE_LOAD_ONCE(FALSE); PA_MODULE_USAGE( - "name= " - "addr=
" + "sink_name= " + "address=
" "profile="); struct bt_a2dp { @@ -115,8 +115,8 @@ struct userdata { }; static const char* const valid_modargs[] = { - "name", - "addr", + "sink_name", + "address", "profile", "rate", "channels", @@ -789,29 +789,32 @@ int pa__init(pa_module* m) { u->rtpoll = pa_rtpoll_new(); pa_thread_mq_init(&u->thread_mq, u->core->mainloop, u->rtpoll); u->rtpoll_item = NULL; + u->ss = m->core->default_sample_spec; if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log_error("failed to parse module arguments"); + pa_log_error("Failed to parse module arguments"); goto fail; } - if (!(u->name = pa_xstrdup(pa_modargs_get_value(ma, "name", DEFAULT_SINK_NAME)))) { - pa_log_error("failed to get device name from module arguments"); + if (!(u->name = pa_xstrdup(pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME)))) { + pa_log_error("Failed to get device name from module arguments"); goto fail; } - if (!(u->addr = pa_xstrdup(pa_modargs_get_value(ma, "addr", NULL)))) { - pa_log_error("failed to get device address from module arguments"); + if (!(u->addr = pa_xstrdup(pa_modargs_get_value(ma, "address", NULL)))) { + pa_log_error("Failed to get device address from module arguments"); goto fail; } if (!(u->profile = pa_xstrdup(pa_modargs_get_value(ma, "profile", NULL)))) { - pa_log_error("failed to get profile from module arguments"); + pa_log_error("Failed to get profile from module arguments"); goto fail; } if (pa_modargs_get_value_u32(ma, "rate", &u->ss.rate) < 0) { - pa_log_error("failed to get rate from module arguments"); + pa_log_error("Failed to get rate from module arguments"); goto fail; } + + channels = u->ss.channels; if (pa_modargs_get_value_u32(ma, "channels", &channels) < 0) { - pa_log_error("failed to get channels from module arguments"); + pa_log_error("Failed to get channels from module arguments"); goto fail; } u->ss.channels = (uint8_t) channels; -- cgit