[PATCH 3/3] android/client: Add av audio config callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux