Merge "ASoC: msm: Update channel mixer weight mixer control"

This commit is contained in:
Linux Build Service Account 2018-05-01 06:26:33 -07:00 committed by Gerrit - the friendly Code Review server
commit 0af3c13aa0
3 changed files with 20 additions and 20 deletions

View file

@ -847,7 +847,7 @@ static int msm_pcm_channel_mixer_output_map_ctl_put(
}
chmixer_pspd = &(pdata->chmixer_pspd[fe_id][session_type]);
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
chmixer_pspd->out_ch_map[i] =
ucontrol->value.integer.value[i];
@ -878,7 +878,7 @@ static int msm_pcm_channel_mixer_output_map_ctl_get(
}
chmixer_pspd = &(pdata->chmixer_pspd[fe_id][session_type]);
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
ucontrol->value.integer.value[i] =
chmixer_pspd->out_ch_map[i];
return 0;
@ -908,7 +908,7 @@ static int msm_pcm_channel_mixer_input_map_ctl_put(
}
chmixer_pspd = &(pdata->chmixer_pspd[fe_id][session_type]);
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
chmixer_pspd->in_ch_map[i] = ucontrol->value.integer.value[i];
return 0;
@ -938,7 +938,7 @@ static int msm_pcm_channel_mixer_input_map_ctl_get(
}
chmixer_pspd = &(pdata->chmixer_pspd[fe_id][session_type]);
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
ucontrol->value.integer.value[i] =
chmixer_pspd->in_ch_map[i];
return 0;
@ -969,13 +969,13 @@ static int msm_pcm_channel_mixer_weight_ctl_put(
}
chmixer_pspd = &(pdata->chmixer_pspd[fe_id][session_type]);
if (channel <= 0 || channel > PCM_FORMAT_MAX_NUM_CHANNEL) {
if (channel <= 0 || channel > PCM_FORMAT_MAX_NUM_CHANNEL_V2) {
pr_err("%s: invalid channel number %d\n", __func__, channel);
return -EINVAL;
}
channel--;
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
chmixer_pspd->channel_weight[channel][i] =
ucontrol->value.integer.value[i];
return 0;
@ -1005,14 +1005,14 @@ static int msm_pcm_channel_mixer_weight_ctl_get(
return -EINVAL;
}
if (channel <= 0 || channel > PCM_FORMAT_MAX_NUM_CHANNEL) {
if (channel <= 0 || channel > PCM_FORMAT_MAX_NUM_CHANNEL_V2) {
pr_err("%s: invalid channel number %d\n", __func__, channel);
return -EINVAL;
}
channel--;
chmixer_pspd = &(pdata->chmixer_pspd[fe_id][session_type]);
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
ucontrol->value.integer.value[i] =
chmixer_pspd->channel_weight[channel][i];
return 0;
@ -1462,7 +1462,7 @@ static int msm_pcm_add_channel_mixer_controls(struct snd_soc_pcm_runtime *rtd)
pr_err("%s: pcm add channel mixer output map controls failed:%d\n",
__func__, ret);
for (i = 1; i <= PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 1; i <= PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
ret |= msm_pcm_add_channel_mixer_weight_controls(rtd, i);
if (ret)
pr_err("%s: pcm add channel mixer weight controls failed:%d\n",

View file

@ -2263,7 +2263,7 @@ static int msm_pcm_channel_mixer_output_map_ctl_put(
}
chmixer_pspd = &(pdata->chmixer_pspd[fe_id][session_type]);
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
chmixer_pspd->out_ch_map[i] =
ucontrol->value.integer.value[i];
@ -2294,7 +2294,7 @@ static int msm_pcm_channel_mixer_output_map_ctl_get(
}
chmixer_pspd = &(pdata->chmixer_pspd[fe_id][session_type]);
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
ucontrol->value.integer.value[i] =
chmixer_pspd->out_ch_map[i];
return 0;
@ -2324,7 +2324,7 @@ static int msm_pcm_channel_mixer_input_map_ctl_put(
}
chmixer_pspd = &(pdata->chmixer_pspd[fe_id][session_type]);
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
chmixer_pspd->in_ch_map[i] = ucontrol->value.integer.value[i];
return 0;
@ -2354,7 +2354,7 @@ static int msm_pcm_channel_mixer_input_map_ctl_get(
}
chmixer_pspd = &(pdata->chmixer_pspd[fe_id][session_type]);
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
ucontrol->value.integer.value[i] =
chmixer_pspd->in_ch_map[i];
return 0;
@ -2385,13 +2385,13 @@ static int msm_pcm_channel_mixer_weight_ctl_put(
}
chmixer_pspd = &(pdata->chmixer_pspd[fe_id][session_type]);
if (channel <= 0 || channel > PCM_FORMAT_MAX_NUM_CHANNEL) {
if (channel <= 0 || channel > PCM_FORMAT_MAX_NUM_CHANNEL_V2) {
pr_err("%s: invalid channel number %d\n", __func__, channel);
return -EINVAL;
}
channel--;
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
chmixer_pspd->channel_weight[channel][i] =
ucontrol->value.integer.value[i];
return 0;
@ -2421,14 +2421,14 @@ static int msm_pcm_channel_mixer_weight_ctl_get(
return -EINVAL;
}
if (channel <= 0 || channel > PCM_FORMAT_MAX_NUM_CHANNEL) {
if (channel <= 0 || channel > PCM_FORMAT_MAX_NUM_CHANNEL_V2) {
pr_err("%s: invalid channel number %d\n", __func__, channel);
return -EINVAL;
}
channel--;
chmixer_pspd = &(pdata->chmixer_pspd[fe_id][session_type]);
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
ucontrol->value.integer.value[i] =
chmixer_pspd->channel_weight[channel][i];
return 0;
@ -2878,7 +2878,7 @@ static int msm_pcm_add_channel_mixer_controls(struct snd_soc_pcm_runtime *rtd)
pr_err("%s: pcm add channel mixer output map controls failed:%d\n",
__func__, ret);
for (i = 1; i <= PCM_FORMAT_MAX_NUM_CHANNEL; i++)
for (i = 1; i <= PCM_FORMAT_MAX_NUM_CHANNEL_V2; i++)
ret |= msm_pcm_add_channel_mixer_weight_controls(rtd, i);
if (ret)
pr_err("%s: pcm add channel mixer weight controls failed:%d\n",

View file

@ -454,7 +454,7 @@ int adm_programable_channel_mixer(int port_id, int copp_idx, int session_id,
int channel_index)
{
struct adm_cmd_set_pspd_mtmx_strtr_params_v5 *adm_params = NULL;
struct param_hdr_v3 data_v5 = {0,};
struct param_hdr_v1 data_v5 = {0,};
int ret = 0, port_idx, sz = 0, param_size = 0;
u16 *adm_pspd_params;
u16 *ptr;
@ -511,7 +511,7 @@ int adm_programable_channel_mixer(int port_id, int copp_idx, int session_id,
data_v5.param_size = param_size;
adm_params->payload_size =
sizeof(struct default_chmixer_param_id_coeff) +
sizeof(struct param_hdr_v3) + data_v5.param_size;
sizeof(struct param_hdr_v1) + data_v5.param_size;
adm_pspd_params = (u16 *)((u8 *)adm_params +
sizeof(struct adm_cmd_set_pspd_mtmx_strtr_params_v5));
memcpy(adm_pspd_params, &data_v5, sizeof(data_v5));