diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-08-02 06:42:44 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-02 06:42:44 -0700 |
| commit | 04e7ebf1916fcf6abc274e056686deb313366db2 (patch) | |
| tree | 6b5982accd88f41bfd0db5c893b4ff4150c94e24 | |
| parent | eeea2ec1ced1cd90d5a2a318869a1d434462d1e2 (diff) | |
| parent | f6613b21f80814dd6076d883ef5ad69ccc6683e9 (diff) | |
Merge "ASoC: msmcobalt: fix proxy channels index value"
| -rw-r--r-- | sound/soc/msm/msmcobalt.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/soc/msm/msmcobalt.c b/sound/soc/msm/msmcobalt.c index ea3c303717b9..945250babf2d 100644 --- a/sound/soc/msm/msmcobalt.c +++ b/sound/soc/msm/msmcobalt.c @@ -1076,7 +1076,7 @@ static int proxy_rx_ch_get(struct snd_kcontrol *kcontrol, { pr_debug("%s: proxy_rx channels = %d\n", __func__, proxy_rx_cfg.channels); - ucontrol->value.integer.value[0] = proxy_rx_cfg.channels - 1; + ucontrol->value.integer.value[0] = proxy_rx_cfg.channels - 2; return 0; } @@ -1084,7 +1084,7 @@ static int proxy_rx_ch_get(struct snd_kcontrol *kcontrol, static int proxy_rx_ch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - proxy_rx_cfg.channels = ucontrol->value.integer.value[0] + 1; + proxy_rx_cfg.channels = ucontrol->value.integer.value[0] + 2; pr_debug("%s: proxy_rx channels = %d\n", __func__, proxy_rx_cfg.channels); @@ -1375,15 +1375,11 @@ static int msm_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, case MSM_BACKEND_DAI_HDMI_RX: param_set_mask(params, SNDRV_PCM_HW_PARAM_FORMAT, hdmi_rx_cfg.bit_format); - if (channels->max < 2) - channels->min = channels->max = 2; rate->min = rate->max = hdmi_rx_cfg.sample_rate; channels->min = channels->max = hdmi_rx_cfg.channels; break; case MSM_BACKEND_DAI_AFE_PCM_RX: - if (channels->max < 2) - channels->min = channels->max = 2; channels->min = channels->max = proxy_rx_cfg.channels; rate->min = rate->max = SAMPLING_RATE_48KHZ; break; |
