1#!/usr/bin/env python3 2# 3# Copyright (C) 2017 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""" 17This test script exercises power test scenarios for A2DP streaming with 18 5 codec types, 4 sample rate values, 3 bits per sample values, 19 2 music file types and 3 LDAC playback quality values. 20 21This test script was designed with this setup in mind: 22Shield box one: Android Device, headset and Monsoon tool box 23""" 24 25import json 26import os 27import time 28import sys 29 30from acts import logger 31from acts.controllers import monsoon 32from acts.keys import Config 33from acts.test_decorators import test_tracker_info 34from acts.test_utils.bt.bt_constants import ble_scan_settings_modes 35from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest 36from acts.test_utils.bt.PowerBaseTest import PowerBaseTest 37from acts.test_utils.bt.bt_test_utils import bluetooth_enabled_check 38from acts.test_utils.bt.bt_test_utils import disable_bluetooth 39from acts.test_utils.bt.bt_test_utils import reset_bluetooth 40from acts.controllers.relay_lib.sony_xb2_speaker import SonyXB2Speaker 41 42 43def push_file_to_device(ad, file_path, device_path, config_path): 44 """Utility functions to push a file to android device 45 46 Args: 47 ad: Device for file push 48 file_path: File path for the file to be pushed to the device 49 device_path: File path on the device as destination 50 config_path: File path to the config file. This is only used when 51 a relative path is passed via the ACTS config. 52 53 Returns: 54 True if successful, False if unsuccessful. 55 """ 56 57 if not os.path.isfile(file_path): 58 file_path = os.path.join(config_path, file_path) 59 if not os.path.isfile(file_path): 60 return False 61 ad.adb.push("{} {}".format(file_path, device_path)) 62 return True 63 64 65class A2dpPowerTest(PowerBaseTest): 66 # Time for measuring the power when playing music in seconds 67 MEASURE_TIME = 400 68 # Delay time in seconds between starting playing and measuring power 69 DELAY_MEASURE_TIME = 300 70 # Extra time to stop Music in PMC after power measurement is stopped 71 DELAY_STOP_TIME = 10 72 # Log file name 73 LOG_FILE = "A2DPPOWER.log" 74 # Wait time in seconds to check if Bluetooth device is connected 75 WAIT_TIME = 10 76 # Base command for PMC 77 PMC_BASE_CMD = ("am broadcast -a com.android.pmc.A2DP") 78 # Codec Types 79 CODEC_SBC = 0 80 CODEC_AAC = 1 81 CODEC_APTX = 2 82 CODEC_APTX_HD = 3 83 CODEC_LDAC = 4 84 85 # Music sample rates 86 SAMPLE_RATE_44100 = 0x1 << 0 87 SAMPLE_RATE_48000 = 0x1 << 1 88 SAMPLE_RATE_88200 = 0x1 << 2 89 SAMPLE_RATE_96000 = 0x1 << 3 90 91 # Bits per sample 92 BITS_PER_SAMPLE_16 = 0x1 << 0 93 BITS_PER_SAMPLE_24 = 0x1 << 1 94 BITS_PER_SAMPLE_32 = 0x1 << 2 95 96 # LDAC playback quality: 97 # For High Quality 98 LDACBT_EQMID_HQ = 1000 99 # For Standard Quality 100 LDACBT_EQMID_SQ = 1001 101 # For Mobile Use Quality 102 LDACBT_EQMID_MQ = 1002 103 # LDAC playback quality constant for the codecs other than LDAC 104 LDACBT_NONE = 0 105 106 def _pair_by_config(self): 107 bt_device_address = self.user_params["bt_device_address"] 108 # Push the bt_config.conf file to Android device 109 # if it is specified in config file 110 # so it can pair and connect automatically. 111 # Because of bug 34933072 AK XB10 and Sony XB2 may not be able to 112 # reconnect after flashing a new build and pushing bt_config 113 # so just manually pair/connect before running the tests 114 bt_conf_path_dut = "/data/misc/bluedroid/bt_config.conf" 115 bt_config_path = None 116 try: 117 bt_config_path = self.user_params["bt_config"] 118 except KeyError: 119 self.log.info("No bt_config is specified in config file") 120 121 if bt_config_path != None: 122 self.log.info( 123 "Push bt_config file so it will connect automatically") 124 if not push_file_to_device( 125 self.ad, bt_config_path, bt_conf_path_dut, 126 self.user_params[Config.key_config_path]): 127 self.log.error( 128 "Unable to push file {} to DUT.".format(bt_config_path)) 129 130 self.log.info("Reboot") 131 self.ad.reboot() 132 133 if not bluetooth_enabled_check(self.ad): 134 self.log.error("Failed to enable Bluetooth on DUT") 135 return False 136 137 # Verify Bluetooth device is connected 138 self.log.info("Waiting up to {} seconds for device to reconnect.". 139 format(self.WAIT_TIME)) 140 start_time = time.time() 141 result = False 142 while time.time() < start_time + self.WAIT_TIME: 143 connected_devices = self.ad.droid.bluetoothGetConnectedDevices() 144 if len(connected_devices) > 0: 145 result = True 146 break 147 148 try: 149 self.ad.droid.bluetoothConnectBonded( 150 self.user_params["bt_device_address"]) 151 except Exception as err: 152 self.log.error( 153 "Failed to connect bonded device. Err: {}".format(err)) 154 155 if result is False: 156 self.log.error("No headset is connected") 157 return False 158 return True 159 160 def _discover_and_pair(self): 161 self.ad.droid.bluetoothStartDiscovery() 162 time.sleep(5) 163 self.ad.droid.bluetoothCancelDiscovery() 164 for device in self.ad.droid.bluetoothGetDiscoveredDevices(): 165 if device['address'] == self.a2dp_speaker.mac_address: 166 self.ad.droid.bluetoothDiscoverAndBond( 167 self.a2dp_speaker.mac_address) 168 end_time = time.time() + 20 169 self.log.info("Verifying devices are bonded") 170 while (time.time() < end_time): 171 bonded_devices = self.ad.droid.bluetoothGetBondedDevices() 172 for d in bonded_devices: 173 if d['address'] == self.a2dp_speaker.mac_address: 174 self.log.info("Successfully bonded to device.") 175 self.log.info( 176 "Bonded devices:\n{}".format(bonded_devices)) 177 return True 178 return False 179 180 def setup_class(self): 181 self.ad = self.android_devices[0] 182 self.ad.droid.bluetoothFactoryReset() 183 # Factory reset requires a short delay to take effect 184 time.sleep(3) 185 186 self.ad.log.info("Making sure BT phone is enabled here during setup") 187 if not bluetooth_enabled_check(self.ad): 188 self.log.error("Failed to turn Bluetooth on DUT") 189 # Give a breathing time of short delay to take effect 190 time.sleep(3) 191 192 reset_bluetooth([self.ad]) 193 194 # Determine if we have a relay-based device 195 self.a2dp_speaker = None 196 if self.relay_devices[0]: 197 self.a2dp_speaker = self.relay_devices[0] 198 self.a2dp_speaker.setup() 199 # The device may be on, enter pairing mode. 200 self.a2dp_speaker.enter_pairing_mode() 201 if self._discover_and_pair() is False: 202 # The device is probably off, turn it on 203 self.a2dp_speaker.power_on() 204 time.sleep(0.25) 205 self.a2dp_speaker.enter_pairing_mode() 206 if self._discover_and_pair() is False: 207 self.log.info("Unable to pair to relay based device.") 208 return False 209 if len(self.ad.droid.bluetoothGetConnectedDevices()) == 0: 210 self.log.info("Not connected to relay based device.") 211 return False 212 else: 213 # No relay-based device used config 214 if self._pair_by_config() is False: 215 return False 216 217 # Add music files to the Android device 218 music_path_dut = "/sdcard/Music/" 219 self.cd_quality_music_file = self.user_params["cd_quality_music_file"][ 220 0] 221 self.log.info( 222 "Push CD quality music file {}".format(self.cd_quality_music_file)) 223 if not push_file_to_device(self.ad, self.cd_quality_music_file, 224 music_path_dut, 225 self.user_params[Config.key_config_path]): 226 self.log.error("Unable to push file {} to DUT.".format( 227 self.cd_quality_music_file)) 228 229 self.hi_res_music_file = self.user_params["hi_res_music_file"][0] 230 self.log.info( 231 "Push Hi Res quality music file {}".format(self.hi_res_music_file)) 232 if not push_file_to_device(self.ad, self.hi_res_music_file, 233 music_path_dut, 234 self.user_params[Config.key_config_path]): 235 self.log.error( 236 "Unable to find file {}.".format(self.hi_res_music_file)) 237 238 # Then do other power testing setup in the base class 239 # including start PMC etc 240 super(A2dpPowerTest, self).setup_class() 241 return True 242 243 def teardown_class(self): 244 if self.a2dp_speaker is not None: 245 self.a2dp_speaker.power_off() 246 self.a2dp_speaker.clean_up() 247 248 def _main_power_test_function_for_codec(self, 249 codec_type, 250 sample_rate, 251 bits_per_sample, 252 music_file, 253 test_case, 254 ldac_playback_quality=LDACBT_NONE, 255 bt_on_not_play=False, 256 bt_off_mute=False): 257 """Main util function for power test of A2dp with different codec. 258 259 Steps: 260 1. Prepare adb shell command 261 2. Send the adb shell command to PMC 262 3. PMC will create Media Player and set the codec info 263 4. PMC start first alarm to start music 264 5. After first alarm triggered it start the second alarm to stop music 265 6. Save the power usage data into log file 266 267 Args: 268 codec_type: Codec Type - SBC, ACC, AptX, AptX-HD or LDAC 269 sample_rate: Sample Rate - 44.1, 48.0, 88.2, 96.0 Khz 270 bits_per_sample: Bits per Sample - 16, 24, 32 bits 271 music_file: a music file with CD quality (44.1KHz/16bits) or 272 Hi Res quality (96KHz/24bits) 273 ldac_playback_quality: LDACBT_EQMID_HQ, LDACBT_EQMID_SQ, 274 LDACBT_EQMID_MQ 275 bt_on_not_play: for baseline when MediaPlayer isn't play 276 but Bluetooth is on 277 bt_off_mute: for baseline case when Bluetooth is off and 278 on board speakers muted 279 280 Returns: 281 True or False value per check_test_pass result 282 """ 283 if bt_on_not_play == True: 284 msg = "%s --es BT_ON_NotPlay %d" % (self.PMC_BASE_CMD, 1) 285 else: 286 # Get the base name of music file 287 music_name = os.path.basename(music_file) 288 self.music_url = "file:///sdcard/Music/{}".format(music_name) 289 play_time = (self.MEASURE_TIME + self.DELAY_MEASURE_TIME + 290 self.DELAY_STOP_TIME) 291 play_msg = "%s --es MusicURL %s --es PlayTime %d" % ( 292 self.PMC_BASE_CMD, self.music_url, play_time) 293 294 if bt_off_mute == True: 295 msg = "%s --es BT_OFF_Mute %d" % (play_msg, 1) 296 else: 297 codec1_msg = "%s --es CodecType %d --es SampleRate %d" % ( 298 play_msg, codec_type, sample_rate) 299 codec_msg = "%s --es BitsPerSample %d" % (codec1_msg, 300 bits_per_sample) 301 if codec_type == self.CODEC_LDAC: 302 msg = "%s --es LdacPlaybackQuality %d" % ( 303 codec_msg, ldac_playback_quality) 304 else: 305 msg = codec_msg 306 307 self.ad.log.info("Send broadcast message: %s", msg) 308 self.ad.adb.shell(msg) 309 # Check if PMC is ready 310 status_msg = "READY" 311 if bt_on_not_play == True: 312 status_msg = "SUCCEED" 313 if not self.check_pmc_status(self.LOG_FILE, status_msg, 314 "PMC is not ready"): 315 return 316 317 # Start the power measurement 318 result = self.mon.measure_power( 319 self.POWER_SAMPLING_RATE, self.MEASURE_TIME, 320 self.current_test_name, self.DELAY_MEASURE_TIME) 321 322 # Sleep to wait for PMC to finish 323 time.sleep(self.DELAY_STOP_TIME) 324 # Check if PMC was successful 325 self.check_pmc_status(self.LOG_FILE, "SUCCEED", 326 "PMC was not successful") 327 328 (current_avg, stdev) = self.save_logs_for_power_test( 329 result, self.MEASURE_TIME, 0) 330 331 # perform watermark comparison numbers 332 self.log.info("==> CURRENT AVG from PMC Monsoon app: %s" % current_avg) 333 self.log.info( 334 "==> WATERMARK from config file: %s" % self.user_params[test_case]) 335 return self.check_test_pass(current_avg, self.user_params[test_case]) 336 337 @BluetoothBaseTest.bt_test_wrap 338 @test_tracker_info(uuid='6dc78cf4-7cae-4b03-8a31-0d23f41d1baa') 339 def test_power_baseline_not_play_music(self): 340 """Test power usage baseline without playing music. 341 342 Test power usage baseline without playing music. 343 344 Steps: 345 The same steps described in _main_power_test_function_for_codec() 346 except telling PMC not to play music 347 348 Expected Result: 349 Power consumption results 350 351 TAGS: Bluetooth, A2DP, Power, Codec 352 Priority: 3 353 354 """ 355 current_test_case = func_name = sys._getframe().f_code.co_name 356 return self._main_power_test_function_for_codec( 357 self.CODEC_SBC, 358 self.SAMPLE_RATE_44100, 359 self.BITS_PER_SAMPLE_16, 360 self.cd_quality_music_file, 361 current_test_case, 362 ldac_playback_quality=self.LDACBT_NONE, 363 bt_on_not_play=True) 364 365 @BluetoothBaseTest.bt_test_wrap 366 @test_tracker_info(uuid='d96080e3-1944-48b8-9655-4a77664a463b') 367 def test_power_baseline_play_music_but_disable_bluetooth(self): 368 """Test power usage baseline of playing music but Bluetooth is off. 369 370 Test power usage baseline of playing music but Bluetooth is off 371 speaker volume is set to 0. 372 373 Steps: 374 1. Disable Bluetooth 375 2. The same steps described in _main_power_test_function_for_codec() 376 3. Enable Bluetooth 377 378 Expected Result: 379 Power consumption results 380 381 TAGS: Bluetooth, A2DP, Power, Codec 382 Priority: 3 383 384 """ 385 self.ad.log.info("Disable BT") 386 if not disable_bluetooth(self.ad.droid): 387 self.log.error("Failed to disable Bluetooth on DUT") 388 return False 389 390 current_test_case = func_name = sys._getframe().f_code.co_name 391 return self._main_power_test_function_for_codec( 392 self.CODEC_SBC, 393 self.SAMPLE_RATE_44100, 394 self.BITS_PER_SAMPLE_16, 395 self.cd_quality_music_file, 396 current_test_case, 397 ldac_playback_quality=self.LDACBT_NONE, 398 bt_on_not_play=False, 399 bt_off_mute=True) 400 401 self.ad.log.info("Enable BT") 402 if not bluetooth_enabled_check(self.ad): 403 self.log.error("Failed to turn Bluetooth on DUT") 404 405 # Because of bug 34933072 Bluetooth device may not be able to reconnect 406 # after running this test case 407 # We need manually to turn on Bluetooth devices to get it reconnect 408 # for the next test case 409 # The workaround is to run this test case in the end of test suite 410 411 @BluetoothBaseTest.bt_test_wrap 412 @test_tracker_info(uuid='f62238cf-35df-4e42-a160-16944f76fb86') 413 def test_power_for_sbc_with_cd_quality_music(self): 414 """Test power usage for SBC codec with CD quality music file. 415 416 Test power usage for SBC codec with CD quality music file. 417 SBC only supports 44.1 Khz and 16 bits 418 419 Steps: 420 The same steps described in _main_power_test_function_for_codec() 421 422 Expected Result: 423 Power consumption results 424 425 TAGS: Bluetooth, A2DP, Power, Codec 426 Priority: 3 427 428 """ 429 current_test_case = func_name = sys._getframe().f_code.co_name 430 return self._main_power_test_function_for_codec( 431 self.CODEC_SBC, self.SAMPLE_RATE_44100, self.BITS_PER_SAMPLE_16, 432 self.cd_quality_music_file, current_test_case) 433 434 @BluetoothBaseTest.bt_test_wrap 435 @test_tracker_info(uuid='d9421c37-c2db-4dc5-841b-f837c0b2ea48') 436 def test_power_for_sbc_with_hi_res_music(self): 437 """Test power usage for SBC codec with Hi Resolution music file. 438 439 Test power usage for SBC codec with Hi Resolution music file. 440 SBC only supports 44.1 Khz and 16 bits 441 442 Steps: 443 The same steps described in _main_power_test_function_for_codec() 444 445 Expected Result: 446 Power consumption results 447 448 TAGS: Bluetooth, A2DP, Power, Codec 449 Priority: 3 450 451 """ 452 current_test_case = func_name = sys._getframe().f_code.co_name 453 return self._main_power_test_function_for_codec( 454 self.CODEC_SBC, self.SAMPLE_RATE_44100, self.BITS_PER_SAMPLE_16, 455 self.hi_res_music_file, current_test_case) 456 457 @BluetoothBaseTest.bt_test_wrap 458 @test_tracker_info(uuid='f746c038-9a00-43d0-b6b1-b9a36fae5a5a') 459 def test_power_for_aac_44100_16_with_cd_quality_music(self): 460 """Test power usage for AAC codec with CD quality music file. 461 462 Test power usage for AAC codec using 44.1KHz/16bits with 463 CD quality music file. 464 465 Steps: 466 The same steps described in _main_power_test_function_for_codec() 467 468 Expected Result: 469 Power consumption results 470 471 TAGS: Bluetooth, A2DP, Power, Codec 472 Priority: 3 473 474 """ 475 current_test_case = func_name = sys._getframe().f_code.co_name 476 return self._main_power_test_function_for_codec( 477 self.CODEC_AAC, self.SAMPLE_RATE_44100, self.BITS_PER_SAMPLE_16, 478 self.cd_quality_music_file, current_test_case) 479 480 @BluetoothBaseTest.bt_test_wrap 481 @test_tracker_info(uuid='510448e1-f4fb-4048-adad-67f8f16f96c4') 482 def test_power_for_aac_44100_16_with_hi_res_music(self): 483 """Test power usage for AAC codec with Hi Resolution music file. 484 485 Test power usage for AAC codec using 44.1KHz/16bits with 486 Hi Resolution music file. 487 488 Steps: 489 The same steps described in _main_power_test_function_for_codec() 490 491 Expected Result: 492 Power consumption results 493 494 TAGS: Bluetooth, A2DP, Power, Codec 495 Priority: 3 496 497 """ 498 current_test_case = func_name = sys._getframe().f_code.co_name 499 return self._main_power_test_function_for_codec( 500 self.CODEC_AAC, self.SAMPLE_RATE_44100, self.BITS_PER_SAMPLE_16, 501 self.hi_res_music_file, current_test_case) 502 503 @BluetoothBaseTest.bt_test_wrap 504 @test_tracker_info(uuid='9df971d1-91b6-4fad-86ff-aa91d14aa895') 505 def test_power_for_aac_48000_16_with_cd_quality_music(self): 506 """Test power usage for AAC codec with CD quality music file. 507 508 Test power usage for AAC codec using 48KHz/16bits with 509 CD quality music file. 510 511 Steps: 512 The same steps described in _main_power_test_function_for_codec() 513 514 Expected Result: 515 Power consumption results 516 517 TAGS: Bluetooth, A2DP, Power, Codec 518 Priority: 3 519 520 """ 521 current_test_case = func_name = sys._getframe().f_code.co_name 522 return self._main_power_test_function_for_codec( 523 self.CODEC_AAC, self.SAMPLE_RATE_48000, self.BITS_PER_SAMPLE_16, 524 self.cd_quality_music_file, current_test_case) 525 526 @BluetoothBaseTest.bt_test_wrap 527 @test_tracker_info(uuid='b020518e-027b-4716-8abb-cd6d83551869') 528 def test_power_for_aac_48000_16_with_hi_res_music(self): 529 """Test power usage for AAC codec with Hi Resolution music file. 530 531 Test power usage for AAC codec using 48KHz/16bits with 532 Hi Resolution music file. 533 534 Steps: 535 The same steps described in _main_power_test_function_for_codec() 536 537 Expected Result: 538 Power consumption results 539 540 TAGS: Bluetooth, A2DP, Power, Codec 541 Priority: 3 542 543 """ 544 current_test_case = func_name = sys._getframe().f_code.co_name 545 return self._main_power_test_function_for_codec( 546 self.CODEC_AAC, self.SAMPLE_RATE_48000, self.BITS_PER_SAMPLE_16, 547 self.hi_res_music_file, current_test_case) 548 549 @BluetoothBaseTest.bt_test_wrap 550 @test_tracker_info(uuid='2006dffb-b47b-4986-b11d-de151d5f4794') 551 def test_power_for_aptx_44100_16_with_cd_quality_music(self): 552 """Test power usage for APTX codec with CD quality music file. 553 554 Test power usage for APTX codec using 44.1KHz/16bits with 555 CD quality music file. 556 557 Steps: 558 The same steps described in _main_power_test_function_for_codec() 559 560 Expected Result: 561 Power consumption results 562 563 TAGS: Bluetooth, A2DP, Power, Codec 564 Priority: 3 565 566 """ 567 current_test_case = func_name = sys._getframe().f_code.co_name 568 return self._main_power_test_function_for_codec( 569 self.CODEC_APTX, self.SAMPLE_RATE_44100, self.BITS_PER_SAMPLE_16, 570 self.cd_quality_music_file, current_test_case) 571 572 @BluetoothBaseTest.bt_test_wrap 573 @test_tracker_info(uuid='8844356b-7756-4da6-89fe-96161e715cab') 574 def test_power_for_aptx_44100_16_with_hi_res_music(self): 575 """Test power usage for APTX codec with Hi Resolution music file. 576 577 Test power usage for APTX codec using 44.1KHz/16bits with 578 Hi Resolution music file. 579 580 Steps: 581 The same steps described in _main_power_test_function_for_codec() 582 583 Expected Result: 584 Power consumption results 585 586 TAGS: Bluetooth, A2DP, Power, Codec 587 Priority: 3 588 589 """ 590 current_test_case = func_name = sys._getframe().f_code.co_name 591 return self._main_power_test_function_for_codec( 592 self.CODEC_APTX, self.SAMPLE_RATE_44100, self.BITS_PER_SAMPLE_16, 593 self.hi_res_music_file, current_test_case) 594 595 @BluetoothBaseTest.bt_test_wrap 596 @test_tracker_info(uuid='d037ae2e-c5e8-4f84-9908-88335803a3d9') 597 def test_power_for_aptx_48000_16_with_cd_quality_music(self): 598 """Test power usage for APTX codec with CD quality music file. 599 600 Test power usage for APTX codec using 48KHz/16bits with 601 CD quality music file. 602 603 Steps: 604 The same steps described in _main_power_test_function_for_codec() 605 606 Expected Result: 607 Power consumption results 608 609 TAGS: Bluetooth, A2DP, Power, Codec 610 Priority: 3 611 612 """ 613 current_test_case = func_name = sys._getframe().f_code.co_name 614 return self._main_power_test_function_for_codec( 615 self.CODEC_APTX, self.SAMPLE_RATE_48000, self.BITS_PER_SAMPLE_16, 616 self.cd_quality_music_file, current_test_case) 617 618 @BluetoothBaseTest.bt_test_wrap 619 @test_tracker_info(uuid='4741b8cc-b038-4b38-8326-6a98de3f5ac6') 620 def test_power_for_aptx_48000_16_with_hi_res_music(self): 621 """Test power usage for APTX codec with Hi Resolution music file. 622 623 Test power usage for APTX codec using 48KHz/16bits with 624 Hi Resolution music file. 625 626 Steps: 627 The same steps described in _main_power_test_function_for_codec() 628 629 Expected Result: 630 Power consumption results 631 632 TAGS: Bluetooth, A2DP, Power, Codec 633 Priority: 3 634 635 """ 636 current_test_case = func_name = sys._getframe().f_code.co_name 637 return self._main_power_test_function_for_codec( 638 self.CODEC_APTX, self.SAMPLE_RATE_48000, self.BITS_PER_SAMPLE_16, 639 self.hi_res_music_file, current_test_case) 640 641 @BluetoothBaseTest.bt_test_wrap 642 @test_tracker_info(uuid='8dff8f63-bbdb-4a2d-afca-ff1aabf7b5f2') 643 def test_power_for_aptx_hd_44100_24_with_cd_quality_music(self): 644 """Test power usage for APTX-HD codec with CD quality music file. 645 646 Test power usage for APTX-HD codec using 44.1KHz/24bits with 647 CD quality music file. 648 649 Steps: 650 The same steps described in _main_power_test_function_for_codec() 651 652 Expected Result: 653 Power consumption results 654 655 TAGS: Bluetooth, A2DP, Power, Codec 656 Priority: 3 657 658 """ 659 current_test_case = func_name = sys._getframe().f_code.co_name 660 return self._main_power_test_function_for_codec( 661 self.CODEC_APTX_HD, self.SAMPLE_RATE_44100, 662 self.BITS_PER_SAMPLE_24, self.cd_quality_music_file, 663 current_test_case) 664 665 @BluetoothBaseTest.bt_test_wrap 666 @test_tracker_info(uuid='ab364fdd-04dd-42b7-af0d-fe1d7d7b809b') 667 def test_power_for_aptx_hd_44100_24_with_hi_res_music(self): 668 """Test power usage for APTX-HD codec with Hi Resolution music file. 669 670 Test power usage for APTX-HD codec using 44.1KHz/24bits with 671 Hi Resolution music file. 672 673 Steps: 674 The same steps described in _main_power_test_function_for_codec() 675 676 Expected Result: 677 Power consumption results 678 679 TAGS: Bluetooth, A2DP, Power, Codec 680 Priority: 3 681 682 """ 683 current_test_case = func_name = sys._getframe().f_code.co_name 684 return self._main_power_test_function_for_codec( 685 self.CODEC_APTX_HD, self.SAMPLE_RATE_44100, 686 self.BITS_PER_SAMPLE_24, self.hi_res_music_file, current_test_case) 687 688 @BluetoothBaseTest.bt_test_wrap 689 @test_tracker_info(uuid='dd838989-9440-4833-91f6-6fca6e219796') 690 def test_power_for_aptx_hd_48000_24_with_cd_quality_music(self): 691 """Test power usage for APTX-HD codec with CD quality music file. 692 693 Test power usage for APTX-HD codec using 48KHz/24bits with 694 CD quality music file. 695 696 Steps: 697 The same steps described in _main_power_test_function_for_codec() 698 699 Expected Result: 700 Power consumption results 701 702 TAGS: Bluetooth, A2DP, Power, Codec 703 Priority: 3 704 705 """ 706 current_test_case = func_name = sys._getframe().f_code.co_name 707 return self._main_power_test_function_for_codec( 708 self.CODEC_APTX_HD, self.SAMPLE_RATE_48000, 709 self.BITS_PER_SAMPLE_24, self.cd_quality_music_file, 710 current_test_case) 711 712 @BluetoothBaseTest.bt_test_wrap 713 @test_tracker_info(uuid='814122eb-7068-470b-b04c-d64883258b0c') 714 def test_power_for_aptx_hd_48000_24_with_hi_res_music(self): 715 """Test power usage for APTX-HD codec with Hi Resolution music file. 716 717 Test power usage for APTX-HD codec using 48KHz/24bits with 718 Hi Resolution music file. 719 720 Steps: 721 The same steps described in _main_power_test_function_for_codec() 722 723 Expected Result: 724 Power consumption results 725 726 TAGS: Bluetooth, A2DP, Power, Codec 727 Priority: 3 728 729 """ 730 current_test_case = func_name = sys._getframe().f_code.co_name 731 return self._main_power_test_function_for_codec( 732 self.CODEC_APTX_HD, self.SAMPLE_RATE_48000, 733 self.BITS_PER_SAMPLE_24, self.hi_res_music_file, current_test_case) 734 735 @BluetoothBaseTest.bt_test_wrap 736 @test_tracker_info(uuid='682c055f-4883-4559-828a-67956e110475') 737 def test_power_for_ldac_44100_16_with_cd_quality_music(self): 738 """Test power usage for LDAC codec with CD quality music file. 739 740 Test power usage for LDAC codec using 44.1KHz/16bits with 741 CD quality music file. 742 743 Steps: 744 The same steps described in _main_power_test_function_for_codec() 745 746 Expected Result: 747 Power consumption results 748 749 TAGS: Bluetooth, A2DP, Power, Codec 750 Priority: 3 751 752 """ 753 current_test_case = func_name = sys._getframe().f_code.co_name 754 return self._main_power_test_function_for_codec( 755 self.CODEC_LDAC, 756 self.SAMPLE_RATE_44100, 757 self.BITS_PER_SAMPLE_16, 758 self.cd_quality_music_file, 759 current_test_case, 760 ldac_playback_quality=self.LDACBT_EQMID_HQ) 761 762 @BluetoothBaseTest.bt_test_wrap 763 @test_tracker_info(uuid='21a2478c-9b66-49ae-a8ec-d2393142ed6c') 764 def test_power_for_ldac_44100_16_with_hi_res_music(self): 765 """Test power usage for LDAC codec with Hi Resolution music file. 766 767 Test power usage for LDAC codec using 44.1KHz/16bits with 768 Hi Resolution music file. 769 770 Steps: 771 The same steps described in _main_power_test_function_for_codec() 772 773 Expected Result: 774 Power consumption results 775 776 TAGS: Bluetooth, A2DP, Power, Codec 777 Priority: 3 778 779 """ 780 current_test_case = func_name = sys._getframe().f_code.co_name 781 return self._main_power_test_function_for_codec( 782 self.CODEC_LDAC, 783 self.SAMPLE_RATE_44100, 784 self.BITS_PER_SAMPLE_16, 785 self.hi_res_music_file, 786 current_test_case, 787 ldac_playback_quality=self.LDACBT_EQMID_HQ) 788 789 @BluetoothBaseTest.bt_test_wrap 790 @test_tracker_info(uuid='f081cb13-ec02-4814-ba00-3ed33630e7c0') 791 def test_power_for_ldac_48000_16_with_cd_quality_music(self): 792 """Test power usage for LDAC codec with CD quality music file. 793 794 Test power usage for LDAC codec using 48KHz/16bits with 795 CD quality music file. 796 797 Steps: 798 The same steps described in _main_power_test_function_for_codec() 799 800 Expected Result: 801 Power consumption results 802 803 TAGS: Bluetooth, A2DP, Power, Codec 804 Priority: 3 805 806 """ 807 current_test_case = func_name = sys._getframe().f_code.co_name 808 return self._main_power_test_function_for_codec( 809 self.CODEC_LDAC, 810 self.SAMPLE_RATE_48000, 811 self.BITS_PER_SAMPLE_16, 812 self.cd_quality_music_file, 813 current_test_case, 814 ldac_playback_quality=self.LDACBT_EQMID_HQ) 815 816 @BluetoothBaseTest.bt_test_wrap 817 @test_tracker_info(uuid='1c6b3a1b-59b8-479f-8247-e8cbbef6d82f') 818 def test_power_for_ldac_48000_16_with_hi_res_music(self): 819 """Test power usage for LDAC codec with Hi Resolution music file. 820 821 Test power usage for LDAC codec using 48KHz/16bits with 822 Hi Resolution music file. 823 824 Steps: 825 The same steps described in _main_power_test_function_for_codec() 826 827 Expected Result: 828 Power consumption results 829 830 TAGS: Bluetooth, A2DP, Power, Codec 831 Priority: 3 832 833 """ 834 current_test_case = func_name = sys._getframe().f_code.co_name 835 return self._main_power_test_function_for_codec( 836 self.CODEC_LDAC, 837 self.SAMPLE_RATE_48000, 838 self.BITS_PER_SAMPLE_16, 839 self.hi_res_music_file, 840 current_test_case, 841 ldac_playback_quality=self.LDACBT_EQMID_HQ) 842 843 @BluetoothBaseTest.bt_test_wrap 844 @test_tracker_info(uuid='e6806e10-0f1e-4c44-8f70-66e0267ebf95') 845 def test_power_for_ldac_88200_16_with_cd_quality_music(self): 846 """Test power usage for LDAC codec with CD quality music file. 847 848 Test power usage for LDAC codec using 88.2KHz/16bits with 849 CD quality music file. 850 851 Steps: 852 The same steps described in _main_power_test_function_for_codec() 853 854 Expected Result: 855 Power consumption results 856 857 TAGS: Bluetooth, A2DP, Power, Codec 858 Priority: 3 859 860 """ 861 current_test_case = func_name = sys._getframe().f_code.co_name 862 return self._main_power_test_function_for_codec( 863 self.CODEC_LDAC, 864 self.SAMPLE_RATE_88200, 865 self.BITS_PER_SAMPLE_16, 866 self.cd_quality_music_file, 867 current_test_case, 868 ldac_playback_quality=self.LDACBT_EQMID_HQ) 869 870 @BluetoothBaseTest.bt_test_wrap 871 @test_tracker_info(uuid='2458880d-c662-4313-9c3a-b14ad04dddfa') 872 def test_power_for_ldac_88200_16_with_hi_res_music(self): 873 """Test power usage for LDAC codec with Hi Resolution music file. 874 875 Test power usage for LDAC codec using 88.2KHz/16bits with 876 Hi Resolution music file. 877 878 Steps: 879 The same steps described in _main_power_test_function_for_codec() 880 881 Expected Result: 882 Power consumption results 883 884 TAGS: Bluetooth, A2DP, Power, Codec 885 Priority: 3 886 887 """ 888 current_test_case = func_name = sys._getframe().f_code.co_name 889 return self._main_power_test_function_for_codec( 890 self.CODEC_LDAC, 891 self.SAMPLE_RATE_88200, 892 self.BITS_PER_SAMPLE_16, 893 self.hi_res_music_file, 894 current_test_case, 895 ldac_playback_quality=self.LDACBT_EQMID_HQ) 896 897 @BluetoothBaseTest.bt_test_wrap 898 @test_tracker_info(uuid='e492f173-8a5b-4a92-b3de-c792e8db32fb') 899 def test_power_for_ldac_96000_16_with_cd_quality_music(self): 900 """Test power usage for LDAC codec with CD quality music file. 901 902 Test power usage for LDAC codec using 96KHz/16bits with 903 CD quality music file. 904 905 Steps: 906 The same steps described in _main_power_test_function_for_codec() 907 908 Expected Result: 909 Power consumption results 910 911 TAGS: Bluetooth, A2DP, Power, Codec 912 Priority: 3 913 914 """ 915 current_test_case = func_name = sys._getframe().f_code.co_name 916 return self._main_power_test_function_for_codec( 917 self.CODEC_LDAC, 918 self.SAMPLE_RATE_96000, 919 self.BITS_PER_SAMPLE_16, 920 self.cd_quality_music_file, 921 current_test_case, 922 ldac_playback_quality=self.LDACBT_EQMID_HQ) 923 924 @BluetoothBaseTest.bt_test_wrap 925 @test_tracker_info(uuid='65f78a14-5a1f-443e-9a23-8ae8a206bd6f') 926 def test_power_for_ldac_96000_16_with_hi_res_music(self): 927 """Test power usage for LDAC codec with Hi Resolution music file. 928 929 Test power usage for LDAC codec using 96KHz/16bits with 930 Hi Resolution music file. 931 932 Steps: 933 The same steps described in _main_power_test_function_for_codec() 934 935 Expected Result: 936 Power consumption results 937 938 TAGS: Bluetooth, A2DP, Power, Codec 939 Priority: 3 940 941 """ 942 current_test_case = func_name = sys._getframe().f_code.co_name 943 return self._main_power_test_function_for_codec( 944 self.CODEC_LDAC, 945 self.SAMPLE_RATE_96000, 946 self.BITS_PER_SAMPLE_16, 947 self.hi_res_music_file, 948 current_test_case, 949 ldac_playback_quality=self.LDACBT_EQMID_HQ) 950 951 @BluetoothBaseTest.bt_test_wrap 952 @test_tracker_info(uuid='3f026ae2-e34e-4a0f-aac2-1684d22a3796') 953 def test_power_for_ldac_44100_24_with_cd_quality_music(self): 954 """Test power usage for LDAC codec with CD quality music file. 955 956 Test power usage for LDAC codec using 44.1KHz/24bits with 957 CD quality music file. 958 959 Steps: 960 The same steps described in _main_power_test_function_for_codec() 961 962 Expected Result: 963 Power consumption results 964 965 TAGS: Bluetooth, A2DP, Power, Codec 966 Priority: 3 967 968 """ 969 current_test_case = func_name = sys._getframe().f_code.co_name 970 return self._main_power_test_function_for_codec( 971 self.CODEC_LDAC, 972 self.SAMPLE_RATE_44100, 973 self.BITS_PER_SAMPLE_24, 974 self.cd_quality_music_file, 975 current_test_case, 976 ldac_playback_quality=self.LDACBT_EQMID_HQ) 977 978 @BluetoothBaseTest.bt_test_wrap 979 @test_tracker_info(uuid='6d94bd0c-039e-47a7-8fc1-b87abcf9b27d') 980 def test_power_for_ldac_44100_24_with_hi_res_music(self): 981 """Test power usage for LDAC codec with Hi Resolution music file. 982 983 Test power usage for LDAC codec using 44.1KHz/24bits with 984 Hi Resolution music file. 985 986 Steps: 987 The same steps described in _main_power_test_function_for_codec() 988 989 Expected Result: 990 Power consumption results 991 992 TAGS: Bluetooth, A2DP, Power, Codec 993 Priority: 3 994 995 """ 996 current_test_case = func_name = sys._getframe().f_code.co_name 997 return self._main_power_test_function_for_codec( 998 self.CODEC_LDAC, 999 self.SAMPLE_RATE_44100, 1000 self.BITS_PER_SAMPLE_24, 1001 self.hi_res_music_file, 1002 current_test_case, 1003 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1004 1005 @BluetoothBaseTest.bt_test_wrap 1006 @test_tracker_info(uuid='2d5cbad5-5293-434d-b996-850ef32792a0') 1007 def test_power_for_ldac_48000_24_with_cd_quality_music(self): 1008 """Test power usage for LDAC codec with CD quality music file. 1009 1010 Test power usage for LDAC codec using 48KHz/24bits with 1011 CD quality music file. 1012 1013 Steps: 1014 The same steps described in _main_power_test_function_for_codec() 1015 1016 Expected Result: 1017 Power consumption results 1018 1019 TAGS: Bluetooth, A2DP, Power, Codec 1020 Priority: 3 1021 1022 """ 1023 current_test_case = func_name = sys._getframe().f_code.co_name 1024 return self._main_power_test_function_for_codec( 1025 self.CODEC_LDAC, 1026 self.SAMPLE_RATE_48000, 1027 self.BITS_PER_SAMPLE_24, 1028 self.cd_quality_music_file, 1029 current_test_case, 1030 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1031 1032 @BluetoothBaseTest.bt_test_wrap 1033 @test_tracker_info(uuid='fab004d1-c67e-4b9b-af33-e4469ce9f44a') 1034 def test_power_for_ldac_48000_24_with_hi_res_music(self): 1035 """Test power usage for LDAC codec with Hi Resolution music file. 1036 1037 Test power usage for LDAC codec using 48KHz/24bits with 1038 Hi Resolution music file. 1039 1040 Steps: 1041 The same steps described in _main_power_test_function_for_codec() 1042 1043 Expected Result: 1044 Power consumption results 1045 1046 TAGS: Bluetooth, A2DP, Power, Codec 1047 Priority: 3 1048 1049 """ 1050 current_test_case = func_name = sys._getframe().f_code.co_name 1051 return self._main_power_test_function_for_codec( 1052 self.CODEC_LDAC, 1053 self.SAMPLE_RATE_48000, 1054 self.BITS_PER_SAMPLE_24, 1055 self.hi_res_music_file, 1056 current_test_case, 1057 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1058 1059 @BluetoothBaseTest.bt_test_wrap 1060 @test_tracker_info(uuid='9527f997-61c6-4e88-90f9-6791cbe00883') 1061 def test_power_for_ldac_88200_24_with_cd_quality_music(self): 1062 """Test power usage for LDAC codec with CD quality music file. 1063 1064 Test power usage for LDAC codec using 88.2KHz/24bits with 1065 CD quality music file. 1066 1067 Steps: 1068 The same steps described in _main_power_test_function_for_codec() 1069 1070 Expected Result: 1071 Power consumption results 1072 1073 TAGS: Bluetooth, A2DP, Power, Codec 1074 Priority: 3 1075 1076 """ 1077 current_test_case = func_name = sys._getframe().f_code.co_name 1078 return self._main_power_test_function_for_codec( 1079 self.CODEC_LDAC, 1080 self.SAMPLE_RATE_88200, 1081 self.BITS_PER_SAMPLE_24, 1082 self.cd_quality_music_file, 1083 current_test_case, 1084 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1085 1086 @BluetoothBaseTest.bt_test_wrap 1087 @test_tracker_info(uuid='4a14a499-8b62-43d9-923e-f0c46e15121e') 1088 def test_power_for_ldac_88200_24_with_hi_res_music(self): 1089 """Test power usage for LDAC codec with Hi Resolution music file. 1090 1091 Test power usage for LDAC codec using 88.2KHz/24bits with 1092 Hi Resolution music file. 1093 1094 Steps: 1095 The same steps described in _main_power_test_function_for_codec() 1096 1097 Expected Result: 1098 Power consumption results 1099 1100 TAGS: Bluetooth, A2DP, Power, Codec 1101 Priority: 3 1102 1103 """ 1104 current_test_case = func_name = sys._getframe().f_code.co_name 1105 return self._main_power_test_function_for_codec( 1106 self.CODEC_LDAC, 1107 self.SAMPLE_RATE_88200, 1108 self.BITS_PER_SAMPLE_24, 1109 self.hi_res_music_file, 1110 current_test_case, 1111 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1112 1113 @BluetoothBaseTest.bt_test_wrap 1114 @test_tracker_info(uuid='d6254318-7a9a-4c19-800b-03686642e846') 1115 def test_power_for_ldac_96000_24_with_cd_quality_music(self): 1116 """Test power usage for LDAC codec with CD quality music file. 1117 1118 Test power usage for LDAC codec using 96KHz/24bits with 1119 CD quality music file. 1120 1121 Steps: 1122 The same steps described in _main_power_test_function_for_codec() 1123 1124 Expected Result: 1125 Power consumption results 1126 1127 TAGS: Bluetooth, A2DP, Power, Codec 1128 Priority: 3 1129 1130 """ 1131 current_test_case = func_name = sys._getframe().f_code.co_name 1132 return self._main_power_test_function_for_codec( 1133 self.CODEC_LDAC, 1134 self.SAMPLE_RATE_96000, 1135 self.BITS_PER_SAMPLE_24, 1136 self.cd_quality_music_file, 1137 current_test_case, 1138 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1139 1140 @BluetoothBaseTest.bt_test_wrap 1141 @test_tracker_info(uuid='1eb26676-19ec-43af-ab20-bfb7b055114f') 1142 def test_power_for_ldac_96000_24_with_hi_res_music(self): 1143 """Test power usage for LDAC codec with Hi Resolution music file. 1144 1145 Test power usage for LDAC codec using 96KHz/24bits with 1146 Hi Resolution music file. 1147 1148 Steps: 1149 The same steps described in _main_power_test_function_for_codec() 1150 1151 Expected Result: 1152 Power consumption results 1153 1154 TAGS: Bluetooth, A2DP, Power, Codec 1155 Priority: 3 1156 1157 """ 1158 current_test_case = func_name = sys._getframe().f_code.co_name 1159 return self._main_power_test_function_for_codec( 1160 self.CODEC_LDAC, 1161 self.SAMPLE_RATE_96000, 1162 self.BITS_PER_SAMPLE_24, 1163 self.hi_res_music_file, 1164 current_test_case, 1165 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1166 1167 @BluetoothBaseTest.bt_test_wrap 1168 @test_tracker_info(uuid='efb75158-ff90-4a95-8bd0-0189d719e647') 1169 def test_power_for_ldac_44100_32_with_cd_quality_music(self): 1170 """Test power usage for LDAC codec with CD quality music file. 1171 1172 Test power usage for LDAC codec using 44.1KHz/32bits with 1173 CD quality music file. 1174 1175 Steps: 1176 The same steps described in _main_power_test_function_for_codec() 1177 1178 Expected Result: 1179 Power consumption results 1180 1181 TAGS: Bluetooth, A2DP, Power, Codec 1182 Priority: 3 1183 1184 """ 1185 current_test_case = func_name = sys._getframe().f_code.co_name 1186 return self._main_power_test_function_for_codec( 1187 self.CODEC_LDAC, 1188 self.SAMPLE_RATE_44100, 1189 self.BITS_PER_SAMPLE_32, 1190 self.cd_quality_music_file, 1191 current_test_case, 1192 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1193 1194 @BluetoothBaseTest.bt_test_wrap 1195 @test_tracker_info(uuid='7d5ee1a0-b903-4cf4-8bcc-8db653f04e3b') 1196 def test_power_for_ldac_44100_32_with_hi_res_music(self): 1197 """Test power usage for LDAC codec with Hi Resolution music file. 1198 1199 Test power usage for LDAC codec using 44.1KHz/32bits with 1200 Hi Resolution music file. 1201 1202 Steps: 1203 The same steps described in _main_power_test_function_for_codec() 1204 1205 Expected Result: 1206 Power consumption results 1207 1208 TAGS: Bluetooth, A2DP, Power, Codec 1209 Priority: 3 1210 1211 """ 1212 current_test_case = func_name = sys._getframe().f_code.co_name 1213 return self._main_power_test_function_for_codec( 1214 self.CODEC_LDAC, 1215 self.SAMPLE_RATE_44100, 1216 self.BITS_PER_SAMPLE_32, 1217 self.hi_res_music_file, 1218 current_test_case, 1219 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1220 1221 @BluetoothBaseTest.bt_test_wrap 1222 @test_tracker_info(uuid='2981e30a-9f5a-4d35-9387-96dd2ab3421a') 1223 def test_power_for_ldac_48000_32_with_cd_quality_music(self): 1224 """Test power usage for LDAC codec with CD quality music file. 1225 1226 Test power usage for LDAC codec using 48KHz/32bits with 1227 CD quality music file. 1228 1229 Steps: 1230 The same steps described in _main_power_test_function_for_codec() 1231 1232 Expected Result: 1233 Power consumption results 1234 1235 TAGS: Bluetooth, A2DP, Power, Codec 1236 Priority: 3 1237 1238 """ 1239 current_test_case = func_name = sys._getframe().f_code.co_name 1240 return self._main_power_test_function_for_codec( 1241 self.CODEC_LDAC, 1242 self.SAMPLE_RATE_48000, 1243 self.BITS_PER_SAMPLE_32, 1244 self.cd_quality_music_file, 1245 current_test_case, 1246 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1247 1248 @BluetoothBaseTest.bt_test_wrap 1249 @test_tracker_info(uuid='297f0ab3-be6b-4367-9750-48f3ba12bb4b') 1250 def test_power_for_ldac_48000_32_with_hi_res_music(self): 1251 """Test power usage for LDAC codec with Hi Resolution music file. 1252 1253 Test power usage for LDAC codec using 48KHz/32bits with 1254 Hi Resolution music file. 1255 1256 Steps: 1257 The same steps described in _main_power_test_function_for_codec() 1258 1259 Expected Result: 1260 Power consumption results 1261 1262 TAGS: Bluetooth, A2DP, Power, Codec 1263 Priority: 3 1264 1265 """ 1266 current_test_case = func_name = sys._getframe().f_code.co_name 1267 return self._main_power_test_function_for_codec( 1268 self.CODEC_LDAC, 1269 self.SAMPLE_RATE_48000, 1270 self.BITS_PER_SAMPLE_32, 1271 self.hi_res_music_file, 1272 current_test_case, 1273 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1274 1275 @BluetoothBaseTest.bt_test_wrap 1276 @test_tracker_info(uuid='71a23350-03bf-4690-a692-eb944f7d4782') 1277 def test_power_for_ldac_88200_32_with_cd_quality_music(self): 1278 """Test power usage for LDAC codec with CD quality music file. 1279 1280 Test power usage for LDAC codec using 88.2KHz/32bits with 1281 CD quality music file. 1282 1283 Steps: 1284 The same steps described in _main_power_test_function_for_codec() 1285 1286 Expected Result: 1287 Power consumption results 1288 1289 TAGS: Bluetooth, A2DP, Power, Codec 1290 Priority: 3 1291 1292 """ 1293 current_test_case = func_name = sys._getframe().f_code.co_name 1294 return self._main_power_test_function_for_codec( 1295 self.CODEC_LDAC, 1296 self.SAMPLE_RATE_88200, 1297 self.BITS_PER_SAMPLE_32, 1298 self.cd_quality_music_file, 1299 current_test_case, 1300 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1301 1302 @BluetoothBaseTest.bt_test_wrap 1303 @test_tracker_info(uuid='7452e2dd-cbdd-4f50-a482-99d038ba0ee0') 1304 def test_power_for_ldac_88200_32_with_hi_res_music(self): 1305 """Test power usage for LDAC codec with Hi Resolution music file. 1306 1307 Test power usage for LDAC codec using 88.2KHz/32bits with 1308 Hi Resolution music file. 1309 1310 Steps: 1311 The same steps described in _main_power_test_function_for_codec() 1312 1313 Expected Result: 1314 Power consumption results 1315 1316 TAGS: Bluetooth, A2DP, Power, Codec 1317 Priority: 3 1318 1319 """ 1320 current_test_case = func_name = sys._getframe().f_code.co_name 1321 return self._main_power_test_function_for_codec( 1322 self.CODEC_LDAC, 1323 self.SAMPLE_RATE_88200, 1324 self.BITS_PER_SAMPLE_32, 1325 self.hi_res_music_file, 1326 current_test_case, 1327 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1328 1329 @BluetoothBaseTest.bt_test_wrap 1330 @test_tracker_info(uuid='042493c1-00d9-46d8-b2e9-844c9ac849f8') 1331 def test_power_for_ldac_96000_32_with_cd_quality_music(self): 1332 """Test power usage for LDAC codec with CD quality music file. 1333 1334 Test power usage for LDAC codec using 96KHz/32bits with 1335 CD quality music file. 1336 1337 Steps: 1338 The same steps described in _main_power_test_function_for_codec() 1339 1340 Expected Result: 1341 Power consumption results 1342 1343 TAGS: Bluetooth, A2DP, Power, Codec 1344 Priority: 3 1345 1346 """ 1347 current_test_case = func_name = sys._getframe().f_code.co_name 1348 return self._main_power_test_function_for_codec( 1349 self.CODEC_LDAC, 1350 self.SAMPLE_RATE_96000, 1351 self.BITS_PER_SAMPLE_32, 1352 self.cd_quality_music_file, 1353 current_test_case, 1354 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1355 1356 @BluetoothBaseTest.bt_test_wrap 1357 @test_tracker_info(uuid='7d90b5ee-c32b-4ef8-b27f-587f3550aed9') 1358 def test_power_for_ldac_96000_32_with_hi_res_music(self): 1359 """Test power usage for LDAC codec with Hi Resolution music file. 1360 1361 Test power usage for LDAC codec using 96KHz/32bits with 1362 Hi Resolution music file. 1363 1364 Steps: 1365 The same steps described in _main_power_test_function_for_codec() 1366 1367 Expected Result: 1368 Power consumption results 1369 1370 TAGS: Bluetooth, A2DP, Power, Codec 1371 Priority: 3 1372 1373 """ 1374 current_test_case = func_name = sys._getframe().f_code.co_name 1375 return self._main_power_test_function_for_codec( 1376 self.CODEC_LDAC, 1377 self.SAMPLE_RATE_96000, 1378 self.BITS_PER_SAMPLE_32, 1379 self.hi_res_music_file, 1380 current_test_case, 1381 ldac_playback_quality=self.LDACBT_EQMID_HQ) 1382 1383 @BluetoothBaseTest.bt_test_wrap 1384 @test_tracker_info(uuid='d3da605f-acd4-49a6-ae0f-d1ef216ac5b4') 1385 def test_power_for_ldac_96000_24_sq_with_hi_res_music(self): 1386 """Test power usage for LDAC codec with Standard Quality(SQ) 1387 for Hi Resolution music file. 1388 1389 Test power usage for LDAC codec using 96KHz/24bits with 1390 Standard Quality(SQ) for Hi Resolution music file. 1391 1392 Steps: 1393 The same steps described in _main_power_test_function_for_codec() 1394 1395 Expected Result: 1396 Power consumption results 1397 1398 TAGS: Bluetooth, A2DP, Power, Codec 1399 Priority: 3 1400 1401 """ 1402 current_test_case = func_name = sys._getframe().f_code.co_name 1403 return self._main_power_test_function_for_codec( 1404 self.CODEC_LDAC, 1405 self.SAMPLE_RATE_96000, 1406 self.BITS_PER_SAMPLE_24, 1407 self.hi_res_music_file, 1408 current_test_case, 1409 ldac_playback_quality=self.LDACBT_EQMID_SQ) 1410 1411 @BluetoothBaseTest.bt_test_wrap 1412 @test_tracker_info(uuid='5d6494a3-ab00-48f3-9e68-50600708c176') 1413 def test_power_for_ldac_96000_24_mq_with_hi_res_music(self): 1414 """Test power usage for LDAC codec with Mobile Quality(SQ) 1415 for Hi Resolution music file. 1416 1417 Test power usage for LDAC codec using 96KHz/24bits with 1418 Mobile Quality(SQ) for Hi Resolution music file. 1419 1420 Steps: 1421 The same steps described in _main_power_test_function_for_codec() 1422 1423 Expected Result: 1424 Power consumption results 1425 1426 TAGS: Bluetooth, A2DP, Power, Codec 1427 Priority: 3 1428 1429 """ 1430 current_test_case = func_name = sys._getframe().f_code.co_name 1431 return self._main_power_test_function_for_codec( 1432 self.CODEC_LDAC, 1433 self.SAMPLE_RATE_96000, 1434 self.BITS_PER_SAMPLE_24, 1435 self.hi_res_music_file, 1436 current_test_case, 1437 ldac_playback_quality=self.LDACBT_EQMID_MQ) 1438