[alsa-devel] [PATCH 2/2] ASoC: samsung: Use ASoC dmaengine code where possible
Mark Brown
broonie at kernel.org
Thu Nov 28 12:53:51 CET 2013
On Thu, Nov 28, 2013 at 03:29:31PM +0530, Padma Venkat wrote:
> On Wed, Nov 27, 2013 at 8:35 PM, Mark Brown <broonie at kernel.org> wrote:
> > But if it's initialised at probe time then when is it getting
> > overwritten? This must be something triggered by DT which unfortunately
> > I can't test. It's a bit of a shame that the flows are different
> > between the DT and non-DT cases.
> it's getting overwritten in i2s_hw_params which is happening after
> dma_data got initialized in dai probe. Based on mono or stereo channel
> this value getting initialized to 2 or 4 respectively in
> i2s_hw_params. This value is not triggered by DT now.
OK, so we can probably just reinitialise the dmaengine data after we
reset it? Like below
> > Are you sure that dma_size should be 2? The i2s DAI driver seems to be
> > hard coding it to 4.
> I think for mono files the dma_size should be 2 only. Right now based
> on mono or stereo this value getting overwritten in i2s_hw_params.
> Initially it is hardcoded to 4. Due to this commit "ASoC: samsung:
> Allow mono in i2s driver" which was not there earlier, I got confused.
> Now it seems clear except that underrun message which I am still
> debugging.
Yeah, that's now confusing - I'll send a patch to remove the
initialisation on probe() since it's getting overwritten later.
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 67d9fa91fdb9..ba24a954b9e4 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -702,6 +702,8 @@ static int i2s_hw_params(struct snd_pcm_substream *substream,
}
writel(mod, i2s->addr + I2SMOD);
+ samsung_asoc_init_dma_data(dai, &i2s->dma_playback, &i2s->dma_capture);
+
i2s->frmclk = params_rate(params);
return 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20131128/a94c9701/attachment.sig>
More information about the Alsa-devel
mailing list