blob: 3c1d0ef4cbeb816b81b30d634b9afaef7d334d5f [file] [log] [blame]
Satya Krishna Pindiprolic6b0a742017-02-03 14:37:18 +05301/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -08002
3Redistribution and use in source and binary forms, with or without
4modification, are permitted provided that the following conditions are
5met:
6 * Redistributions of source code must retain the above copyright
7 notice, this list of conditions and the following disclaimer.
8 * Redistributions in binary form must reproduce the above
9 copyright notice, this list of conditions and the following
10 disclaimer in the documentation and/or other materials provided
11 with the distribution.
12 * Neither the name of The Linux Foundation nor the names of its
13 contributors may be used to endorse or promote products derived
14 from this software without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
27
28#define LOG_TAG "audio_hw_hfp"
29/*#define LOG_NDEBUG 0*/
30#define LOG_NDDEBUG 0
31
32#include <errno.h>
33#include <math.h>
34#include <cutils/log.h>
35
36#include "audio_hw.h"
37#include "platform.h"
38#include "platform_api.h"
39#include <stdlib.h>
40#include <cutils/str_parms.h>
41
42#ifdef HFP_ENABLED
43#define AUDIO_PARAMETER_HFP_ENABLE "hfp_enable"
Vimal Puthanveed47e64852013-12-20 13:23:39 -080044#define AUDIO_PARAMETER_HFP_SET_SAMPLING_RATE "hfp_set_sampling_rate"
Amit Shekhar967cab32014-02-07 17:03:21 -080045#define AUDIO_PARAMETER_KEY_HFP_VOLUME "hfp_volume"
Satya Krishna Pindiprolic6b0a742017-02-03 14:37:18 +053046#define AUDIO_PARAMETER_HFP_PCM_DEV_ID "hfp_pcm_dev_id"
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -080047
Sudheer Papothi19e43d02014-07-16 02:34:41 +053048#ifdef PLATFORM_MSM8994
49#define HFP_RX_VOLUME "SEC AUXPCM LOOPBACK Volume"
Banajit Goswamida77c452015-10-14 20:45:22 -070050#elif defined PLATFORM_MSM8996
51#define HFP_RX_VOLUME "PRI AUXPCM LOOPBACK Volume"
Garmond Leung986024b2017-04-28 14:41:10 -070052#elif defined (PLATFORM_MSM8998) || defined (PLATFORM_MSMFALCON) || defined (PLATFORM_SDM845)
Banajit Goswami4c0dff22016-03-04 18:31:22 -080053#define HFP_RX_VOLUME "SLIMBUS_7 LOOPBACK Volume"
Sudheer Papothi19e43d02014-07-16 02:34:41 +053054#else
55#define HFP_RX_VOLUME "Internal HFP RX Volume"
56#endif
57
Vimal Puthanveed584048b2013-12-11 17:00:50 -080058static int32_t start_hfp(struct audio_device *adev,
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -080059 struct str_parms *parms);
60
Vimal Puthanveed584048b2013-12-11 17:00:50 -080061static int32_t stop_hfp(struct audio_device *adev);
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -080062
63struct hfp_module {
64 struct pcm *hfp_sco_rx;
65 struct pcm *hfp_sco_tx;
66 struct pcm *hfp_pcm_rx;
67 struct pcm *hfp_pcm_tx;
68 bool is_hfp_running;
Amit Shekhar967cab32014-02-07 17:03:21 -080069 float hfp_volume;
Satya Krishna Pindiprolic6b0a742017-02-03 14:37:18 +053070 int32_t hfp_pcm_dev_id;
Vimal Puthanveed47e64852013-12-20 13:23:39 -080071 audio_usecase_t ucid;
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -080072};
73
74static struct hfp_module hfpmod = {
75 .hfp_sco_rx = NULL,
76 .hfp_sco_tx = NULL,
77 .hfp_pcm_rx = NULL,
78 .hfp_pcm_tx = NULL,
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -080079 .is_hfp_running = 0,
Satya Krishna Pindiprolic6b0a742017-02-03 14:37:18 +053080 .hfp_volume = 0,
81 .hfp_pcm_dev_id = HFP_ASM_RX_TX,
Vimal Puthanveed47e64852013-12-20 13:23:39 -080082 .ucid = USECASE_AUDIO_HFP_SCO,
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -080083};
84static struct pcm_config pcm_config_hfp = {
85 .channels = 1,
86 .rate = 8000,
87 .period_size = 240,
88 .period_count = 2,
89 .format = PCM_FORMAT_S16_LE,
90 .start_threshold = 0,
91 .stop_threshold = INT_MAX,
92 .avail_min = 0,
93};
94
Amit Shekhar967cab32014-02-07 17:03:21 -080095static int32_t hfp_set_volume(struct audio_device *adev, float value)
96{
97 int32_t vol, ret = 0;
98 struct mixer_ctl *ctl;
Sudheer Papothi19e43d02014-07-16 02:34:41 +053099 const char *mixer_ctl_name = HFP_RX_VOLUME;
Amit Shekhar967cab32014-02-07 17:03:21 -0800100
101 ALOGV("%s: entry", __func__);
102 ALOGD("%s: (%f)\n", __func__, value);
103
Satya Krishna Pindiproli3ed6d792014-09-09 15:32:25 +0530104 hfpmod.hfp_volume = value;
Amit Shekhar967cab32014-02-07 17:03:21 -0800105 if (value < 0.0) {
106 ALOGW("%s: (%f) Under 0.0, assuming 0.0\n", __func__, value);
107 value = 0.0;
108 } else {
109 value = ((value > 15.000000) ? 1.0 : (value / 15));
110 ALOGW("%s: Volume brought with in range (%f)\n", __func__, value);
111 }
112 vol = lrint((value * 0x2000) + 0.5);
Amit Shekhar967cab32014-02-07 17:03:21 -0800113
114 if (!hfpmod.is_hfp_running) {
115 ALOGV("%s: HFP not active, ignoring set_hfp_volume call", __func__);
116 return -EIO;
117 }
118
119 ALOGD("%s: Setting HFP volume to %d \n", __func__, vol);
120 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
121 if (!ctl) {
122 ALOGE("%s: Could not get ctl for mixer cmd - %s",
123 __func__, mixer_ctl_name);
124 return -EINVAL;
125 }
126 if(mixer_ctl_set_value(ctl, 0, vol) < 0) {
127 ALOGE("%s: Couldn't set HFP Volume: [%d]", __func__, vol);
128 return -EINVAL;
129 }
130
131 ALOGV("%s: exit", __func__);
132 return ret;
133}
134
Vimal Puthanveed584048b2013-12-11 17:00:50 -0800135static int32_t start_hfp(struct audio_device *adev,
Ravi Kumar Alamandabdf14162014-09-05 16:14:17 -0700136 struct str_parms *parms __unused)
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800137{
Satya Krishna Pindiprolif1cd92b2016-04-14 19:05:23 +0530138 int32_t ret = 0;
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800139 struct audio_usecase *uc_info;
140 int32_t pcm_dev_rx_id, pcm_dev_tx_id, pcm_dev_asm_rx_id, pcm_dev_asm_tx_id;
141
142 ALOGD("%s: enter", __func__);
143
144 uc_info = (struct audio_usecase *)calloc(1, sizeof(struct audio_usecase));
Haynes Mathew Georgeb51ceb12014-06-30 13:56:18 -0700145
146 if (!uc_info)
147 return -ENOMEM;
148
Vimal Puthanveed47e64852013-12-20 13:23:39 -0800149 uc_info->id = hfpmod.ucid;
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800150 uc_info->type = PCM_HFP_CALL;
151 uc_info->stream.out = adev->primary_output;
152 uc_info->devices = adev->primary_output->devices;
153 uc_info->in_snd_device = SND_DEVICE_NONE;
154 uc_info->out_snd_device = SND_DEVICE_NONE;
155
156 list_add_tail(&adev->usecase_list, &uc_info->list);
157
Vimal Puthanveed47e64852013-12-20 13:23:39 -0800158 select_devices(adev, hfpmod.ucid);
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800159
160 pcm_dev_rx_id = platform_get_pcm_device_id(uc_info->id, PCM_PLAYBACK);
161 pcm_dev_tx_id = platform_get_pcm_device_id(uc_info->id, PCM_CAPTURE);
Satya Krishna Pindiprolic6b0a742017-02-03 14:37:18 +0530162 pcm_dev_asm_rx_id = hfpmod.hfp_pcm_dev_id;
163 pcm_dev_asm_tx_id = hfpmod.hfp_pcm_dev_id;
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800164 if (pcm_dev_rx_id < 0 || pcm_dev_tx_id < 0 ||
165 pcm_dev_asm_rx_id < 0 || pcm_dev_asm_tx_id < 0 ) {
166 ALOGE("%s: Invalid PCM devices (rx: %d tx: %d asm: rx tx %d) for the usecase(%d)",
167 __func__, pcm_dev_rx_id, pcm_dev_tx_id, pcm_dev_asm_rx_id, uc_info->id);
168 ret = -EIO;
169 goto exit;
170 }
171
Satya Krishna Pindiprolic6b0a742017-02-03 14:37:18 +0530172 ALOGD("%s: HFP PCM devices (rx: %d tx: %d pcm dev id: %d) usecase(%d)",
173 __func__, pcm_dev_rx_id, pcm_dev_tx_id, hfpmod.hfp_pcm_dev_id, uc_info->id);
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800174
Apoorv Raghuvanshi84fa2fe2013-12-04 11:57:47 -0800175 hfpmod.hfp_sco_rx = pcm_open(adev->snd_card,
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800176 pcm_dev_asm_rx_id,
177 PCM_OUT, &pcm_config_hfp);
178 if (hfpmod.hfp_sco_rx && !pcm_is_ready(hfpmod.hfp_sco_rx)) {
179 ALOGE("%s: %s", __func__, pcm_get_error(hfpmod.hfp_sco_rx));
180 ret = -EIO;
181 goto exit;
182 }
Satya Krishna Pindiprolic6b0a742017-02-03 14:37:18 +0530183
Apoorv Raghuvanshi84fa2fe2013-12-04 11:57:47 -0800184 hfpmod.hfp_pcm_rx = pcm_open(adev->snd_card,
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800185 pcm_dev_rx_id,
186 PCM_OUT, &pcm_config_hfp);
187 if (hfpmod.hfp_pcm_rx && !pcm_is_ready(hfpmod.hfp_pcm_rx)) {
188 ALOGE("%s: %s", __func__, pcm_get_error(hfpmod.hfp_pcm_rx));
189 ret = -EIO;
190 goto exit;
191 }
Satya Krishna Pindiprolic6b0a742017-02-03 14:37:18 +0530192
Apoorv Raghuvanshi84fa2fe2013-12-04 11:57:47 -0800193 hfpmod.hfp_sco_tx = pcm_open(adev->snd_card,
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800194 pcm_dev_asm_tx_id,
195 PCM_IN, &pcm_config_hfp);
196 if (hfpmod.hfp_sco_tx && !pcm_is_ready(hfpmod.hfp_sco_tx)) {
197 ALOGE("%s: %s", __func__, pcm_get_error(hfpmod.hfp_sco_tx));
198 ret = -EIO;
199 goto exit;
200 }
Satya Krishna Pindiprolic6b0a742017-02-03 14:37:18 +0530201
Apoorv Raghuvanshi84fa2fe2013-12-04 11:57:47 -0800202 hfpmod.hfp_pcm_tx = pcm_open(adev->snd_card,
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800203 pcm_dev_tx_id,
204 PCM_IN, &pcm_config_hfp);
205 if (hfpmod.hfp_pcm_tx && !pcm_is_ready(hfpmod.hfp_pcm_tx)) {
206 ALOGE("%s: %s", __func__, pcm_get_error(hfpmod.hfp_pcm_tx));
207 ret = -EIO;
208 goto exit;
209 }
Satya Krishna Pindiprolic6b0a742017-02-03 14:37:18 +0530210
Satya Krishna Pindiprolice903a02014-07-28 12:40:56 +0530211 if (pcm_start(hfpmod.hfp_sco_rx) < 0) {
212 ALOGE("%s: pcm start for hfp sco rx failed", __func__);
213 ret = -EINVAL;
214 goto exit;
215 }
216 if (pcm_start(hfpmod.hfp_sco_tx) < 0) {
217 ALOGE("%s: pcm start for hfp sco tx failed", __func__);
218 ret = -EINVAL;
219 goto exit;
220 }
221 if (pcm_start(hfpmod.hfp_pcm_rx) < 0) {
222 ALOGE("%s: pcm start for hfp pcm rx failed", __func__);
223 ret = -EINVAL;
224 goto exit;
225 }
226 if (pcm_start(hfpmod.hfp_pcm_tx) < 0) {
227 ALOGE("%s: pcm start for hfp pcm tx failed", __func__);
228 ret = -EINVAL;
229 goto exit;
230 }
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800231
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800232 hfpmod.is_hfp_running = true;
Amit Shekhar967cab32014-02-07 17:03:21 -0800233 hfp_set_volume(adev, hfpmod.hfp_volume);
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800234
235 ALOGD("%s: exit: status(%d)", __func__, ret);
236 return 0;
237
238exit:
Vimal Puthanveed584048b2013-12-11 17:00:50 -0800239 stop_hfp(adev);
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800240 ALOGE("%s: Problem in HFP start: status(%d)", __func__, ret);
241 return ret;
242}
243
Vimal Puthanveed584048b2013-12-11 17:00:50 -0800244static int32_t stop_hfp(struct audio_device *adev)
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800245{
Satya Krishna Pindiprolif1cd92b2016-04-14 19:05:23 +0530246 int32_t ret = 0;
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800247 struct audio_usecase *uc_info;
248
249 ALOGD("%s: enter", __func__);
250 hfpmod.is_hfp_running = false;
251
252 /* 1. Close the PCM devices */
253 if (hfpmod.hfp_sco_rx) {
254 pcm_close(hfpmod.hfp_sco_rx);
255 hfpmod.hfp_sco_rx = NULL;
256 }
257 if (hfpmod.hfp_sco_tx) {
258 pcm_close(hfpmod.hfp_sco_tx);
259 hfpmod.hfp_sco_tx = NULL;
260 }
261 if (hfpmod.hfp_pcm_rx) {
262 pcm_close(hfpmod.hfp_pcm_rx);
263 hfpmod.hfp_pcm_rx = NULL;
264 }
265 if (hfpmod.hfp_pcm_tx) {
266 pcm_close(hfpmod.hfp_pcm_tx);
267 hfpmod.hfp_pcm_tx = NULL;
268 }
269
Vimal Puthanveed47e64852013-12-20 13:23:39 -0800270 uc_info = get_usecase_from_list(adev, hfpmod.ucid);
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800271 if (uc_info == NULL) {
272 ALOGE("%s: Could not find the usecase (%d) in the list",
Vimal Puthanveed47e64852013-12-20 13:23:39 -0800273 __func__, hfpmod.ucid);
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800274 return -EINVAL;
275 }
276
Venkata Narendra Kumar Gutta1bbbf542014-09-04 19:11:25 +0530277 /* 2. Disable echo reference while stopping hfp */
Apoorv Raghuvanshi924b3022015-07-06 15:07:14 -0700278 platform_set_echo_reference(adev, false, uc_info->devices);
Venkata Narendra Kumar Gutta1bbbf542014-09-04 19:11:25 +0530279
280 /* 3. Get and set stream specific mixer controls */
Haynes Mathew George1376ca62014-04-24 11:55:48 -0700281 disable_audio_route(adev, uc_info);
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800282
Venkata Narendra Kumar Gutta1bbbf542014-09-04 19:11:25 +0530283 /* 4. Disable the rx and tx devices */
Haynes Mathew George1376ca62014-04-24 11:55:48 -0700284 disable_snd_device(adev, uc_info->out_snd_device);
285 disable_snd_device(adev, uc_info->in_snd_device);
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800286
287 list_remove(&uc_info->list);
288 free(uc_info);
289
290 ALOGD("%s: exit: status(%d)", __func__, ret);
291 return ret;
292}
Vimal Puthanveed584048b2013-12-11 17:00:50 -0800293
Vimal Puthanveed37b4a1c2014-01-07 16:47:47 -0800294bool audio_extn_hfp_is_active(struct audio_device *adev)
295{
296 struct audio_usecase *hfp_usecase = NULL;
Vimal Puthanveed41fcff22014-01-23 15:56:53 -0800297 hfp_usecase = get_usecase_from_list(adev, hfpmod.ucid);
Vimal Puthanveed37b4a1c2014-01-07 16:47:47 -0800298
299 if (hfp_usecase != NULL)
300 return true;
301 else
302 return false;
303}
304
Dhanalakshmi Siddani823dc5a2016-09-28 14:47:26 +0530305int hfp_set_mic_mute(struct audio_device *adev, bool state)
306{
307 struct mixer_ctl *ctl;
308 const char *mixer_ctl_name = "HFP TX Mute";
309 uint32_t set_values[ ] = {0};
310
311 ALOGI("%s: enter, state=%d", __func__, state);
312
313 set_values[0] = state;
314 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
315 if (!ctl) {
316 ALOGE("%s: Could not get ctl for mixer cmd - %s",
317 __func__, mixer_ctl_name);
318 return -EINVAL;
319 }
320 mixer_ctl_set_array(ctl, set_values, ARRAY_SIZE(set_values));
321 ALOGV("%s: exit", __func__);
322 return 0;
323}
324
Vimal Puthanveed41fcff22014-01-23 15:56:53 -0800325audio_usecase_t audio_extn_hfp_get_usecase()
326{
327 return hfpmod.ucid;
328}
329
Vimal Puthanveed584048b2013-12-11 17:00:50 -0800330void audio_extn_hfp_set_parameters(struct audio_device *adev, struct str_parms *parms)
331{
332 int ret;
Vimal Puthanveed47e64852013-12-20 13:23:39 -0800333 int rate;
Vimal Puthanveed21e5c762014-01-08 14:10:09 -0800334 int val;
Amit Shekhar967cab32014-02-07 17:03:21 -0800335 float vol;
Vimal Puthanveed584048b2013-12-11 17:00:50 -0800336 char value[32]={0};
337
338 ret = str_parms_get_str(parms, AUDIO_PARAMETER_HFP_ENABLE, value,
339 sizeof(value));
340 if (ret >= 0) {
Satya Krishna Pindiprolic6b0a742017-02-03 14:37:18 +0530341 if (!strncmp(value, "true", sizeof(value)) && !hfpmod.is_hfp_running)
342 ret = start_hfp(adev,parms);
343 else if (!strncmp(value, "false", sizeof(value)) && hfpmod.is_hfp_running)
344 stop_hfp(adev);
345 else
346 ALOGE("hfp_enable=%s is unsupported", value);
Vimal Puthanveed584048b2013-12-11 17:00:50 -0800347 }
Vimal Puthanveed47e64852013-12-20 13:23:39 -0800348 memset(value, 0, sizeof(value));
349 ret = str_parms_get_str(parms,AUDIO_PARAMETER_HFP_SET_SAMPLING_RATE, value,
350 sizeof(value));
351 if (ret >= 0) {
352 rate = atoi(value);
353 if (rate == 8000){
354 hfpmod.ucid = USECASE_AUDIO_HFP_SCO;
355 pcm_config_hfp.rate = rate;
Ravi Kumar Alamandabdf14162014-09-05 16:14:17 -0700356 } else if (rate == 16000){
Vimal Puthanveed47e64852013-12-20 13:23:39 -0800357 hfpmod.ucid = USECASE_AUDIO_HFP_SCO_WB;
358 pcm_config_hfp.rate = rate;
Ravi Kumar Alamandabdf14162014-09-05 16:14:17 -0700359 } else
Vimal Puthanveed47e64852013-12-20 13:23:39 -0800360 ALOGE("Unsupported rate..");
361 }
Vimal Puthanveed21e5c762014-01-08 14:10:09 -0800362
Ravi Kumar Alamandabdf14162014-09-05 16:14:17 -0700363 if (hfpmod.is_hfp_running) {
Vimal Puthanveed21e5c762014-01-08 14:10:09 -0800364 memset(value, 0, sizeof(value));
365 ret = str_parms_get_str(parms, AUDIO_PARAMETER_STREAM_ROUTING,
366 value, sizeof(value));
367 if (ret >= 0) {
368 val = atoi(value);
Ravi Kumar Alamandabdf14162014-09-05 16:14:17 -0700369 if (val > 0)
Vimal Puthanveed21e5c762014-01-08 14:10:09 -0800370 select_devices(adev, hfpmod.ucid);
371 }
372 }
Amit Shekhar967cab32014-02-07 17:03:21 -0800373
374 memset(value, 0, sizeof(value));
375 ret = str_parms_get_str(parms, AUDIO_PARAMETER_KEY_HFP_VOLUME,
376 value, sizeof(value));
377 if (ret >= 0) {
378 if (sscanf(value, "%f", &vol) != 1){
379 ALOGE("%s: error in retrieving hfp volume", __func__);
380 ret = -EIO;
381 goto exit;
382 }
383 ALOGD("%s: set_hfp_volume usecase, Vol: [%f]", __func__, vol);
384 hfp_set_volume(adev, vol);
385 }
Satya Krishna Pindiprolic6b0a742017-02-03 14:37:18 +0530386
387 memset(value, 0, sizeof(value));
388 ret = str_parms_get_str(parms, AUDIO_PARAMETER_HFP_PCM_DEV_ID, value, sizeof(value));
389 if (ret >= 0) {
390 hfpmod.hfp_pcm_dev_id = atoi(value);
391 ALOGD("Updating HFP_PCM_DEV_ID as %d from platform XML", hfpmod.hfp_pcm_dev_id);
392 str_parms_del(parms, AUDIO_PARAMETER_HFP_PCM_DEV_ID);
393 }
394
Amit Shekhar967cab32014-02-07 17:03:21 -0800395exit:
396 ALOGV("%s Exit",__func__);
Vimal Puthanveed584048b2013-12-11 17:00:50 -0800397}
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800398#endif /*HFP_ENABLED*/