• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
2  * Use of this source code is governed by a BSD-style license that can be
3  * found in the LICENSE file.
4  */
5 
6 #ifndef CRAS_HFP_IODEV_H_
7 #define CRAS_HFP_IODEV_H_
8 
9 #include "cras_bt_device.h"
10 #include "cras_hfp_info.h"
11 #include "cras_types.h"
12 
13 struct hfp_slc_handle;
14 
15 /*
16  * Creates an hfp iodev.
17  */
18 struct cras_iodev *hfp_iodev_create(enum CRAS_STREAM_DIRECTION dir,
19 				    struct cras_bt_device *device,
20 				    struct hfp_slc_handle *slc,
21 				    enum cras_bt_device_profile profile,
22 				    struct hfp_info *info);
23 
24 void hfp_iodev_destroy(struct cras_iodev *iodev);
25 
26 /*
27  * Returns if the iodev is running for a HSP connection. Note that
28  * hfp_iodev is implemented for both HFP and HSP connection. And this
29  * function allows caller to test if it falls to the rare case - HSP.
30  */
31 int hfp_iodev_is_hsp(struct cras_iodev *iodev);
32 
33 #endif /* CRAS_HFP_IODEV_H_ */
34