diff options
author | Hsin-Yu Chao <hychao@google.com> | 2019-09-27 17:14:34 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-13 17:05:14 +0000 |
commit | 7977891124b9f078d33f3afc08303a1c5b6b343f (patch) | |
tree | be27b27a9e4c69e7df63dfcd167f3892595485fd /cras/src/tests/bt_io_unittest.cc | |
parent | ea9baa664525dfeac94a4409ed655370dc978a9d (diff) | |
download | adhd-7977891124b9f078d33f3afc08303a1c5b6b343f.tar.gz |
CRAS: hfp - Add node type bluetooth narrow band mic
This change adds new type BLUETOOTH_NB_MIC representing the legacy
BT input node which currently has lower node priority in Chrome
browser.
The purpose of this new type is for browser to differenciate BT input
node in narrow band or wide band, when BT headset is connected in
wide band, we'll set its input node type to BLUETOOTH.
BUG=chromium:1000576
TEST=cras_test_client --set_wbs_enabled 1
Connect Sony headset, and use below command to verify new type
dbus-send --system --type=method_call --print-reply \
--dest=org.chromium.cras /org/chromium/cras \
org.chromium.cras.Control.GetNodes | grep -C 10 BLUETOOTH
Change-Id: I952cd322952cc1cb66a0a81f2cb9b3cd5e8b14d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/1828977
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>
Diffstat (limited to 'cras/src/tests/bt_io_unittest.cc')
-rw-r--r-- | cras/src/tests/bt_io_unittest.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cras/src/tests/bt_io_unittest.cc b/cras/src/tests/bt_io_unittest.cc index 97f4dae4..58a218b3 100644 --- a/cras/src/tests/bt_io_unittest.cc +++ b/cras/src/tests/bt_io_unittest.cc @@ -59,6 +59,8 @@ class BtIoBasicSuite : public testing::Test { ResetStubData(); SetUpIodev(&iodev_, CRAS_STREAM_OUTPUT); SetUpIodev(&iodev2_, CRAS_STREAM_OUTPUT); + iodev_.active_node = &node_; + iodev2_.active_node = &node2_; update_supported_formats_called_ = 0; frames_queued_called_ = 0; @@ -137,6 +139,8 @@ class BtIoBasicSuite : public testing::Test { static struct cras_iodev* bt_iodev; static struct cras_iodev iodev_; static struct cras_iodev iodev2_; + static struct cras_ionode node_; + static struct cras_ionode node2_; static unsigned int update_supported_formats_called_; static unsigned int frames_queued_called_; static unsigned int delay_frames_called_; @@ -149,6 +153,8 @@ class BtIoBasicSuite : public testing::Test { struct cras_iodev* BtIoBasicSuite::bt_iodev; struct cras_iodev BtIoBasicSuite::iodev_; struct cras_iodev BtIoBasicSuite::iodev2_; +struct cras_ionode BtIoBasicSuite::node_; +struct cras_ionode BtIoBasicSuite::node2_; unsigned int BtIoBasicSuite::update_supported_formats_called_; unsigned int BtIoBasicSuite::frames_queued_called_; unsigned int BtIoBasicSuite::delay_frames_called_; |