[alsa-devel] [PATCH 0/2] ASoC: fsi: fixup patches
Dear Mark
These are v2 bug fix patches for FSI driver.
Kuninori Morimoto (2): ASoC: fsi: fixup clock inversion operation ASoC: fsi: fixup wrong value setting order of TDM
v1 -> v2
It is bug fix only
Best regards -- Kuninori Morimoto
Clock inversion should be specified by each flags bit.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/sh/fsi.c | 23 +++++++++-------------- 1 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 3396a0d..4fa7508 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -683,20 +683,15 @@ static int fsi_dai_startup(struct snd_pcm_substream *substream,
/* clock inversion (CKG2) */ data = 0; - switch (SH_FSI_INVERSION_MASK & flags) { - case SH_FSI_LRM_INV: - data = 1 << 12; - break; - case SH_FSI_BRM_INV: - data = 1 << 8; - break; - case SH_FSI_LRS_INV: - data = 1 << 4; - break; - case SH_FSI_BRS_INV: - data = 1 << 0; - break; - } + if (SH_FSI_LRM_INV & flags) + data |= 1 << 12; + if (SH_FSI_BRM_INV & flags) + data |= 1 << 8; + if (SH_FSI_LRS_INV & flags) + data |= 1 << 4; + if (SH_FSI_BRS_INV & flags) + data |= 1 << 0; + fsi_reg_write(fsi, CKG2, data);
/* do fmt, di fmt */
channel size should be set before setting register value
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@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 4fa7508..ec4acac 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -721,15 +721,15 @@ static int fsi_dai_startup(struct snd_pcm_substream *substream, break; case SH_FSI_FMT_TDM: msg = "TDM"; - data = CR_FMT(CR_TDM) | (fsi->chan - 1); fsi->chan = is_play ? SH_FSI_GET_CH_O(flags) : SH_FSI_GET_CH_I(flags); + data = CR_FMT(CR_TDM) | (fsi->chan - 1); break; case SH_FSI_FMT_TDM_DELAY: msg = "TDM Delay"; - data = CR_FMT(CR_TDM_D) | (fsi->chan - 1); fsi->chan = is_play ? SH_FSI_GET_CH_O(flags) : SH_FSI_GET_CH_I(flags); + data = CR_FMT(CR_TDM_D) | (fsi->chan - 1); break; default: dev_err(dai->dev, "unknown format.\n");
On Tue, 2010-07-13 at 11:58 +0900, Kuninori Morimoto wrote:
Dear Mark
These are v2 bug fix patches for FSI driver.
Kuninori Morimoto (2): ASoC: fsi: fixup clock inversion operation ASoC: fsi: fixup wrong value setting order of TDM
v1 -> v2
It is bug fix only
Please CC me on all ASoC patches, otherwise I tend to miss them when checking my mail.
Acked-by: Liam Girdwood lrg@slimlogic.co.uk
On Tue, Jul 13, 2010 at 11:48:27AM +0100, Liam Girdwood wrote:
Please CC me on all ASoC patches, otherwise I tend to miss them when checking my mail.
Acked-by: Liam Girdwood lrg@slimlogic.co.uk
Applied both, thanks.
participants (3)
-
Kuninori Morimoto
-
Liam Girdwood
-
Mark Brown