aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/sh_fsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/sh_fsi.h')
-rw-r--r--include/sound/sh_fsi.h49
1 files changed, 43 insertions, 6 deletions
diff --git a/include/sound/sh_fsi.h b/include/sound/sh_fsi.h
index c0227361a876..9d51d6f35893 100644
--- a/include/sound/sh_fsi.h
+++ b/include/sound/sh_fsi.h
@@ -12,6 +12,9 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14 14
15#define FSI_PORT_A 0
16#define FSI_PORT_B 1
17
15/* flags format 18/* flags format
16 19
17 * 0xABCDEEFF 20 * 0xABCDEEFF
@@ -55,12 +58,14 @@
55#define SH_FSI_GET_IFMT(x) ((x >> 8) & SH_FSI_FMT_MASK) 58#define SH_FSI_GET_IFMT(x) ((x >> 8) & SH_FSI_FMT_MASK)
56#define SH_FSI_GET_OFMT(x) ((x >> 0) & SH_FSI_FMT_MASK) 59#define SH_FSI_GET_OFMT(x) ((x >> 0) & SH_FSI_FMT_MASK)
57 60
58#define SH_FSI_FMT_MONO (1 << 0) 61#define SH_FSI_FMT_MONO 0
59#define SH_FSI_FMT_MONO_DELAY (1 << 1) 62#define SH_FSI_FMT_MONO_DELAY 1
60#define SH_FSI_FMT_PCM (1 << 2) 63#define SH_FSI_FMT_PCM 2
61#define SH_FSI_FMT_I2S (1 << 3) 64#define SH_FSI_FMT_I2S 3
62#define SH_FSI_FMT_TDM (1 << 4) 65#define SH_FSI_FMT_TDM 4
63#define SH_FSI_FMT_TDM_DELAY (1 << 5) 66#define SH_FSI_FMT_TDM_DELAY 5
67#define SH_FSI_FMT_SPDIF 6
68
64 69
65#define SH_FSI_IFMT_TDM_CH(x) \ 70#define SH_FSI_IFMT_TDM_CH(x) \
66 (SH_FSI_IFMT(TDM) | SH_FSI_SET_CH_I(x)) 71 (SH_FSI_IFMT(TDM) | SH_FSI_SET_CH_I(x))
@@ -72,9 +77,41 @@
72#define SH_FSI_OFMT_TDM_DELAY_CH(x) \ 77#define SH_FSI_OFMT_TDM_DELAY_CH(x) \
73 (SH_FSI_OFMT(TDM_DELAY) | SH_FSI_SET_CH_O(x)) 78 (SH_FSI_OFMT(TDM_DELAY) | SH_FSI_SET_CH_O(x))
74 79
80
81/*
82 * set_rate return value
83 *
84 * see ACKMD/BPFMD on
85 * ACK_MD (FSI2)
86 * CKG1 (FSI)
87 *
88 * err: return value < 0
89 *
90 * 0x-00000AB
91 *
92 * A: ACKMD value
93 * B: BPFMD value
94 */
95
96#define SH_FSI_ACKMD_MASK (0xF << 0)
97#define SH_FSI_ACKMD_512 (1 << 0)
98#define SH_FSI_ACKMD_256 (2 << 0)
99#define SH_FSI_ACKMD_128 (3 << 0)
100#define SH_FSI_ACKMD_64 (4 << 0)
101#define SH_FSI_ACKMD_32 (5 << 0)
102
103#define SH_FSI_BPFMD_MASK (0xF << 4)
104#define SH_FSI_BPFMD_512 (1 << 4)
105#define SH_FSI_BPFMD_256 (2 << 4)
106#define SH_FSI_BPFMD_128 (3 << 4)
107#define SH_FSI_BPFMD_64 (4 << 4)
108#define SH_FSI_BPFMD_32 (5 << 4)
109#define SH_FSI_BPFMD_16 (6 << 4)
110
75struct sh_fsi_platform_info { 111struct sh_fsi_platform_info {
76 unsigned long porta_flags; 112 unsigned long porta_flags;
77 unsigned long portb_flags; 113 unsigned long portb_flags;
114 int (*set_rate)(int is_porta, int rate); /* for master mode */
78}; 115};
79 116
80extern struct snd_soc_dai fsi_soc_dai[2]; 117extern struct snd_soc_dai fsi_soc_dai[2];