From 26f9e0e9d18cbc9f4304caa02b5e99a143c44a3e Mon Sep 17 00:00:00 2001 From: Jayasena Sangaraboina Date: Tue, 23 Oct 2012 16:52:01 -0700 Subject: [PATCH] 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 Change-Id: Ic067178f9d4cdb51b8fee5292b960922088c8539 Signed-off-by: Neha Pandey --- sound/soc/msm/msm8930.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sound/soc/msm/msm8930.c b/sound/soc/msm/msm8930.c index 4725e8e91c4f..5f22e4b22184 100644 --- a/sound/soc/msm/msm8930.c +++ b/sound/soc/msm/msm8930.c @@ -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 */ {