[alsa-devel] [PATCH 5/8] ASoC: fsi: modify wrong value setting order of TDM

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Jul 12 07:56:17 CEST 2010


channel size should be set before setting register value

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 sound/soc/sh/fsi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index efc0299..28aae0d 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -705,14 +705,14 @@ static int fsi_dai_startup(struct snd_pcm_substream *substream,
 		fsi->chan = 2;
 		break;
 	case SH_FSI_FMT_TDM:
-		data = CR_TDM | (fsi->chan - 1);
 		fsi->chan = is_play ?
 			SH_FSI_GET_CH_O(flags) : SH_FSI_GET_CH_I(flags);
+		data = CR_TDM | (fsi->chan - 1);
 		break;
 	case SH_FSI_FMT_TDM_DELAY:
-		data = CR_TDM_D | (fsi->chan - 1);
 		fsi->chan = is_play ?
 			SH_FSI_GET_CH_O(flags) : SH_FSI_GET_CH_I(flags);
+		data = CR_TDM_D | (fsi->chan - 1);
 		break;
 	default:
 		dev_err(dai->dev, "unknown format.\n");
-- 
1.7.0.4



More information about the Alsa-devel mailing list