diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2010-07-12 23:13:14 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-07-13 07:35:39 -0400 |
commit | ccad7b44ccdc8341c1449bc5b864b42b197f8c2e (patch) | |
tree | 108725d49aaafe94b2b2be94e29b96d36b7ae637 /include/sound | |
parent | d78541473d6c6126616bca2552282660faa41d43 (diff) |
ASoC: fsi: Fixup for master mode
This patch add hw_params to snd_soc_dai_ops,
because board specific set_rate is needed
when FSI was used as master mode.
This patch remove fsi_clk_ctrl from fsi_dai_startup,
because clock should be disabled before set_rate.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/sh_fsi.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/sound/sh_fsi.h b/include/sound/sh_fsi.h index 3ecdb965b890..2c6237e6c045 100644 --- a/include/sound/sh_fsi.h +++ b/include/sound/sh_fsi.h | |||
@@ -72,9 +72,41 @@ | |||
72 | #define SH_FSI_OFMT_TDM_DELAY_CH(x) \ | 72 | #define SH_FSI_OFMT_TDM_DELAY_CH(x) \ |
73 | (SH_FSI_OFMT(TDM_DELAY) | SH_FSI_SET_CH_O(x)) | 73 | (SH_FSI_OFMT(TDM_DELAY) | SH_FSI_SET_CH_O(x)) |
74 | 74 | ||
75 | |||
76 | /* | ||
77 | * set_rate return value | ||
78 | * | ||
79 | * see ACKMD/BPFMD on | ||
80 | * ACK_MD (FSI2) | ||
81 | * CKG1 (FSI) | ||
82 | * | ||
83 | * err: return value < 0 | ||
84 | * | ||
85 | * 0x-00000AB | ||
86 | * | ||
87 | * A: ACKMD value | ||
88 | * B: BPFMD value | ||
89 | */ | ||
90 | |||
91 | #define SH_FSI_ACKMD_MASK (0xF << 0) | ||
92 | #define SH_FSI_ACKMD_512 (1 << 0) | ||
93 | #define SH_FSI_ACKMD_256 (2 << 0) | ||
94 | #define SH_FSI_ACKMD_128 (3 << 0) | ||
95 | #define SH_FSI_ACKMD_64 (4 << 0) | ||
96 | #define SH_FSI_ACKMD_32 (5 << 0) | ||
97 | |||
98 | #define SH_FSI_BPFMD_MASK (0xF << 4) | ||
99 | #define SH_FSI_BPFMD_512 (1 << 4) | ||
100 | #define SH_FSI_BPFMD_256 (2 << 4) | ||
101 | #define SH_FSI_BPFMD_128 (3 << 4) | ||
102 | #define SH_FSI_BPFMD_64 (4 << 4) | ||
103 | #define SH_FSI_BPFMD_32 (5 << 4) | ||
104 | #define SH_FSI_BPFMD_16 (6 << 4) | ||
105 | |||
75 | struct sh_fsi_platform_info { | 106 | struct sh_fsi_platform_info { |
76 | unsigned long porta_flags; | 107 | unsigned long porta_flags; |
77 | unsigned long portb_flags; | 108 | unsigned long portb_flags; |
109 | int (*set_rate)(int is_porta, int rate); /* for master mode */ | ||
78 | }; | 110 | }; |
79 | 111 | ||
80 | extern struct snd_soc_dai fsi_soc_dai[2]; | 112 | extern struct snd_soc_dai fsi_soc_dai[2]; |