btfmcodec: Update bearer response instead of ind
This change will send bearer response instead of transport failed indications. Update correct codeid and smaple rate for seamles transitions Change-Id: I4b91f5e158c02d4f2dc1852cc58cec959d028497 Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
f42a9a1f35
commit
c49fc215ed
@@ -155,6 +155,7 @@ int btfmcodec_initiate_hwep_configuration(struct btfmcodec_char_device *btfmcode
|
||||
|
||||
schedule_work(&btfmcodec_dev->wq_hwep_configure);
|
||||
|
||||
*status = BTM_WAITING_RSP;
|
||||
ret = wait_event_interruptible_timeout(*rsp_wait_q,
|
||||
*status != BTM_WAITING_RSP,
|
||||
msecs_to_jiffies(BTM_MASTER_CONFIG_RSP_TIMEOUT));
|
||||
@@ -190,8 +191,8 @@ void btfmcodec_configure_hwep(struct btfmcodec_char_device *btfmcodec_dev)
|
||||
btfmcodec_revert_current_state(state);
|
||||
}
|
||||
|
||||
ret = btfmcodec_frame_transport_switch_ind_pkt(btfmcodec_dev,
|
||||
btfmcodec_get_current_transport(state), status);
|
||||
ret = btfmcodec_frame_prepare_bearer_rsp_pkt(btfmcodec_dev,
|
||||
btfmcodec_get_current_transport(state), status);
|
||||
|
||||
if (status != MSG_SUCCESS)
|
||||
return;
|
||||
|
@@ -18,29 +18,23 @@ static int btfm_codec_get_mixer_control(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_component *codec = kcontrol->private_data;
|
||||
struct btfmcodec_data *btfmcodec = snd_soc_component_get_drvdata(codec);
|
||||
struct hwep_data *hwepinfo = btfmcodec->hwep_info;
|
||||
struct btfmcodec_state_machine states = btfmcodec->states;
|
||||
struct snd_kcontrol_new *mixer_ctrl = hwepinfo->mixer_ctrl;
|
||||
struct snd_ctl_elem_id id = kcontrol->id;
|
||||
int num_mixer_ctrl = hwepinfo->num_mixer_ctrl;
|
||||
int i = 0;
|
||||
|
||||
BTFMCODEC_DBG("");
|
||||
if (states.current_state != IDLE) {
|
||||
BTFMCODEC_WARN("Received probe when state is :%s",
|
||||
coverttostring(states.current_state));
|
||||
} else {
|
||||
for (; i < num_mixer_ctrl ; i++) {
|
||||
BTFMCODEC_DBG("checking mixer_ctrl:%s and current mixer:%s",
|
||||
id.name, mixer_ctrl[i].name);
|
||||
if (!strncmp(id.name, mixer_ctrl[i].name, 64)) {
|
||||
BTFMCODEC_DBG("Matched");
|
||||
mixer_ctrl[i].get(kcontrol, ucontrol);
|
||||
break;
|
||||
}
|
||||
for (; i < num_mixer_ctrl ; i++) {
|
||||
BTFMCODEC_DBG("checking mixer_ctrl:%s and current mixer:%s",
|
||||
id.name, mixer_ctrl[i].name);
|
||||
if (!strncmp(id.name, mixer_ctrl[i].name, 64)) {
|
||||
BTFMCODEC_DBG("Matched");
|
||||
mixer_ctrl[i].get(kcontrol, ucontrol);
|
||||
break;
|
||||
}
|
||||
if (num_mixer_ctrl == i)
|
||||
return 0;
|
||||
}
|
||||
if (num_mixer_ctrl == i)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -51,29 +45,23 @@ static int btfmcodec_put_mixer_control(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_component *codec = kcontrol->private_data;
|
||||
struct btfmcodec_data *btfmcodec = snd_soc_component_get_drvdata(codec);
|
||||
struct hwep_data *hwepinfo = btfmcodec->hwep_info;
|
||||
struct btfmcodec_state_machine states = btfmcodec->states;
|
||||
struct snd_kcontrol_new *mixer_ctrl = hwepinfo->mixer_ctrl;
|
||||
struct snd_ctl_elem_id id = kcontrol->id;
|
||||
int num_mixer_ctrl = hwepinfo->num_mixer_ctrl;
|
||||
int i = 0;
|
||||
|
||||
BTFMCODEC_DBG("");
|
||||
if (states.current_state != IDLE) {
|
||||
BTFMCODEC_WARN("Received probe when state is :%s",
|
||||
coverttostring(states.current_state));
|
||||
} else {
|
||||
for (; i < num_mixer_ctrl ; i++) {
|
||||
BTFMCODEC_DBG("checking mixer_ctrl:%s and current mixer:%s",
|
||||
id.name, mixer_ctrl[i].name);
|
||||
if (!strncmp(id.name, mixer_ctrl[i].name, 64)) {
|
||||
BTFMCODEC_DBG("Matched");
|
||||
mixer_ctrl[i].put(kcontrol, ucontrol);
|
||||
break;
|
||||
}
|
||||
for (; i < num_mixer_ctrl ; i++) {
|
||||
BTFMCODEC_DBG("checking mixer_ctrl:%s and current mixer:%s",
|
||||
id.name, mixer_ctrl[i].name);
|
||||
if (!strncmp(id.name, mixer_ctrl[i].name, 64)) {
|
||||
BTFMCODEC_DBG("Matched");
|
||||
mixer_ctrl[i].put(kcontrol, ucontrol);
|
||||
break;
|
||||
}
|
||||
if (num_mixer_ctrl == i)
|
||||
return 0;
|
||||
}
|
||||
if (num_mixer_ctrl == i)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@@ -42,7 +42,7 @@ struct btm_ctrl_pkt {
|
||||
#define BTM_BTFMCODEC_TRANSPORT_SWITCH_FAILED_IND 0x58000002
|
||||
|
||||
#define BTM_MASTER_CONFIG_REQ_LEN 13
|
||||
#define BTM_MASTER_CONFIG_RSP_TIMEOUT 1000
|
||||
#define BTM_MASTER_CONFIG_RSP_TIMEOUT 5000
|
||||
#define BTM_HEADER_LEN 8
|
||||
#define BTM_PREPARE_AUDIO_BEARER_SWITCH_RSP_LEN 2
|
||||
#define BTM_MASTER_CONFIG_RSP_LEN 2
|
||||
|
Reference in New Issue
Block a user