hal: audio routing enable in hfp case
- When hfp is enabled make sure to reroute during device switch CRs-Fixed: 595541 Change-Id: I680b4198a2d3baf257ae4bcfaf0c955eb62df3d9
This commit is contained in:
parent
47e6485457
commit
21e5c767f7
|
@ -221,6 +221,7 @@ void audio_extn_hfp_set_parameters(struct audio_device *adev, struct str_parms *
|
|||
{
|
||||
int ret;
|
||||
int rate;
|
||||
int val;
|
||||
char value[32]={0};
|
||||
|
||||
ret = str_parms_get_str(parms, AUDIO_PARAMETER_HFP_ENABLE, value,
|
||||
|
@ -247,5 +248,16 @@ void audio_extn_hfp_set_parameters(struct audio_device *adev, struct str_parms *
|
|||
else
|
||||
ALOGE("Unsupported rate..");
|
||||
}
|
||||
|
||||
if(hfpmod.is_hfp_running) {
|
||||
memset(value, 0, sizeof(value));
|
||||
ret = str_parms_get_str(parms, AUDIO_PARAMETER_STREAM_ROUTING,
|
||||
value, sizeof(value));
|
||||
if (ret >= 0) {
|
||||
val = atoi(value);
|
||||
if(val > 0)
|
||||
select_devices(adev, hfpmod.ucid);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /*HFP_ENABLED*/
|
||||
|
|
Loading…
Reference in New Issue