Skip to content

Commit

Permalink
ASoC: fsi: add master clock control functions
Browse files Browse the repository at this point in the history
Current FSI driver required set_rate() platform callback function
to set audio clock if it was master mode,
because it seemed that CPG/FSI-DIV clocks calculation depend on
platform/board/cpu.
But it was calculable regardless of platform.
This patch supports audio clock calculation method,
but the sampling rate under 32kHz is not supported at this point.
Old type set_rate() is still supported now,
but it will be deleted on next version

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Nov 6, 2012
1 parent 80b4add commit ab6f6d8
Show file tree
Hide file tree
Showing 2 changed files with 378 additions and 6 deletions.
6 changes: 6 additions & 0 deletions include/sound/sh_fsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* A: inversion
* B: format mode
* C: chip specific
* D: clock selecter if master mode
*/

/* A: clock inversion */
Expand All @@ -44,6 +45,11 @@
#define SH_FSI_OPTION_MASK 0x00000F00
#define SH_FSI_ENABLE_STREAM_MODE (1 << 8) /* for 16bit data */

/* D: clock selecter if master mode */
#define SH_FSI_CLK_MASK 0x0000F000
#define SH_FSI_CLK_EXTERNAL (1 << 12)
#define SH_FSI_CLK_CPG (2 << 12) /* FSIxCK + FSI-DIV */

/*
* set_rate return value
*
Expand Down
Loading

0 comments on commit ab6f6d8

Please sign in to comment.