Thread (12 messages) 12 messages, 3 authors, 2012-05-25

[PATCH BlueZ 2/6] AVRCP: Fix not setting audio device connected to player

flat view
STALE5258d

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2012-05-24 13:22:47
Subsystem: the rest · Maintainer: Linus Torvalds

From: Luiz Augusto von Dentz <redacted>

While connecting device should be set to match the AVCTP session and when
disconnected reset it back to NULL.
---
 audio/avrcp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/audio/avrcp.c b/audio/avrcp.c
index cb6906d..b09fab0 100644
--- a/audio/avrcp.c
+++ b/audio/avrcp.c
@@ -1197,6 +1197,7 @@ static void state_changed(struct audio_device *dev, avctp_state_t old_state,
 	switch (new_state) {
 	case AVCTP_STATE_DISCONNECTED:
 		player->session = NULL;
+		player->dev = NULL;
 		player->registered_events = 0;
 
 		if (player->handler) {
@@ -1207,6 +1208,7 @@ static void state_changed(struct audio_device *dev, avctp_state_t old_state,
 		break;
 	case AVCTP_STATE_CONNECTING:
 		player->session = avctp_connect(&dev->src, &dev->dst);
+		player->dev = dev;
 
 		if (!player->handler)
 			player->handler = avctp_register_pdu_handler(
-- 
1.7.7.6
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help