mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
d78541473d
commit
ccad7b44cc
2 changed files with 124 additions and 6 deletions
|
|
@ -72,9 +72,41 @@
|
|||
#define SH_FSI_OFMT_TDM_DELAY_CH(x) \
|
||||
(SH_FSI_OFMT(TDM_DELAY) | SH_FSI_SET_CH_O(x))
|
||||
|
||||
|
||||
/*
|
||||
* set_rate return value
|
||||
*
|
||||
* see ACKMD/BPFMD on
|
||||
* ACK_MD (FSI2)
|
||||
* CKG1 (FSI)
|
||||
*
|
||||
* err: return value < 0
|
||||
*
|
||||
* 0x-00000AB
|
||||
*
|
||||
* A: ACKMD value
|
||||
* B: BPFMD value
|
||||
*/
|
||||
|
||||
#define SH_FSI_ACKMD_MASK (0xF << 0)
|
||||
#define SH_FSI_ACKMD_512 (1 << 0)
|
||||
#define SH_FSI_ACKMD_256 (2 << 0)
|
||||
#define SH_FSI_ACKMD_128 (3 << 0)
|
||||
#define SH_FSI_ACKMD_64 (4 << 0)
|
||||
#define SH_FSI_ACKMD_32 (5 << 0)
|
||||
|
||||
#define SH_FSI_BPFMD_MASK (0xF << 4)
|
||||
#define SH_FSI_BPFMD_512 (1 << 4)
|
||||
#define SH_FSI_BPFMD_256 (2 << 4)
|
||||
#define SH_FSI_BPFMD_128 (3 << 4)
|
||||
#define SH_FSI_BPFMD_64 (4 << 4)
|
||||
#define SH_FSI_BPFMD_32 (5 << 4)
|
||||
#define SH_FSI_BPFMD_16 (6 << 4)
|
||||
|
||||
struct sh_fsi_platform_info {
|
||||
unsigned long porta_flags;
|
||||
unsigned long portb_flags;
|
||||
int (*set_rate)(int is_porta, int rate); /* for master mode */
|
||||
};
|
||||
|
||||
extern struct snd_soc_dai fsi_soc_dai[2];
|
||||
|
|
|
|||
Loading…
Reference in a new issue