mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
ASoC: qdsp6v2: Avoid sending afe cal for proxy ports
Multichannel playback over Wifi fails due to use of invalid afe calibration at the time of opening proxy port. Since there is no afe calibration content for proxy devices, afe driver erringly sends afe cal tables of the previous device. This happens because afe tables aren't updated from acdb loader as proxy port opening is directly carried out from WFD module. Currently there is no mechanism to ensure compatibility between afe ports and afe cal tables cached in the memory. Therefore, disallow sending of afe cal table, topology and hardware delay calibration for proxy ports to fix the above issue through mixer controls. CRs-Fixed: 880657 Change-Id: I4914bb1b2fca91d71c2c34904a0ca632468efd5a Signed-off-by: Avinash Vaish <avaish@codeaurora.org>
This commit is contained in:
parent
c2b3e4d092
commit
4cb47f4336
2 changed files with 48 additions and 23 deletions
|
@ -1458,7 +1458,7 @@ static inline void msm_dai_q6_set_dai_id(struct snd_soc_dai *dai)
|
|||
return;
|
||||
}
|
||||
|
||||
static int msm_dai_q6_sb_cal_info_put(struct snd_kcontrol *kcontrol,
|
||||
static int msm_dai_q6_cal_info_put(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct msm_dai_q6_dai_data *dai_data = kcontrol->private_data;
|
||||
|
@ -1473,7 +1473,7 @@ static int msm_dai_q6_sb_cal_info_put(struct snd_kcontrol *kcontrol,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int msm_dai_q6_sb_cal_info_get(struct snd_kcontrol *kcontrol,
|
||||
static int msm_dai_q6_cal_info_get(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct msm_dai_q6_dai_data *dai_data = kcontrol->private_data;
|
||||
|
@ -1508,21 +1508,38 @@ static int msm_dai_q6_sb_format_get(struct snd_kcontrol *kcontrol,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const char * const slim_2_rx_text[] = {
|
||||
static const char * const afe_cal_mode_text[] = {
|
||||
"CAL_MODE_DEFAULT", "CAL_MODE_NONE"
|
||||
};
|
||||
|
||||
static const struct soc_enum slim_2_rx_enum =
|
||||
SOC_ENUM_SINGLE(SLIMBUS_2_RX, 0, ARRAY_SIZE(slim_2_rx_text),
|
||||
slim_2_rx_text);
|
||||
SOC_ENUM_SINGLE(SLIMBUS_2_RX, 0, ARRAY_SIZE(afe_cal_mode_text),
|
||||
afe_cal_mode_text);
|
||||
|
||||
static const struct soc_enum rt_proxy_1_rx_enum =
|
||||
SOC_ENUM_SINGLE(RT_PROXY_PORT_001_RX, 0, ARRAY_SIZE(afe_cal_mode_text),
|
||||
afe_cal_mode_text);
|
||||
|
||||
static const struct soc_enum rt_proxy_1_tx_enum =
|
||||
SOC_ENUM_SINGLE(RT_PROXY_PORT_001_TX, 0, ARRAY_SIZE(afe_cal_mode_text),
|
||||
afe_cal_mode_text);
|
||||
|
||||
static const struct snd_kcontrol_new sb_config_controls[] = {
|
||||
SOC_ENUM_EXT("SLIM_4_TX Format", sb_config_enum[0],
|
||||
msm_dai_q6_sb_format_get,
|
||||
msm_dai_q6_sb_format_put),
|
||||
SOC_ENUM_EXT("SLIM_2_RX SetCalMode", slim_2_rx_enum,
|
||||
msm_dai_q6_sb_cal_info_get,
|
||||
msm_dai_q6_sb_cal_info_put)
|
||||
msm_dai_q6_cal_info_get,
|
||||
msm_dai_q6_cal_info_put)
|
||||
};
|
||||
|
||||
static const struct snd_kcontrol_new rt_proxy_config_controls[] = {
|
||||
SOC_ENUM_EXT("RT_PROXY_1_RX SetCalMode", rt_proxy_1_rx_enum,
|
||||
msm_dai_q6_cal_info_get,
|
||||
msm_dai_q6_cal_info_put),
|
||||
SOC_ENUM_EXT("RT_PROXY_1_TX SetCalMode", rt_proxy_1_tx_enum,
|
||||
msm_dai_q6_cal_info_get,
|
||||
msm_dai_q6_cal_info_put),
|
||||
};
|
||||
|
||||
static int msm_dai_q6_dai_probe(struct snd_soc_dai *dai)
|
||||
|
@ -1550,23 +1567,32 @@ static int msm_dai_q6_dai_probe(struct snd_soc_dai *dai)
|
|||
|
||||
msm_dai_q6_set_dai_id(dai);
|
||||
|
||||
if (dai->id == SLIMBUS_4_TX) {
|
||||
switch (dai->id) {
|
||||
case SLIMBUS_4_TX:
|
||||
rc = snd_ctl_add(dai->card->snd_card,
|
||||
snd_ctl_new1(&sb_config_controls[0],
|
||||
dai_data));
|
||||
if (IS_ERR_VALUE(rc)) {
|
||||
dev_err(dai->dev, "%s: err add TX format ctl DAI = %s\n",
|
||||
__func__, dai->name);
|
||||
}
|
||||
}
|
||||
if (dai->id == SLIMBUS_2_RX) {
|
||||
snd_ctl_new1(&sb_config_controls[0],
|
||||
dai_data));
|
||||
break;
|
||||
case SLIMBUS_2_RX:
|
||||
rc = snd_ctl_add(dai->card->snd_card,
|
||||
snd_ctl_new1(&sb_config_controls[1],
|
||||
dai_data));
|
||||
if (IS_ERR_VALUE(rc))
|
||||
dev_err(dai->dev, "%s: err add RX Cal ctl, DAI = %s\n",
|
||||
__func__, dai->name);
|
||||
snd_ctl_new1(&sb_config_controls[1],
|
||||
dai_data));
|
||||
break;
|
||||
case RT_PROXY_DAI_001_RX:
|
||||
rc = snd_ctl_add(dai->card->snd_card,
|
||||
snd_ctl_new1(&rt_proxy_config_controls[0],
|
||||
dai_data));
|
||||
break;
|
||||
case RT_PROXY_DAI_001_TX:
|
||||
rc = snd_ctl_add(dai->card->snd_card,
|
||||
snd_ctl_new1(&rt_proxy_config_controls[1],
|
||||
dai_data));
|
||||
break;
|
||||
}
|
||||
if (IS_ERR_VALUE(rc))
|
||||
dev_err(dai->dev, "%s: err add config ctl, DAI = %s\n",
|
||||
__func__, dai->name);
|
||||
|
||||
rc = msm_dai_q6_dai_add_route(dai);
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -2036,10 +2036,9 @@ int afe_port_start(u16 port_id, union afe_port_config *afe_config,
|
|||
/* One time call: only for first time */
|
||||
afe_send_custom_topology();
|
||||
afe_send_port_topology_id(port_id);
|
||||
|
||||
afe_send_cal(port_id);
|
||||
afe_send_hw_delay(port_id, rate);
|
||||
}
|
||||
afe_send_hw_delay(port_id, rate);
|
||||
|
||||
/* Start SW MAD module */
|
||||
mad_type = afe_port_get_mad_type(port_id);
|
||||
|
|
Loading…
Reference in a new issue