Add debug logs for state changes on sink
diff --git a/audio/sink.c b/audio/sink.c
index cb3ca74..770eae3 100644
--- a/audio/sink.c
+++ b/audio/sink.c
@@ -80,6 +80,13 @@
static unsigned int avdtp_callback_id = 0;
+static char *str_state[] = {
+ "SINK_STATE_DISCONNECTED",
+ "SINK_STATE_CONNECTING",
+ "SINK_STATE_CONNECTED",
+ "SINK_STATE_PLAYING",
+};
+
static const char *state2str(sink_state_t state)
{
switch (state) {
@@ -112,6 +119,9 @@
AUDIO_SINK_INTERFACE, "State",
DBUS_TYPE_STRING, &state_str);
+ DBG("State changed %s: %s -> %s", dev->path, str_state[old_state],
+ str_state[new_state]);
+
for (l = sink_callbacks; l != NULL; l = l->next) {
struct sink_state_callback *cb = l->data;
cb->cb(dev, old_state, new_state, cb->user_data);