diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2014-07-21 12:53:03 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-07-21 16:39:14 +0300 |
commit | 30e7a4a80d2f1e6691cf9dbbd909c2e350072c0d (patch) | |
tree | 355cf8f361cb740ad5bb1fc380d617d03056e9f0 /android/hal-sco.c | |
parent | 2c305d71cd346c2f38145bf7772cbbe837627ff6 (diff) | |
download | bluez-30e7a4a80d2f1e6691cf9dbbd909c2e350072c0d.tar.gz |
android/ipc: Rename connect_sco to get_fd
SCO get connected through handsfree HAL and Audio SCO HAL only need to
get SCO socket fd.
Diffstat (limited to 'android/hal-sco.c')
-rw-r--r-- | android/hal-sco.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/android/hal-sco.c b/android/hal-sco.c index 55e58b536..c0a1fa6e3 100644 --- a/android/hal-sco.c +++ b/android/hal-sco.c @@ -277,19 +277,19 @@ failed: return SCO_STATUS_FAILED; } -static int ipc_connect_sco(void) +static int ipc_get_sco_fd(void) { int ret = SCO_STATUS_SUCCESS; pthread_mutex_lock(&sco_mutex); if (sco_fd < 0) { - struct sco_rsp_connect rsp; + struct sco_rsp_get_fd rsp; size_t rsp_len = sizeof(rsp); - DBG("Connecting SCO"); + DBG("Getting SCO fd"); - ret = sco_ipc_cmd(SCO_SERVICE_ID, SCO_OP_CONNECT, 0, NULL, + ret = sco_ipc_cmd(SCO_SERVICE_ID, SCO_OP_GET_FD, 0, NULL, &rsp_len, &rsp, &sco_fd); /* Sometimes mtu returned is wrong */ @@ -445,7 +445,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, DBG("write to fd %d bytes %zu", sco_fd, bytes); - if (ipc_connect_sco() != SCO_STATUS_SUCCESS) + if (ipc_get_sco_fd() != SCO_STATUS_SUCCESS) return -1; if (!out->downmix_buf) { @@ -631,7 +631,7 @@ static int sco_open_output_stream(struct audio_hw_device *dev, return -EIO; } - if (ipc_connect_sco() != SCO_STATUS_SUCCESS) + if (ipc_get_sco_fd() != SCO_STATUS_SUCCESS) DBG("SCO is not connected yet; get fd on write()"); out = calloc(1, sizeof(struct sco_stream_out)); @@ -1007,7 +1007,7 @@ static ssize_t in_read(struct audio_stream_in *stream, void *buffer, DBG("Read from fd %d bytes %zu", sco_fd, bytes); - if (ipc_connect_sco() != SCO_STATUS_SUCCESS) + if (ipc_get_sco_fd() != SCO_STATUS_SUCCESS) return -1; if (!in->resampler && in->cfg.rate != AUDIO_STREAM_SCO_RATE) { |