summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2011-03-02 12:41:26 +0100
committerColin Guthrie <cguthrie@mandriva.org>2011-03-11 11:49:35 +0000
commitecf09f2cd6bf2f46b0d2402c700ab618c090bd4c (patch)
treefa04aff3a62debf23ab4416fcc56e1e739512a7e /src/modules
parent5715b2af3091f9be9a656dfa9b8cb778caf1c03e (diff)
Fix up according to Coding Style
Only whitespace changes in here
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/alsa/alsa-source.c2
-rw-r--r--src/modules/alsa/alsa-util.c2
-rw-r--r--src/modules/bluetooth/bluetooth-util.c7
-rw-r--r--src/modules/bluetooth/module-bluetooth-device.c27
-rw-r--r--src/modules/echo-cancel/adrian.c12
-rw-r--r--src/modules/echo-cancel/module-echo-cancel.c23
-rw-r--r--src/modules/echo-cancel/speex.c14
-rw-r--r--src/modules/jack/module-jackdbus-detect.c30
-rw-r--r--src/modules/module-augment-properties.c4
-rw-r--r--src/modules/module-combine.c2
-rw-r--r--src/modules/module-console-kit.c2
-rw-r--r--src/modules/module-detect.c2
-rw-r--r--src/modules/module-device-manager.c6
-rw-r--r--src/modules/module-loopback.c4
-rw-r--r--src/modules/module-pipe-sink.c2
-rw-r--r--src/modules/module-rygel-media-server.c15
-rw-r--r--src/modules/module-solaris.c4
-rw-r--r--src/modules/module-tunnel.c5
-rw-r--r--src/modules/module-udev-detect.c3
-rw-r--r--src/modules/module-virtual-sink.c2
-rw-r--r--src/modules/module-virtual-source.c4
-rw-r--r--src/modules/oss/module-oss.c2
-rw-r--r--src/modules/raop/base64.c12
-rw-r--r--src/modules/raop/raop_client.c33
-rw-r--r--src/modules/rtp/rtsp_client.c6
25 files changed, 85 insertions, 140 deletions
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index 45a7af39..6d18e607 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -796,7 +796,7 @@ static void update_smoother(struct userdata *u) {
}
static pa_usec_t source_get_latency(struct userdata *u) {
- int64_t delay;
+ int64_t delay;
pa_usec_t now1, now2;
pa_assert(u);
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index 786e664d..6435db00 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -362,7 +362,7 @@ int pa_alsa_set_hw_params(
pa_log_debug("Set neither period nor buffer size.");
/* Last chance, set nothing */
- if ((ret = snd_pcm_hw_params(pcm_handle, hwparams)) < 0) {
+ if ((ret = snd_pcm_hw_params(pcm_handle, hwparams)) < 0) {
pa_log_info("snd_pcm_hw_params failed: %s", pa_alsa_strerror(ret));
goto finish;
}
diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c
index 47e0fd50..e6f6e17e 100644
--- a/src/modules/bluetooth/bluetooth-util.c
+++ b/src/modules/bluetooth/bluetooth-util.c
@@ -590,7 +590,7 @@ static void list_devices_reply(DBusPendingCall *pending, void *userdata) {
finish:
if (paths)
- dbus_free_string_array (paths);
+ dbus_free_string_array(paths);
dbus_message_unref(r);
@@ -598,8 +598,7 @@ finish:
pa_dbus_pending_free(p);
}
-static void register_endpoint(pa_bluetooth_discovery *y, const char *path, const char *endpoint, const char *uuid)
-{
+static void register_endpoint(pa_bluetooth_discovery *y, const char *path, const char *endpoint, const char *uuid) {
DBusMessage *m;
DBusMessageIter i, d;
uint8_t codec = 0;
@@ -699,7 +698,7 @@ static void list_adapters_reply(DBusPendingCall *pending, void *userdata) {
finish:
if (paths)
- dbus_free_string_array (paths);
+ dbus_free_string_array(paths);
dbus_message_unref(r);
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index dc09ffca..936d3c77 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -857,8 +857,7 @@ static int stop_stream_fd(struct userdata *u) {
return r;
}
-static void bt_transport_release(struct userdata *u)
-{
+static void bt_transport_release(struct userdata *u) {
const char *accesstype = "rw";
const pa_bluetooth_transport *t;
@@ -891,8 +890,7 @@ static void bt_transport_release(struct userdata *u)
}
}
-static int bt_transport_acquire(struct userdata *u, pa_bool_t start)
-{
+static int bt_transport_acquire(struct userdata *u, pa_bool_t start) {
const char *accesstype = "rw";
const pa_bluetooth_transport *t;
@@ -1679,8 +1677,8 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us
dbus_message_get_path(m),
dbus_message_get_member(m));
- if (!dbus_message_has_path(m, u->path))
- goto fail;
+ if (!dbus_message_has_path(m, u->path))
+ goto fail;
if (dbus_message_is_signal(m, "org.bluez.Headset", "SpeakerGainChanged") ||
dbus_message_is_signal(m, "org.bluez.Headset", "MicrophoneGainChanged")) {
@@ -2007,8 +2005,7 @@ static void shutdown_bt(struct userdata *u) {
}
}
-static int bt_transport_config_a2dp(struct userdata *u)
-{
+static int bt_transport_config_a2dp(struct userdata *u) {
const pa_bluetooth_transport *t;
struct a2dp_info *a2dp = &u->a2dp;
sbc_capabilities_raw_t *config;
@@ -2112,8 +2109,7 @@ static int bt_transport_config_a2dp(struct userdata *u)
return 0;
}
-static int bt_transport_config(struct userdata *u)
-{
+static int bt_transport_config(struct userdata *u) {
if (u->profile == PROFILE_HSP || u->profile == PROFILE_HFGW) {
u->block_size = u->link_mtu;
return 0;
@@ -2122,8 +2118,7 @@ static int bt_transport_config(struct userdata *u)
return bt_transport_config_a2dp(u);
}
-static int parse_transport_property(struct userdata *u, DBusMessageIter *i)
-{
+static int parse_transport_property(struct userdata *u, DBusMessageIter *i) {
const char *key;
DBusMessageIter variant_i;
@@ -2168,8 +2163,7 @@ static int parse_transport_property(struct userdata *u, DBusMessageIter *i)
}
/* Run from main thread */
-static int bt_transport_open(struct userdata *u)
-{
+static int bt_transport_open(struct userdata *u) {
DBusMessage *m, *r;
DBusMessageIter arg_i, element_i;
DBusError err;
@@ -2855,10 +2849,7 @@ void pa__done(pa_module *m) {
speaker = pa_sprintf_malloc("type='signal',sender='org.bluez',interface='org.bluez.Headset',member='SpeakerGainChanged',path='%s'", u->path);
mike = pa_sprintf_malloc("type='signal',sender='org.bluez',interface='org.bluez.Headset',member='MicrophoneGainChanged',path='%s'", u->path);
- pa_dbus_remove_matches(pa_dbus_connection_get(u->connection),
- speaker,
- mike,
- NULL);
+ pa_dbus_remove_matches(pa_dbus_connection_get(u->connection), speaker, mike, NULL);
pa_xfree(speaker);
pa_xfree(mike);
diff --git a/src/modules/echo-cancel/adrian.c b/src/modules/echo-cancel/adrian.c
index 446966fb..08df2edd 100644
--- a/src/modules/echo-cancel/adrian.c
+++ b/src/modules/echo-cancel/adrian.c
@@ -42,7 +42,7 @@ static const char* const valid_modargs[] = {
};
static void pa_adrian_ec_fixate_spec(pa_sample_spec *source_ss, pa_channel_map *source_map,
- pa_sample_spec *sink_ss, pa_channel_map *sink_map)
+ pa_sample_spec *sink_ss, pa_channel_map *sink_map)
{
source_ss->format = PA_SAMPLE_S16NE;
source_ss->channels = 1;
@@ -87,19 +87,18 @@ pa_bool_t pa_adrian_ec_init(pa_core *c, pa_echo_canceller *ec,
ec->params.priv.adrian.aec = AEC_init(rate, have_vector);
if (!ec->params.priv.adrian.aec)
- goto fail;
+ goto fail;
pa_modargs_free(ma);
return TRUE;
fail:
if (ma)
- pa_modargs_free(ma);
+ pa_modargs_free(ma);
return FALSE;
}
-void pa_adrian_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *play, uint8_t *out)
-{
+void pa_adrian_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *play, uint8_t *out) {
unsigned int i;
for (i = 0; i < ec->params.priv.adrian.blocksize; i += 2) {
@@ -110,8 +109,7 @@ void pa_adrian_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *
}
}
-void pa_adrian_ec_done(pa_echo_canceller *ec)
-{
+void pa_adrian_ec_done(pa_echo_canceller *ec) {
pa_xfree(ec->params.priv.adrian.aec);
ec->params.priv.adrian.aec = NULL;
}
diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index 0108c31b..0834cc14 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -290,7 +290,7 @@ static void time_callback(pa_mainloop_api *a, pa_time_event *e, const struct tim
* canceler does not work in this case. */
pa_asyncmsgq_post(u->asyncmsgq, PA_MSGOBJECT(u->source_output), SOURCE_OUTPUT_MESSAGE_APPLY_DIFF_TIME,
NULL, diff_time, NULL, NULL);
- //new_rate = base_rate - ((pa_usec_to_bytes (-diff_time, &u->source_output->sample_spec) / fs) * PA_USEC_PER_SEC) / u->adjust_time;
+ //new_rate = base_rate - ((pa_usec_to_bytes(-diff_time, &u->source_output->sample_spec) / fs) * PA_USEC_PER_SEC) / u->adjust_time;
new_rate = base_rate;
}
else {
@@ -301,7 +301,7 @@ static void time_callback(pa_mainloop_api *a, pa_time_event *e, const struct tim
}
/* recording behind playback, we need to slowly adjust the rate to match */
- //new_rate = base_rate + ((pa_usec_to_bytes (diff_time, &u->source_output->sample_spec) / fs) * PA_USEC_PER_SEC) / u->adjust_time;
+ //new_rate = base_rate + ((pa_usec_to_bytes(diff_time, &u->source_output->sample_spec) / fs) * PA_USEC_PER_SEC) / u->adjust_time;
/* assume equal samplerates for now */
new_rate = base_rate;
@@ -404,7 +404,7 @@ static int source_set_state_cb(pa_source *s, pa_source_state_t state) {
if (u->active_mask == 3)
pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);
- pa_atomic_store (&u->request_resync, 1);
+ pa_atomic_store(&u->request_resync, 1);
pa_source_output_cork(u->source_output, FALSE);
} else if (state == PA_SOURCE_SUSPENDED) {
u->active_mask &= ~1;
@@ -432,7 +432,7 @@ static int sink_set_state_cb(pa_sink *s, pa_sink_state_t state) {
if (u->active_mask == 3)
pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);
- pa_atomic_store (&u->request_resync, 1);
+ pa_atomic_store(&u->request_resync, 1);
pa_sink_input_cork(u->sink_input, FALSE);
} else if (state == PA_SINK_SUSPENDED) {
u->active_mask &= ~2;
@@ -597,7 +597,7 @@ static void apply_diff_time(struct userdata *u, int64_t diff_time) {
int64_t diff;
if (diff_time < 0) {
- diff = pa_usec_to_bytes (-diff_time, &u->source_output->sample_spec);
+ diff = pa_usec_to_bytes(-diff_time, &u->source_output->sample_spec);
if (diff > 0) {
/* add some extra safety samples to compensate for jitter in the
@@ -610,7 +610,7 @@ static void apply_diff_time(struct userdata *u, int64_t diff_time) {
u->source_skip = 0;
}
} else if (diff_time > 0) {
- diff = pa_usec_to_bytes (diff_time, &u->source_output->sample_spec);
+ diff = pa_usec_to_bytes(diff_time, &u->source_output->sample_spec);
if (diff > 0) {
pa_log("playback too far ahead (%lld), drop source %lld", (long long) diff_time, (long long) diff);
@@ -660,7 +660,7 @@ static void source_output_push_cb(pa_source_output *o, const pa_memchunk *chunk)
u->in_push = FALSE;
if (pa_atomic_cmpxchg (&u->request_resync, 1, 0)) {
- do_resync (u);
+ do_resync(u);
}
pa_memblockq_push_align(u->source_memblockq, chunk);
@@ -770,7 +770,7 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
if (i->thread_info.underrun_for > 0) {
pa_log_debug("Handling end of underrun.");
- pa_atomic_store (&u->request_resync, 1);
+ pa_atomic_store(&u->request_resync, 1);
}
/* let source thread handle the chunk. pass the sample count as well so that
@@ -926,7 +926,7 @@ static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
pa_log_debug("Sink input update max rewind %lld", (long long) nbytes);
- pa_memblockq_set_maxrewind (u->sink_memblockq, nbytes);
+ pa_memblockq_set_maxrewind(u->sink_memblockq, nbytes);
pa_sink_set_max_rewind_within_thread(u->sink, nbytes);
}
@@ -1300,8 +1300,7 @@ static void sink_input_mute_changed_cb(pa_sink_input *i) {
pa_sink_mute_changed(u->sink, i->muted);
}
-static pa_echo_canceller_method_t get_ec_method_from_string(const char *method)
-{
+static pa_echo_canceller_method_t get_ec_method_from_string(const char *method) {
if (strcmp(method, "speex") == 0)
return PA_ECHO_CANCELLER_SPEEX;
else if (strcmp(method, "adrian") == 0)
@@ -1615,7 +1614,7 @@ int pa__init(pa_module*m) {
return 0;
- fail:
+fail:
if (ma)
pa_modargs_free(ma);
diff --git a/src/modules/echo-cancel/speex.c b/src/modules/echo-cancel/speex.c
index 7851510b..ce361fc3 100644
--- a/src/modules/echo-cancel/speex.c
+++ b/src/modules/echo-cancel/speex.c
@@ -40,7 +40,7 @@ static const char* const valid_modargs[] = {
};
static void pa_speex_ec_fixate_spec(pa_sample_spec *source_ss, pa_channel_map *source_map,
- pa_sample_spec *sink_ss, pa_channel_map *sink_map)
+ pa_sample_spec *sink_ss, pa_channel_map *sink_map)
{
source_ss->format = PA_SAMPLE_S16NE;
@@ -91,7 +91,7 @@ pa_bool_t pa_speex_ec_init(pa_core *c, pa_echo_canceller *ec,
ec->params.priv.speex.state = speex_echo_state_init_mc (framelen, (rate * filter_size_ms) / 1000, source_ss->channels, source_ss->channels);
if (!ec->params.priv.speex.state)
- goto fail;
+ goto fail;
speex_echo_ctl(ec->params.priv.speex.state, SPEEX_ECHO_SET_SAMPLING_RATE, &rate);
@@ -100,17 +100,15 @@ pa_bool_t pa_speex_ec_init(pa_core *c, pa_echo_canceller *ec,
fail:
if (ma)
- pa_modargs_free(ma);
+ pa_modargs_free(ma);
return FALSE;
}
-void pa_speex_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *play, uint8_t *out)
-{
+void pa_speex_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *play, uint8_t *out) {
speex_echo_cancellation(ec->params.priv.speex.state, (const spx_int16_t *) rec, (const spx_int16_t *) play, (spx_int16_t *) out);
}
-void pa_speex_ec_done(pa_echo_canceller *ec)
-{
- speex_echo_state_destroy (ec->params.priv.speex.state);
+void pa_speex_ec_done(pa_echo_canceller *ec) {
+ speex_echo_state_destroy(ec->params.priv.speex.state);
ec->params.priv.speex.state = NULL;
}
diff --git a/src/modules/jack/module-jackdbus-detect.c b/src/modules/jack/module-jackdbus-detect.c
index f635b233..c3dd7bb2 100644
--- a/src/modules/jack/module-jackdbus-detect.c
+++ b/src/modules/jack/module-jackdbus-detect.c
@@ -84,8 +84,7 @@ struct userdata {
};
-static void ensure_ports_stopped(struct userdata* u)
-{
+static void ensure_ports_stopped(struct userdata* u) {
int i;
pa_assert(u);
@@ -97,8 +96,7 @@ static void ensure_ports_stopped(struct userdata* u)
}
}
-static void ensure_ports_started(struct userdata* u)
-{
+static void ensure_ports_started(struct userdata* u) {
int i;
pa_assert(u);
@@ -120,8 +118,7 @@ static void ensure_ports_started(struct userdata* u)
}
-static pa_bool_t check_service_started(struct userdata* u)
-{
+static pa_bool_t check_service_started(struct userdata* u) {
DBusError error;
DBusMessage *m = NULL, *reply = NULL;
pa_bool_t new_status = FALSE;
@@ -169,8 +166,7 @@ finish:
return new_status;
}
-static DBusHandlerResult dbus_filter_handler(DBusConnection *c, DBusMessage *s, void *userdata)
-{
+static DBusHandlerResult dbus_filter_handler(DBusConnection *c, DBusMessage *s, void *userdata) {
struct userdata *u = NULL;
DBusError error;
@@ -182,13 +178,11 @@ static DBusHandlerResult dbus_filter_handler(DBusConnection *c, DBusMessage *s,
if (dbus_message_is_signal(s, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) {
const char *name, *old, *new;
- if (!dbus_message_get_args(
- s,
- &error,
- DBUS_TYPE_STRING, &name,
- DBUS_TYPE_STRING, &old,
- DBUS_TYPE_STRING, &new,
- DBUS_TYPE_INVALID))
+ if (!dbus_message_get_args(s, &error,
+ DBUS_TYPE_STRING, &name,
+ DBUS_TYPE_STRING, &old,
+ DBUS_TYPE_STRING, &new,
+ DBUS_TYPE_INVALID))
goto finish;
if (strcmp(name, JACK_SERVICE_NAME))
goto finish;
@@ -211,8 +205,7 @@ finish:
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
-int pa__init(pa_module *m)
-{
+int pa__init(pa_module *m) {
DBusError error;
pa_dbus_connection *connection = NULL;
struct userdata *u = NULL;
@@ -275,8 +268,7 @@ fail:
return -1;
}
-void pa__done(pa_module *m)
-{
+void pa__done(pa_module *m) {
struct userdata *u;
pa_assert(m);
diff --git a/src/modules/module-augment-properties.c b/src/modules/module-augment-properties.c
index 8044b663..2961dd6d 100644
--- a/src/modules/module-augment-properties.c
+++ b/src/modules/module-augment-properties.c
@@ -191,9 +191,7 @@ static void update_rule(struct rule *r) {
continue;
pa_xfree(fn);
- fn = pa_sprintf_malloc(DESKTOPFILEDIR
- PA_PATH_SEP "%s" PA_PATH_SEP "%s.desktop",
- dir->d_name, r->process_name);
+ fn = pa_sprintf_malloc(DESKTOPFILEDIR PA_PATH_SEP "%s" PA_PATH_SEP "%s.desktop", dir->d_name, r->process_name);
if (stat(fn, &st) == 0) {
found = TRUE;
diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c
index 3104ed68..ab93c05e 100644
--- a/src/modules/module-combine.c
+++ b/src/modules/module-combine.c
@@ -557,7 +557,7 @@ static int sink_input_process_msg(pa_msgobject *obj, int code, void *data, int64
switch (code) {
case PA_SINK_INPUT_MESSAGE_GET_LATENCY: {
- pa_usec_t *r = data;
+ pa_usec_t *r = data;
*r = pa_bytes_to_usec(pa_memblockq_get_length(o->memblockq), &o->sink_input->sample_spec);
diff --git a/src/modules/module-console-kit.c b/src/modules/module-console-kit.c
index 875852f3..d52cc244 100644
--- a/src/modules/module-console-kit.c
+++ b/src/modules/module-console-kit.c
@@ -77,7 +77,7 @@ static void add_session(struct userdata *u, const char *id) {
struct session *session;
pa_client_new_data data;
- dbus_error_init (&error);
+ dbus_error_init(&error);
if (pa_hashmap_get(u->sessions, id)) {
pa_log_warn("Duplicate session %s, ignoring.", id);
diff --git a/src/modules/module-detect.c b/src/modules/module-detect.c
index 1fe8eb8b..2a90eb63 100644
--- a/src/modules/module-detect.c
+++ b/src/modules/module-detect.c
@@ -144,7 +144,7 @@ static int detect_oss(pa_core *c, int just_one) {
line[strcspn(line, "\r\n")] = 0;
if (!b) {
- b = strcmp(line, "Audio devices:") == 0 || strcmp(line, "Installed devices:") == 0;
+ b = strcmp(line, "Audio devices:") == 0 || strcmp(line, "Installed devices:") == 0;
continue;
}
diff --git a/src/modules/module-device-manager.c b/src/modules/module-device-manager.c
index eda6787e..73b86a20 100644
--- a/src/modules/module-device-manager.c
+++ b/src/modules/module-device-manager.c
@@ -1174,7 +1174,7 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
goto fail;
if (PA_INVALID_INDEX == (role_index = get_role_index(role)))
- goto fail;
+ goto fail;
/* Cycle through the devices given and make sure they exist */
h = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
@@ -1209,9 +1209,7 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
if (first) {
first = FALSE;
sink_mode = (0 == strncmp("sink:", s, 5));
- } else if ((sink_mode && 0 != strncmp("sink:", s, 5))
- || (!sink_mode && 0 != strncmp("source:", s, 7)))
- {
+ } else if ((sink_mode && 0 != strncmp("sink:", s, 5)) || (!sink_mode && 0 != strncmp("source:", s, 7))) {
while ((device = pa_hashmap_steal_first(h))) {
pa_xfree(device->device);
pa_xfree(device);
diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c
index 8cabf71b..9a8640b1 100644
--- a/src/modules/module-loopback.c
+++ b/src/modules/module-loopback.c
@@ -437,9 +437,9 @@ static int sink_input_process_msg_cb(pa_msgobject *obj, int code, void *data, in
switch (code) {
case PA_SINK_INPUT_MESSAGE_GET_LATENCY: {
- pa_usec_t *r = data;
+ pa_usec_t *r = data;
- pa_sink_input_assert_io_context(u->sink_input);
+ pa_sink_input_assert_io_context(u->sink_input);
*r = pa_bytes_to_usec(pa_memblockq_get_length(u->memblockq), &u->sink_input->sample_spec);
diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c
index 4ed91aae..b1158d38 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
@@ -362,7 +362,7 @@ void pa__done(pa_module*m) {
pa_sink_unref(u->sink);
if (u->memchunk.memblock)
- pa_memblock_unref(u->memchunk.memblock);
+ pa_memblock_unref(u->memchunk.memblock);
if (u->rtpoll_item)
pa_rtpoll_item_free(u->rtpoll_item);
diff --git a/src/modules/module-rygel-media-server.c b/src/modules/module-rygel-media-server.c
index 76b485c3..9d23e8a4 100644
--- a/src/modules/module-rygel-media-server.c
+++ b/src/modules/module-rygel-media-server.c
@@ -723,10 +723,7 @@ static DBusHandlerResult root_handler(DBusConnection *c, DBusMessage *m, void *u
const char *xml = ROOT_INTROSPECT_XML;
pa_assert_se(r = dbus_message_new_method_return(m));
- pa_assert_se(dbus_message_append_args(
- r,
- DBUS_TYPE_STRING, &xml,
- DBUS_TYPE_INVALID));
+ pa_assert_se(dbus_message_append_args(r, DBUS_TYPE_STRING, &xml, DBUS_TYPE_INVALID));
} else
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
@@ -938,10 +935,7 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
xml = pa_strbuf_tostring_free(sb);
pa_assert_se(r = dbus_message_new_method_return(m));
- pa_assert_se(dbus_message_append_args(
- r,
- DBUS_TYPE_STRING, &xml,
- DBUS_TYPE_INVALID));
+ pa_assert_se(dbus_message_append_args(r, DBUS_TYPE_STRING, &xml, DBUS_TYPE_INVALID));
pa_xfree(xml);
} else
@@ -1012,10 +1006,7 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
ITEM_INTROSPECT_XML;
pa_assert_se(r = dbus_message_new_method_return(m));
- pa_assert_se(dbus_message_append_args(
- r,
- DBUS_TYPE_STRING, &xml,
- DBUS_TYPE_INVALID));
+ pa_assert_se(dbus_message_append_args(r, DBUS_TYPE_STRING, &xml, DBUS_TYPE_INVALID));
} else
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c
index 5c1a86c2..ee06b3be 100644
--- a/src/modules/module-solaris.c
+++ b/src/modules/module-solaris.c
@@ -307,8 +307,8 @@ static int auto_format(int fd, int mode, pa_sample_spec *ss) {
info.record.encoding = AUDIO_ENCODING_LINEAR;
break;
default:
- pa_log("AUDIO_SETINFO: Unsupported sample format.");
- return -1;
+ pa_log("AUDIO_SETINFO: Unsupported sample format.");
+ return -1;
}
}
diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index 176c2c00..f0c254bc 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -379,7 +379,7 @@ static void command_stream_buffer_attr_changed(pa_pdispatch *pd, uint32_t comman
/* Called from main context */
static void command_started(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- struct userdata *u = userdata;
+ struct userdata *u = userdata;
pa_assert(pd);
pa_assert(t);
@@ -973,8 +973,7 @@ static void server_info_cb(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa
pa_tagstruct_gets(t, &default_sink_name) < 0 ||
pa_tagstruct_gets(t, &default_source_name) < 0 ||
pa_tagstruct_getu32(t, &cookie) < 0 ||
- (u->version >= 15 &&
- pa_tagstruct_get_channel_map(t, &cm) < 0)) {
+ (u->version >= 15 && pa_tagstruct_get_channel_map(t, &cm) < 0)) {
pa_log("Parse failure");
goto fail;
diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c
index 1eaa84fd..63ad1952 100644
--- a/src/modules/module-udev-detect.c
+++ b/src/modules/module-udev-detect.c
@@ -442,8 +442,7 @@ static void process_device(struct userdata *u, struct udev_device *dev) {
if (action && pa_streq(action, "remove"))
remove_card(u, dev);
- else if ((!action || pa_streq(action, "change")) &&
- udev_device_get_property_value(dev, "SOUND_INITIALIZED"))
+ else if ((!action || pa_streq(action, "change")) && udev_device_get_property_value(dev, "SOUND_INITIALIZED"))
card_changed(u, dev);
/* For an explanation why we don't look for 'add' events here
diff --git a/src/modules/module-virtual-sink.c b/src/modules/module-virtual-sink.c
index 58ea932d..cc134900 100644
--- a/src/modules/module-virtual-sink.c
+++ b/src/modules/module-virtual-sink.c
@@ -620,7 +620,7 @@ int pa__init(pa_module*m) {
return 0;
- fail:
+fail:
if (ma)
pa_modargs_free(ma);
diff --git a/src/modules/module-virtual-source.c b/src/modules/module-virtual-source.c
index d7e1c21c..b8f2ab06 100644
--- a/src/modules/module-virtual-source.c
+++ b/src/modules/module-virtual-source.c
@@ -715,7 +715,7 @@ int pa__init(pa_module*m) {
return 0;
- fail:
+fail:
if (ma)
pa_modargs_free(ma);
@@ -763,7 +763,7 @@ void pa__done(pa_module*m) {
pa_memblockq_free(u->memblockq);
if (u->sink_memblockq)
- pa_memblockq_free(u->sink_memblockq);
+ pa_memblockq_free(u->sink_memblockq);
pa_xfree(u);
}
diff --git a/src/modules/oss/module-oss.c b/src/modules/oss/module-oss.c
index c9dc4e7a..84dbbdaf 100644
--- a/src/modules/oss/module-oss.c
+++ b/src/modules/oss/module-oss.c
@@ -169,7 +169,7 @@ static void trigger(struct userdata *u, pa_bool_t quick) {
if (u->fd < 0)
return;
- pa_log_debug("trigger");
+ pa_log_debug("trigger");
if (u->source && PA_SOURCE_IS_OPENED(u->source->thread_info.state))
enable_bits |= PCM_ENABLE_INPUT;
diff --git a/src/modules/raop/base64.c b/src/modules/raop/base64.c
index 5b061034..37e47628 100644
--- a/src/modules/raop/base64.c
+++ b/src/modules/raop/base64.c
@@ -38,8 +38,7 @@
static const char base64_chars[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-static int pos(char c)
-{
+static int pos(char c) {
if (c >= 'A' && c <= 'Z') return c - 'A' + 0;
if (c >= 'a' && c <= 'z') return c - 'a' + 26;
if (c >= '0' && c <= '9') return c - '0' + 52;
@@ -48,8 +47,7 @@ static int pos(char c)
return -1;
}
-int pa_base64_encode(const void *data, int size, char **str)
-{
+int pa_base64_encode(const void *data, int size, char **str) {
char *s, *p;
int i;
int c;
@@ -84,8 +82,7 @@ int pa_base64_encode(const void *data, int size, char **str)
#define DECODE_ERROR 0xffffffff
-static unsigned int token_decode(const char *token)
-{
+static unsigned int token_decode(const char *token) {
int i;
unsigned int val = 0;
int marker = 0;
@@ -109,8 +106,7 @@ static unsigned int token_decode(const char *token)
return (marker << 24) | val;
}
-int pa_base64_decode(const char *str, void *data)
-{
+int pa_base64_decode(const char *str, void *data) {
const char *p;
unsigned char *q;
diff --git a/src/modules/raop/raop_client.c b/src/modules/raop/raop_client.c
index e3152dd3..68ddabea 100644
--- a/src/modules/raop/raop_client.c
+++ b/src/modules/raop/raop_client.c
@@ -174,8 +174,7 @@ static int rsa_encrypt(uint8_t *text, int len, uint8_t *res) {
return size;
}
-static int aes_encrypt(pa_raop_client* c, uint8_t *data, int size)
-{
+static int aes_encrypt(pa_raop_client* c, uint8_t *data, int size) {
uint8_t *buf;
int i=0, j;
@@ -194,8 +193,7 @@ static int aes_encrypt(pa_raop_client* c, uint8_t *data, int size)
return i;
}
-static inline void rtrimchar(char *str, char rc)
-{
+static inline void rtrimchar(char *str, char rc) {
char *sp = str + strlen(str) - 1;
while (sp >= str && *sp == rc) {
*sp = '\0';
@@ -232,8 +230,7 @@ static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata
c->callback(c->fd, c->userdata);
}
-static void rtsp_cb(pa_rtsp_client *rtsp, pa_rtsp_state state, pa_headerlist* headers, void *userdata)
-{
+static void rtsp_cb(pa_rtsp_client *rtsp, pa_rtsp_state state, pa_headerlist* headers, void *userdata) {
pa_raop_client* c = userdata;
pa_assert(c);
pa_assert(rtsp);
@@ -368,8 +365,7 @@ static void rtsp_cb(pa_rtsp_client *rtsp, pa_rtsp_state state, pa_headerlist* he
}
}
-pa_raop_client* pa_raop_client_new(pa_core *core, const char* host)
-{
+pa_raop_client* pa_raop_client_new(pa_core *core, const char* host) {
pa_raop_client* c = pa_xnew0(pa_raop_client, 1);
pa_assert(core);
@@ -387,8 +383,7 @@ pa_raop_client* pa_raop_client_new(pa_core *core, const char* host)
}
-void pa_raop_client_free(pa_raop_client* c)
-{
+void pa_raop_client_free(pa_raop_client* c) {
pa_assert(c);
if (c->rtsp)
@@ -398,8 +393,7 @@ void pa_raop_client_free(pa_raop_client* c)
}
-int pa_raop_connect(pa_raop_client* c)
-{
+int pa_raop_connect(pa_raop_client* c) {
char *sci;
struct {
uint32_t a;
@@ -433,8 +427,7 @@ int pa_raop_connect(pa_raop_client* c)
}
-int pa_raop_flush(pa_raop_client* c)
-{
+int pa_raop_flush(pa_raop_client* c) {
pa_assert(c);
pa_rtsp_flush(c->rtsp, c->seq, c->rtptime);
@@ -442,8 +435,7 @@ int pa_raop_flush(pa_raop_client* c)
}
-int pa_raop_client_set_volume(pa_raop_client* c, pa_volume_t volume)
-{
+int pa_raop_client_set_volume(pa_raop_client* c, pa_volume_t volume) {
int rv;
double db;
char *param;
@@ -465,8 +457,7 @@ int pa_raop_client_set_volume(pa_raop_client* c, pa_volume_t volume)
}
-int pa_raop_client_encode_sample(pa_raop_client* c, pa_memchunk* raw, pa_memchunk* encoded)
-{
+int pa_raop_client_encode_sample(pa_raop_client* c, pa_memchunk* raw, pa_memchunk* encoded) {
uint16_t len;
size_t bufmax;
uint8_t *bp, bpos;
@@ -548,16 +539,14 @@ int pa_raop_client_encode_sample(pa_raop_client* c, pa_memchunk* raw, pa_memchun
}
-void pa_raop_client_set_callback(pa_raop_client* c, pa_raop_client_cb_t callback, void *userdata)
-{
+void pa_raop_client_set_callback(pa_raop_client* c, pa_raop_client_cb_t callback, void *userdata) {
pa_assert(c);
c->callback = callback;
c->userdata = userdata;
}
-void pa_raop_client_set_closed_callback(pa_raop_client* c, pa_raop_client_closed_cb_t callback, void *userdata)
-{
+void pa_raop_client_set_closed_callback(pa_raop_client* c, pa_raop_client_closed_cb_t callback, void *userdata) {
pa_assert(c);
c->closed_callback = callback;
diff --git a/src/modules/rtp/rtsp_client.c b/src/modules/rtp/rtsp_client.c
index 6094eb82..72702cba 100644
--- a/src/modules/rtp/rtsp_client.c
+++ b/src/modules/rtp/rtsp_client.c
@@ -372,8 +372,7 @@ void pa_rtsp_set_url(pa_rtsp_client* c, const char* url) {
c->url = pa_xstrdup(url);
}
-void pa_rtsp_add_header(pa_rtsp_client *c, const char* key, const char* value)
-{
+void pa_rtsp_add_header(pa_rtsp_client *c, const char* key, const char* value) {
pa_assert(c);
pa_assert(key);
pa_assert(value);
@@ -381,8 +380,7 @@ void pa_rtsp_add_header(pa_rtsp_client *c, const char* key, const char* value)
pa_headerlist_puts(c->headers, key, value);
}
-void pa_rtsp_remove_header(pa_rtsp_client *c, const char* key)
-{
+void pa_rtsp_remove_header(pa_rtsp_client *c, const char* key) {
pa_assert(c);
pa_assert(key);