diff options
author | Jorge E. Moreira <jemoreira@google.com> | 2021-04-12 19:05:41 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-04-12 19:05:41 +0000 |
commit | bcf1f249f11b6865cff3f0d3f0ae5801e67e0e7e (patch) | |
tree | 7e0e07b9d8d50fc5dd352d5b36d74fa3cb3427db /cras/src/server/cras_hfp_iodev.c | |
parent | 1a33fa04345d1d2599eae37bb34781783aa0d04e (diff) | |
parent | 072dce8ca50bdf87b113490cdf14bde14724914f (diff) | |
download | adhd-bcf1f249f11b6865cff3f0d3f0ae5801e67e0e7e.tar.gz |
Merge remote-tracking branch 'aosp/upstream-main' into master am: 072dce8ca5android-s-beta-4android-s-beta-3android-s-beta-4
Original change: https://android-review.googlesource.com/c/platform/external/adhd/+/1673705
Change-Id: I34df6886976fcb22f0bef53453a5cd0924f04f7b
Diffstat (limited to 'cras/src/server/cras_hfp_iodev.c')
-rw-r--r-- | cras/src/server/cras_hfp_iodev.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/cras/src/server/cras_hfp_iodev.c b/cras/src/server/cras_hfp_iodev.c index 7cce3736..6a4ced04 100644 --- a/cras/src/server/cras_hfp_iodev.c +++ b/cras/src/server/cras_hfp_iodev.c @@ -17,7 +17,6 @@ #include "cras_iodev.h" #include "cras_system_state.h" #include "cras_util.h" -#include "sfh.h" #include "utlist.h" /* Implementation of bluetooth hands-free profile iodev. @@ -167,6 +166,7 @@ static int configure_dev(struct cras_iodev *iodev) hfpio->filled_zeros = 0; add_dev: hfp_info_add_iodev(hfpio->info, iodev->direction, iodev->format); + hfp_set_call_status(hfpio->slc, 1); iodev->buffer_size = hfp_buf_size(hfpio->info, iodev->direction); @@ -181,8 +181,10 @@ static int close_dev(struct cras_iodev *iodev) struct hfp_io *hfpio = (struct hfp_io *)iodev; hfp_info_rm_iodev(hfpio->info, iodev->direction); - if (hfp_info_running(hfpio->info) && !hfp_info_has_iodev(hfpio->info)) + if (hfp_info_running(hfpio->info) && !hfp_info_has_iodev(hfpio->info)) { hfp_info_stop(hfpio->info); + hfp_set_call_status(hfpio->slc, 0); + } cras_iodev_free_format(iodev); cras_iodev_free_audio_area(iodev); @@ -306,10 +308,7 @@ struct cras_iodev *hfp_iodev_create(enum CRAS_STREAM_DIRECTION dir, snprintf(iodev->info.name, sizeof(iodev->info.name), "%s", name); iodev->info.name[ARRAY_SIZE(iodev->info.name) - 1] = 0; - iodev->info.stable_id = - SuperFastHash(cras_bt_device_object_path(device), - strlen(cras_bt_device_object_path(device)), - strlen(cras_bt_device_object_path(device))); + iodev->info.stable_id = cras_bt_device_get_stable_id(device); iodev->configure_dev = configure_dev; iodev->frames_queued = frames_queued; |