mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ASoC: msm: Fixup of the SEC I2S port to 2 channels.
Add the fixup function for the SEC I2S backend to configure the number of channels to 2 and sample rate to 48000Khz. CRs-Fixed: 395160 Signed-off-by: Aviral Gupta <aviralg@codeaurora.org> (cherry picked from commit 695c30beb5b12f7f4b1169e6c65a1c67bef03c19) (cherry picked from commit cb3b26e043e1e32a543d799e1ba37a0e882f1aa6) Change-Id: I670881282655e20059ed7fa039f575b6411366bc Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
This commit is contained in:
parent
f3f2186813
commit
128534a9d7
1 changed files with 17 additions and 1 deletions
|
@ -809,6 +809,22 @@ static int msm_slim_0_tx_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int msm_be_i2s_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);
|
||||
|
||||
struct snd_interval *channels = hw_param_interval(params,
|
||||
SNDRV_PCM_HW_PARAM_CHANNELS);
|
||||
|
||||
pr_debug("%s()\n", __func__);
|
||||
rate->min = rate->max = 48000;
|
||||
channels->min = channels->max = 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int msm_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
|
||||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
|
@ -1339,7 +1355,7 @@ static struct snd_soc_dai_link msm_dai[] = {
|
|||
.codec_dai_name = "spdif_rx",
|
||||
.no_pcm = 1,
|
||||
.be_id = MSM_BACKEND_DAI_SEC_I2S_RX,
|
||||
.be_hw_params_fixup = msm_be_hw_params_fixup,
|
||||
.be_hw_params_fixup = msm_be_i2s_hw_params_fixup,
|
||||
.ops = &mpq8064_sec_i2s_rx_be_ops,
|
||||
.ignore_pmdown_time = 1, /* this dainlink has playback support */
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue