• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# /usr/bin/env python3
2#
3# Copyright (C) 2018 The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License"); you may not
6# use this file except in compliance with the License. You may obtain a copy of
7# the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14# License for the specific language governing permissions and limitations under
15# the License.
16
17from acts.controllers.buds_lib.apollo_utils import avrcp_actions
18from acts.controllers.buds_lib.apollo_utils import get_serial_object
19from acts.test_utils.bt import BtEnum
20from acts.test_utils.bt.bt_test_utils import clear_bonded_devices
21from acts.test_utils.coex.audio_test_utils import SshAudioCapture
22from acts.test_utils.coex.CoexBaseTest import CoexBaseTest
23from acts.test_utils.coex.coex_test_utils import connect_disconnect_a2dp_headset
24from acts.test_utils.coex.coex_test_utils import connect_ble
25from acts.test_utils.coex.coex_test_utils import connect_disconnect_headset
26from acts.test_utils.coex.coex_test_utils import multithread_func
27from acts.test_utils.coex.coex_test_utils import music_play_and_check
28from acts.test_utils.coex.coex_test_utils import pair_and_connect_headset
29from acts.test_utils.coex.coex_test_utils import perform_classic_discovery
30from acts.test_utils.coex.coex_test_utils import push_music_to_android_device
31from acts.test_utils.coex.coex_test_utils import toggle_screen_state
32from acts.test_utils.coex.coex_test_utils import start_fping
33
34AVRCP_WAIT_TIME = 5
35
36
37class ApolloWithA2dpFunctionalityTest(CoexBaseTest):
38
39    def setup_class(self):
40        super().setup_class()
41        req_params = ["serial_device", "fping_params",
42                      "audio_params", "iterations"]
43        self.unpack_userparams(req_params)
44        self.buds_device = get_serial_object(self.pri_ad, self.serial_device)
45        self.headset_mac_address = self.buds_device.bluetooth_address
46        self.music_file_to_play = push_music_to_android_device(
47            self.pri_ad, self.audio_params)
48
49    def setup_test(self):
50        super().setup_test()
51        if "a2dp_streaming" in self.current_test_name:
52            self.audio = SshAudioCapture(self.audio_params, self.log_path)
53        self.buds_device.send("ResetPair\n")
54        self.buds_device.set_pairing_mode()
55        if not pair_and_connect_headset(
56                self.pri_ad, self.headset_mac_address,
57                set([BtEnum.BluetoothProfile.A2DP.value])):
58            self.log.error("Failed to pair and connect to headset")
59            return False
60        self.buds_device.set_stay_connected(1)
61
62    def teardown_test(self):
63        if "a2dp_streaming" in self.current_test_name:
64            analysis_path = self.audio.audio_quality_analysis(self.log_path)
65            if analysis_path:
66                with open(analysis_path) as f:
67                    self.result['audio_artifacts'] = f.readline()
68            self.audio.terminate_and_store_audio_results()
69        clear_bonded_devices(self.pri_ad)
70        super().teardown_test()
71
72    def perform_classic_discovery_with_iperf(self):
73        """Wrapper function to start iperf traffic and classic discovery"""
74        self.run_iperf_and_get_result()
75        if not perform_classic_discovery(self.pri_ad,
76                self.iperf['duration'], self.json_file, self.dev_list):
77            return False
78        return self.teardown_result()
79
80    def connect_disconnect_a2dp_headset_with_iperf(self):
81        """Wrapper function to start iperf traffic and connect/disconnect
82        to headset for N iterations.
83        """
84        self.run_iperf_and_get_result()
85        if not connect_disconnect_a2dp_headset(self.pri_ad,
86                        self.headset_mac_address, self.iterations):
87            return False
88        return self.teardown_result()
89
90    def music_streaming_bluetooth_discovery_with_iperf(self):
91        """Wrapper function to start iperf traffic, music streaming and
92        classic discovery.
93        """
94        tasks = [(self.audio.capture_audio, ()),
95                 (music_play_and_check, (self.pri_ad,
96                                         self.headset_mac_address,
97                                         self.music_file_to_play,
98                                         self.audio_params['music_play_time'])),
99                 (perform_classic_discovery, (self.pri_ad,
100                                              self.iperf['duration'],
101                                              self.json_file,
102                                              self.dev_list)),
103                 (self.run_iperf_and_get_result, ())]
104        if not multithread_func(self.log, tasks):
105            return False
106        return self.teardown_result()
107
108    def music_streaming_with_iperf(self):
109        """Wrapper function to start iperf traffic and music streaming."""
110        tasks = [
111            (self.audio.capture_audio, ()),
112            (music_play_and_check, (self.pri_ad,
113                                    self.headset_mac_address,
114                                    self.music_file_to_play,
115                                    self.audio_params[
116                                        'music_play_time'])),
117            (self.run_iperf_and_get_result, ())
118        ]
119        if not multithread_func(self.log, tasks):
120            return False
121        return self.teardown_result()
122
123    def music_streaming_avrcp_controls_with_iperf(self):
124        """Wrapper function to start iperf traffic, music streaming and avrcp
125        controls.
126        """
127        tasks = [(self.audio.capture_audio, ()),
128                 (music_play_and_check, (self.pri_ad,
129                                         self.headset_mac_address,
130                                         self.music_file_to_play,
131                                         self.audio_params[
132                                             'music_play_time'])),
133                 (avrcp_actions, (self.pri_ad,
134                                  self.buds_device)),
135                 (self.run_iperf_and_get_result, ())]
136        if not multithread_func(self.log, tasks):
137            return False
138        return self.teardown_result()
139
140    def music_streaming_discovery_avrcp_controls_with_iperf(self):
141        """Wrapper function to start iperf traffic, music streaming, bluetooth
142        discovery and avrcp controls.
143        """
144        tasks = [(self.audio.capture_audio, ()),
145                 (music_play_and_check, (self.pri_ad,
146                                         self.headset_mac_address,
147                                         self.music_file_to_play,
148                                         self.audio_params[
149                                             'music_play_time'])),
150                 (perform_classic_discovery,(self.pri_ad,
151                                             self.iperf['duration'],
152                                             self.json_file,
153                                             self.dev_list)),
154                 (avrcp_actions, (self.pri_ad,
155                                  self.buds_device)),
156                 (self.run_iperf_and_get_result, ())]
157        if not multithread_func(self.log, tasks):
158            return False
159        return self.teardown_result()
160
161    def music_streaming_ble_connection_with_iperf(self):
162        """Wrapper function to start iperf traffic, music streaming and ble
163        connection.
164        """
165        tasks = [(self.audio.capture_audio, ()),
166                 (music_play_and_check, (self.pri_ad,
167                                         self.headset_mac_address,
168                                         self.music_file_to_play,
169                                         self.audio_params[
170                                             'music_play_time'])),
171                 (connect_ble, (self.pri_ad,
172                                self.inquiry_devices[0])),
173                 (self.run_iperf_and_get_result, ())]
174        if not multithread_func(self.log, tasks):
175            return False
176        return self.teardown_result()
177
178    def test_inquiry_after_headset_connection_with_tcp_ul(self):
179        """Starts TCP-uplink traffic, start inquiry after bluetooth connection.
180
181        This test is to start TCP-uplink traffic between host machine and
182        android device and test functional behaviour of bluetooth discovery
183        after connecting to headset.
184
185        Steps:
186        1. Run TCP-uplink traffic.
187        2. Start bluetooth discovery when headset is connected.
188
189        Returns:
190            True if successful, False otherwise.
191        """
192        return self.perform_classic_discovery_with_iperf()
193
194    def test_inquiry_after_headset_connection_with_tcp_dl(self):
195        """Starts TCP-downlink traffic, start inquiry after bluetooth connection.
196
197        This test is to start TCP-downlink traffic between host machine and
198        android device and test functional behaviour of bluetooth discovery
199        after connecting to headset.
200
201        Steps:
202        1. Run TCP-downlink traffic.
203        2. Start bluetooth discovery when headset is connected.
204
205        Returns:
206            True if successful, False otherwise.
207        """
208        return self.perform_classic_discovery_with_iperf()
209
210    def test_inquiry_after_headset_connection_with_udp_ul(self):
211        """Starts UDP-uplink traffic, start inquiry after bluetooth connection.
212
213        This test is to start UDP-uplink traffic between host machine and
214        android device and test functional behaviour of bluetooth discovery
215        after connecting to headset.
216
217        Steps:
218        1. Run UDP-uplink traffic.
219        2. Start bluetooth discovery when headset is connected.
220
221        Returns:
222            True if successful, False otherwise.
223
224        Test Id: Bt_CoEx_011
225        """
226        return self.perform_classic_discovery_with_iperf()
227
228    def test_inquiry_after_headset_connection_with_udp_dl(self):
229        """Starts UDP-downlink traffic, start inquiry after bluetooth connection.
230
231        This test is to start UDP-downlink traffic between host machine and
232        android device and test functional behaviour of bluetooth discovery
233        after connecting to headset.
234
235        Steps:
236        1. Run UDP-downlink traffic.
237        2. Start bluetooth discovery when headset is connected.
238
239        Returns:
240            True if successful, False otherwise.
241        """
242        return self.perform_classic_discovery_with_iperf()
243
244    def test_connect_disconnect_a2dp_headset_with_tcp_ul(self):
245        """Starts TCP-uplink traffic and connect/disconnect a2dp headset.
246
247        This test is to start TCP-uplink traffic between host machine and
248        android device and test functional behaviour of connection and
249        disconnection to a2dp headset.
250
251        Steps:
252        1. Run TCP-uplink traffic.
253        2. Connect and disconnect A2DP headset.
254        3. Repeat step 2 for N iterations.
255
256        Returns:
257            True if successful, False otherwise.
258        """
259        return self.connect_disconnect_a2dp_headset_with_iperf()
260
261    def test_connect_disconnect_a2dp_headset_with_tcp_dl(self):
262        """Starts TCP-downlink traffic and connect/disconnect a2dp headset.
263
264        This test is to start TCP-downlink traffic between host machine and
265        android device and test functional behaviour of connection and
266        disconnection to a2dp headset.
267
268        Steps:
269        1. Run TCP-downlink traffic.
270        2. Connect and disconnect A2DP headset.
271        3. Repeat step 2 for N iterations.
272
273        Returns:
274            True if successful, False otherwise.
275        """
276        return self.connect_disconnect_a2dp_headset_with_iperf()
277
278    def test_connect_disconnect_a2dp_headset_with_udp_ul(self):
279        """Starts UDP-uplink traffic and connect/disconnect a2dp headset.
280
281        This test is to start UDP-uplink traffic between host machine and
282        android device and test functional behaviour of connection and
283        disconnection to a2dp headset.
284
285        Steps:
286        1. Run UDP-uplink traffic.
287        2. Connect and disconnect A2DP headset.
288        3. Repeat step 2 for N iterations.
289
290        Returns:
291            True if successful, False otherwise.
292        """
293        return self.connect_disconnect_a2dp_headset_with_iperf()
294
295    def test_connect_disconnect_a2dp_headset_with_udp_dl(self):
296        """Starts UDP-downlink traffic and connect/disconnect a2dp headset.
297
298        This test is to start UDP-downlink traffic between host machine and
299        android device and test functional behaviour of connection and
300        disconnection to a2dp headset.
301
302        Steps:
303        1. Run UDP-downlink traffic.
304        2. Connect and disconnect A2DP headset.
305        3. Repeat step 2 for N iterations.
306
307        Returns:
308            True if successful, False otherwise.
309        """
310        return self.connect_disconnect_a2dp_headset_with_iperf()
311
312    def test_a2dp_streaming_bluetooth_discovery_with_tcp_ul(self):
313        """Starts TCP-uplink traffic, with music streaming to a2dp headset and
314        bluetooth discovery.
315
316        This test is to start TCP-uplink traffic between host machine and
317        android device and test functional behaviour of a2dp music streaming
318        and bluetooth discovery.
319
320        Steps:
321        1. Run TCP-uplink traffic.
322        2. Start media streaming to a2dp headset.
323        3. Start bluetooth discovery on android device.
324
325        Returns:
326            True if successful, False otherwise.
327        """
328        return self.music_streaming_bluetooth_discovery_with_iperf()
329
330    def test_a2dp_streaming_bluetooth_discovery_with_tcp_dl(self):
331        """Starts TCP-downlink traffic, with music streaming to a2dp headset
332        and bluetooth discovery.
333
334        This test is to start TCP-downlink traffic between host machine and
335        android device and test functional behaviour of a2dp music streaming
336        and bluetooth discovery.
337
338        Steps:
339        1. Run TCP-downlink traffic.
340        2. Start media streaming to a2dp headset.
341        3. Start bluetooth discovery on android device.
342
343        Returns:
344            True if successful, False otherwise.
345        """
346        return self.music_streaming_bluetooth_discovery_with_iperf()
347
348    def test_a2dp_streaming_bluetooth_discovery_with_udp_ul(self):
349        """Starts UDP-uplink traffic, with music streaming to a2dp headset and
350        bluetooth discovery.
351
352        This test is to start UDP-uplink traffic between host machine and
353        android device and test functional behaviour of a2dp music streaming
354        and bluetooth discovery.
355
356        Steps:
357        1. Run UDP-uplink traffic.
358        2. Start media streaming to a2dp headset.
359        3. Start bluetooth discovery on android device.
360
361        Returns:
362            True if successful, False otherwise.
363        """
364        return self.music_streaming_bluetooth_discovery_with_iperf()
365
366    def test_a2dp_streaming_bluetooth_discovery_with_udp_dl(self):
367        """Starts UDP-downlink traffic, with music streaming to a2dp headset
368        and bluetooth discovery.
369
370        This test is to start UDP-downlink traffic between host machine and
371        android device and test functional behaviour of a2dp music streaming
372        and bluetooth discovery.
373
374        Steps:
375        1. Run UDP-downlink traffic.
376        2. Start media streaming to a2dp headset.
377        3. Start bluetooth discovery on android device.
378
379        Returns:
380            True if successful, False otherwise.
381        """
382        return self.music_streaming_bluetooth_discovery_with_iperf()
383
384    def test_a2dp_streaming_with_tcp_ul(self):
385        """Starts TCP-uplink traffic with music streaming to a2dp headset.
386
387        This test is to start TCP-uplink traffic between host machine and
388        android device and test the functional behaviour of a2dp music
389        streaming.
390
391        Steps:
392        1. Run TCP-uplink traffic.
393        2. Start media streaming to a2dp headset.
394
395        Returns:
396            True if successful, False otherwise.
397        """
398        return self.music_streaming_with_iperf()
399
400    def test_a2dp_streaming_with_tcp_dl(self):
401        """Starts TCP-downlink traffic with music streaming to a2dp headset.
402
403        This test is to start TCP-downlink traffic between host machine and
404        android device and test the functional behaviour of a2dp music
405        streaming.
406
407        Steps:
408        1. Run TCP-downlink traffic.
409        2. Start media streaming to a2dp headset.
410
411        Returns:
412            True if successful, False otherwise.
413        """
414        return self.music_streaming_with_iperf()
415
416    def test_a2dp_streaming_with_udp_ul(self):
417        """Starts UDP-uplink traffic with music streaming to a2dp headset.
418
419        This test is to start UDP-uplink traffic between host machine and
420        android device and test the functional behaviour of a2dp music
421        streaming.
422
423        Steps:
424        1. Run UDP-uplink traffic.
425        2. Start media streaming to a2dp headset.
426
427        Returns:
428            True if successful, False otherwise.
429        """
430        return self.music_streaming_with_iperf()
431
432    def test_a2dp_streaming_with_udp_dl(self):
433        """Starts UDP-downlink traffic with music streaming to a2dp headset.
434
435        This test is to start UDP-downlink traffic between host machine and
436        android device and test the functional behaviour of a2dp music
437        streaming.
438
439        Steps:
440        1. Run UDP-downlink traffic.
441        2. Start media streaming to a2dp headset.
442
443        Returns:
444            True if successful, False otherwise.
445        """
446        return self.music_streaming_with_iperf()
447
448    def test_a2dp_streaming_avrcp_controls_with_tcp_ul(self):
449        """Starts TCP-uplink traffic with music streaming and avrcp controls.
450
451        This test is to start TCP-uplink traffic between host machine and
452        android device and test the functional behaviour of a2dp music
453        streaming and avrcp controls.
454
455        1. Run TCP-uplink traffic.
456        2. Start media streaming to a2dp headset.
457        3. Check all avrcp related controls.
458
459        Returns:
460            True if successful, False otherwise.
461        """
462        return self.music_streaming_avrcp_controls_with_iperf()
463
464    def test_a2dp_streaming_avrcp_controls_with_tcp_dl(self):
465        """Starts TCP-downlink traffic with music streaming and avrcp controls.
466
467        This test is to start TCP-downlink traffic between host machine and
468        android device and test the functional behaviour of a2dp music
469        streaming and avrcp controls.
470
471        1. Run TCP-downlink traffic.
472        2. Start media streaming to a2dp headset.
473        3. Check all avrcp related controls.
474
475        Returns:
476            True if successful, False otherwise.
477        """
478        return self.music_streaming_avrcp_controls_with_iperf()
479
480    def test_a2dp_streaming_avrcp_controls_with_udp_ul(self):
481        """Starts UDP-uplink traffic with music streaming and avrcp controls.
482
483        This test is to start UDP-uplink traffic between host machine and
484        android device and test the functional behaviour of a2dp music
485        streaming and avrcp controls.
486
487        1. Run UDP-uplink traffic.
488        2. Start media streaming to a2dp headset.
489        3. Check all avrcp related controls.
490
491        Returns:
492            True if successful, False otherwise.
493        """
494        return self.music_streaming_avrcp_controls_with_iperf()
495
496    def test_a2dp_streaming_avrcp_controls_with_udp_dl(self):
497        """Starts UDP-downlink traffic with music streaming and avrcp controls.
498
499        This test is to start UDP-downlink traffic between host machine and
500        android device and test the functional behaviour of a2dp music
501        streaming and avrcp controls.
502
503        1. Run UDP-downlink traffic.
504        2. Start media streaming to a2dp headset.
505        3. Check all avrcp related controls.
506
507        Returns:
508            True if successful, False otherwise.
509        """
510        return self.music_streaming_avrcp_controls_with_iperf()
511
512    def test_a2dp_streaming_avrcp_controls_bluetooth_discovery_tcp_ul(self):
513        """Starts TCP-uplink traffic with music streaming, avrcp controls and
514        bluetooth discovery.
515
516        This test is to start TCP-uplink traffic between host machine and
517        android device and test the functional behaviour of a2dp music
518        streaming, avrcp controls and bluetooth discovery.
519
520        1. Run TCP-uplink traffic.
521        2. Start media streaming to a2dp headset.
522        3. Check all avrcp related controls.
523        4. Start bluetooth discovery.
524
525        Returns:
526            True if successful, False otherwise.
527        """
528        return self.music_streaming_discovery_avrcp_controls_with_iperf()
529
530    def test_a2dp_streaming_avrcp_controls_bluetooth_discovery_tcp_dl(self):
531        """Starts TCP-downlink traffic with music streaming, avrcp controls and
532        bluetooth discovery.
533
534        This test is to start TCP-downlink traffic between host machine and
535        android device and test the functional behaviour of a2dp music
536        streaming, avrcp controls and bluetooth discovery.
537
538        1. Run TCP-downlink traffic.
539        2. Start media streaming to a2dp headset.
540        3. Check all avrcp related controls.
541        4. Start bluetooth discovery.
542
543        Returns:
544            True if successful, False otherwise.
545        """
546        return self.music_streaming_discovery_avrcp_controls_with_iperf()
547
548    def test_a2dp_streaming_avrcp_controls_bluetooth_discovery_udp_ul(self):
549        """Starts UDP-uplink traffic with music streaming, avrcp controls and
550        bluetooth discovery.
551
552        This test is to start UDP-uplink traffic between host machine and
553        android device and test the functional behaviour of a2dp music
554        streaming, avrcp controls and bluetooth discovery.
555
556        1. Run UDP-uplink traffic.
557        2. Start media streaming to a2dp headset.
558        3. Check all avrcp related controls.
559        4. Start bluetooth discovery.
560
561        Returns:
562            True if successful, False otherwise.
563        """
564        return self.music_streaming_discovery_avrcp_controls_with_iperf()
565
566    def test_a2dp_streaming_avrcp_controls_bluetooth_discovery_udp_dl(self):
567        """Starts UDP-downlink traffic with music streaming, avrcp controls and
568        bluetooth discovery.
569
570        This test is to start UDP-downlink traffic between host machine and
571        android device and test the functional behaviour of a2dp music
572        streaming, avrcp controls and bluetooth discovery.
573
574        1. Run UDP-downlink traffic.
575        2. Start media streaming to a2dp headset.
576        3. Check all avrcp related controls.
577        4. Start bluetooth discovery.
578
579        Returns:
580            True if successful, False otherwise.
581        """
582        return self.music_streaming_discovery_avrcp_controls_with_iperf()
583
584    def test_connect_disconnect_headset_with_fping(self):
585        """Starts fping, along with connection and disconnection of headset.
586
587        This test is to start fping between host machine and android device
588        with connection and disconnection of paired headset.
589
590        Steps:
591        1. Start fping.
592        2. Enable bluetooth
593        3. Connect bluetooth headset.
594        4. Disconnect bluetooth headset.
595
596        Returns:
597            True if successful, False otherwise.
598        """
599        tasks = [(start_fping, (self.pri_ad,
600                                self.iperf['duration'],
601                                self.fping_params)),
602                 (connect_disconnect_headset, (self.pri_ad,
603                                               self.headset_mac_address))]
604        return multithread_func(self.log, tasks)
605
606    def test_a2dp_streaming_with_fping(self):
607        """Starts fping along with a2dp streaming.
608
609        This test is to start fping between host machine and android device
610        and test the functional behaviour of music streaming to a2dp headset.
611
612        Steps:
613        1. Start fping.
614        1. Start media play on android device and check for music streaming.
615
616        Returns:
617            True if successful, False otherwise.
618        """
619        tasks = [(self.audio.capture_audio, ()),
620                 (start_fping, (self.pri_ad,
621                                self.iperf['duration'],
622                                self.fping_params)),
623                 (music_play_and_check, (self.pri_ad,
624                                         self.headset_mac_address,
625                                         self.music_file_to_play,
626                                         self.iperf['duration']))]
627        return multithread_func(self.log, tasks)
628
629    def test_connect_disconnect_headset_toggle_screen_state_with_fping(self):
630        """Starts fping along with connection and disconnection of the headset.
631
632        This test is to start fping between host machine and android device
633        and test the functional behaviour of connection and disconnection of
634        the paired headset when screen is off and on.
635
636        Steps:
637        1. Start fping.
638        2. Connect bluetooth headset.
639        4. Disconnect bluetooth headset.
640        5. Screen on/off.
641
642        Returns:
643            True if successful, False otherwise.
644        """
645        tasks = [(start_fping, (self.pri_ad,
646                                self.iperf['duration'],
647                                self.fping_params)),
648                 (connect_disconnect_headset, (self.pri_ad,
649                                               self.headset_mac_address)),
650                 (toggle_screen_state, (self.pri_ad,
651                                        self.iperf['duration']))]
652        return multithread_func(self.log, tasks)
653
654    def test_a2dp_streaming_toggle_screen_state_with_fping(self):
655        """Starts fping along with a2dp streaming.
656
657        This test is to start fping with traffic between host machine and
658        android device and test the functional behaviour of a2dp streaming when
659        screen turned on or off.
660
661        Steps:
662        1. Start fping.
663        2. Start media play on android device and check for music streaming.
664        3. Start screen on/off of android device multiple times.
665
666        Returns:
667            True if successful, False otherwise.
668        """
669        tasks = [(self.audio.capture_audio, ()),
670                 (start_fping, (self.pri_ad,
671                                self.iperf['duration'],
672                                self.fping_params)),
673                 (music_play_and_check, (self.pri_ad,
674                                         self.headset_mac_address,
675                                         self.music_file_to_play,
676                                         self.iperf['duration'])),
677                 (toggle_screen_state, (self.pri_ad,
678                                        self.iperf['duration']))]
679        return multithread_func(self.log, tasks)
680
681    def test_a2dp_streaming_ble_connection_with_tcp_ul(self):
682        """Starts TCP-uplink traffic with a2dp streaming and ble connection.
683
684        This test is to start TCP-uplink traffic between host machine and
685        android device and test the functional behaviour of  ble connection
686        and a2dp streaming.
687
688        Steps:
689        1. Start TCP-uplink traffic.
690        2. Start media play on android device and check for music streaming.
691        3. Initiate ble connection to android device.
692
693        Returns:
694            True if successful, False otherwise.
695        """
696        return self.music_streaming_ble_connection_with_iperf()
697
698    def test_a2dp_streaming_ble_connection_with_tcp_dl(self):
699        """Starts TCP-downlink traffic with a2dp streaming and ble connection.
700
701        This test is to start TCP-downlink traffic between host machine and
702        android device and test the functional behaviour of  ble connection
703        and a2dp streaming.
704
705        Steps:
706        1. Start TCP-downlink traffic.
707        2. Start media play on android device and check for music streaming.
708        3. Initiate ble connection to android device.
709
710        Returns:
711            True if successful, False otherwise.
712        """
713        return self.music_streaming_ble_connection_with_iperf()
714