linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] android/client: Add a2dp audio config callback
@ 2014-11-24  8:46 Jakub Tyszkowski
  2014-11-24  8:46 ` [PATCH 2/2] android/client: Add a2dp sink support Jakub Tyszkowski
  2014-11-27 17:16 ` [PATCH 1/2] android/client: Add a2dp audio config callback Szymon Janc
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Tyszkowski @ 2014-11-24  8:46 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski

This is Android 5 API callback.
---
 android/client/if-av.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/android/client/if-av.c b/android/client/if-av.c
index 8d1f69b..85c641b 100644
--- a/android/client/if-av.c
+++ b/android/client/if-av.c
@@ -50,10 +50,22 @@ static void audio_state(btav_audio_state_t state, bt_bdaddr_t *bd_addr)
 					bt_bdaddr_t2str(bd_addr, last_addr));
 }
 
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+static void audio_config(bt_bdaddr_t *bd_addr, uint32_t sample_rate,
+							uint8_t channel_count) {
+	haltest_info("%s: remote_addr=%s\n sample_rate=%d\n channel_count=%d\n",
+				__func__, bt_bdaddr_t2str(bd_addr, last_addr),
+				sample_rate, channel_count);
+}
+#endif
+
 static btav_callbacks_t av_cbacks = {
 	.size = sizeof(av_cbacks),
 	.connection_state_cb = connection_state,
-	.audio_state_cb = audio_state
+	.audio_state_cb = audio_state,
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+	.audio_config_cb = audio_config,
+#endif
 };
 
 /* init */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-27 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-24  8:46 [PATCH 1/2] android/client: Add a2dp audio config callback Jakub Tyszkowski
2014-11-24  8:46 ` [PATCH 2/2] android/client: Add a2dp sink support Jakub Tyszkowski
2014-11-27 17:16 ` [PATCH 1/2] android/client: Add a2dp audio config callback Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).