* [PATCH v2] ASoC: fsl_ssi: Set default slot number for common cases
@ 2014-01-09 10:42 Nicolin Chen
2014-01-09 17:34 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Nicolin Chen @ 2014-01-09 10:42 UTC (permalink / raw)
To: broonie, timur
Cc: alsa-devel, tiwai, linuxppc-dev, lgirdwood, perex, festevam
For those platforms using DAI master mode like I2S, it's better to pre-set
a default slot number so that there's no need for these common cases to set
the slot number from its machine driver any more.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
---
Changelog
v2:
* Correct coding style for multi-line comment.
sound/soc/fsl/fsl_ssi.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 94dedcb..aad2a1f 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -711,6 +711,17 @@ static int fsl_ssi_setup(struct fsl_ssi_private *ssi_private)
if (ssi_private->imx_ac97)
fsl_ssi_setup_ac97(ssi_private);
+ /*
+ * Set a default slot number so that there is no need for those common
+ * cases like I2S mode to call the extra set_tdm_slot() any more.
+ */
+ if (!ssi_private->imx_ac97) {
+ write_ssi_mask(&ssi->stccr, CCSR_SSI_SxCCR_DC_MASK,
+ CCSR_SSI_SxCCR_DC(2));
+ write_ssi_mask(&ssi->srccr, CCSR_SSI_SxCCR_DC_MASK,
+ CCSR_SSI_SxCCR_DC(2));
+ }
+
return 0;
}
--
1.8.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] ASoC: fsl_ssi: Set default slot number for common cases
2014-01-09 10:42 [PATCH v2] ASoC: fsl_ssi: Set default slot number for common cases Nicolin Chen
@ 2014-01-09 17:34 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-01-09 17:34 UTC (permalink / raw)
To: Nicolin Chen
Cc: alsa-devel, lgirdwood, tiwai, festevam, timur, perex,
linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 508 bytes --]
On Thu, Jan 09, 2014 at 06:42:48PM +0800, Nicolin Chen wrote:
> For those platforms using DAI master mode like I2S, it's better to pre-set
> a default slot number so that there's no need for these common cases to set
> the slot number from its machine driver any more.
Applied, thanks - but note that this will mean anything that does want
non-default TDM will need to set it every single time it runs rather
than being able to do it once on init. This might need revisiting if
there are users doing that.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-09 17:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-09 10:42 [PATCH v2] ASoC: fsl_ssi: Set default slot number for common cases Nicolin Chen
2014-01-09 17:34 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox