ASoc: msm8930: Add fix for Unsupported Proxy backend sample rates

- AFE does not support sampling rate 44.1k
- This fix addresses the issue by setting backend proxy device
sampling rate to 48k

(cherry picked from commit 69ab7356a72981032d5d403ec1508dcfaeb7075f)
CRs-fixed: 413871
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>

Change-Id: Ic067178f9d4cdb51b8fee5292b960922088c8539
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
This commit is contained in:
Jayasena Sangaraboina 2012-10-23 16:52:01 -07:00 committed by Stephen Boyd
parent a1463d9af3
commit 26f9e0e9d1
1 changed files with 14 additions and 0 deletions

View File

@ -792,6 +792,18 @@ static int msm8930_auxpcm_be_params_fixup(struct snd_soc_pcm_runtime *rtd,
return 0;
}
static int msm8930_proxy_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params)
{
struct snd_interval *rate = hw_param_interval(params,
SNDRV_PCM_HW_PARAM_RATE);
pr_debug("%s()\n", __func__);
rate->min = rate->max = 48000;
return 0;
}
static int msm8930_aux_pcm_get_gpios(void)
{
int ret = 0;
@ -1199,6 +1211,7 @@ static struct snd_soc_dai_link msm8930_dai[] = {
.codec_dai_name = "msm-stub-rx",
.no_pcm = 1,
.be_id = MSM_BACKEND_DAI_AFE_PCM_RX,
.be_hw_params_fixup = msm8930_proxy_be_hw_params_fixup,
.ignore_pmdown_time = 1, /* this dainlink has playback support */
},
{
@ -1210,6 +1223,7 @@ static struct snd_soc_dai_link msm8930_dai[] = {
.codec_dai_name = "msm-stub-tx",
.no_pcm = 1,
.be_id = MSM_BACKEND_DAI_AFE_PCM_TX,
.be_hw_params_fixup = msm8930_proxy_be_hw_params_fixup,
},
/* AUX PCM Backend DAI Links */
{