summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 667f919)
raw | patch | inline | side by side (parent: 667f919)
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | |
Wed, 19 Aug 2015 07:02:04 +0000 (10:02 +0300) | ||
committer | Misael Lopez Cruz <misael.lopez@ti.com> | |
Thu, 20 Aug 2015 16:58:52 +0000 (11:58 -0500) |
In case when the dai format is set via the dai_link the format
configuration happens once when the links are probed. If the McASP lose
context after this, the information will be lost and McASP will not going
to work correctly.
To overcome this issue, we save the fmt and set it within hw_params as
well.
Reported-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
configuration happens once when the links are probed. If the McASP lose
context after this, the information will be lost and McASP will not going
to work correctly.
To overcome this issue, we save the fmt and set it within hw_params as
well.
Reported-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
sound/soc/davinci/davinci-mcasp.c | patch | blob | history |
index 9ffe431e0819132960b5fe7f5f75d0cc94622417..d89364a203fbbf167c89189cfe797a8d214672cf 100644 (file)
u32 fifo_base;
struct device *dev;
struct snd_pcm_substream *substreams[2];
+ unsigned int dai_fmt;
/* McASP specific data */
int tdm_slots;
bool fs_pol_rising;
bool inv_fs = false;
+ if (!fmt)
+ return 0;
+
pm_runtime_get_sync(mcasp->dev);
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_DSP_A:
mcasp_set_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG, FSXPOL);
mcasp_set_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG, FSRPOL);
}
+
+ mcasp->dai_fmt = fmt;
out:
pm_runtime_put(mcasp->dev);
return ret;
if (mcasp->op_mode == DAVINCI_MCASP_IIS_MODE)
mcasp->channels = channels;
- return 0;
+ return davinci_mcasp_set_dai_fmt(cpu_dai, mcasp->dai_fmt);
}
static int davinci_mcasp_trigger(struct snd_pcm_substream *substream,