File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -252,6 +252,40 @@ static inline int ssp_set_config(struct dai *dai,
252252
253253 sscr0 |= SSCR0_MOD | SSCR0_ACS ;
254254
255+ /* Additional hardware settings */
256+
257+ /* Receiver Time-out Interrupt Disabled/Enabled */
258+ sscr1 |= (ssp -> params .quirks & SOF_DAI_INTEL_SSP_QUIRK_TINTE ) ?
259+ SSCR1_TINTE : 0 ;
260+
261+ /* Peripheral Trailing Byte Interrupts Disable/Enable */
262+ sscr1 |= (ssp -> params .quirks & SOF_DAI_INTEL_SSP_QUIRK_PINTE ) ?
263+ SSCR1_PINTE : 0 ;
264+
265+ /* Transmit data are driven at the same/opposite clock edge specified
266+ * in SSPSP.SCMODE[1:0]
267+ */
268+ sscr2 |= (ssp -> params .quirks & SOF_DAI_INTEL_SSP_QUIRK_SMTATF ) ?
269+ SSCR2_SMTATF : 0 ;
270+
271+ /* Receive data are sampled at the same/opposite clock edge specified
272+ * in SSPSP.SCMODE[1:0]
273+ */
274+ sscr2 |= (ssp -> params .quirks & SOF_DAI_INTEL_SSP_QUIRK_MMRATF ) ?
275+ SSCR2_MMRATF : 0 ;
276+
277+ /* Enable/disable the fix for PSP slave mode TXD wait for frame
278+ * de-assertion before starting the second channel
279+ */
280+ sscr2 |= (ssp -> params .quirks & SOF_DAI_INTEL_SSP_QUIRK_PSPSTWFDFD ) ?
281+ SSCR2_PSPSTWFDFD : 0 ;
282+
283+ /* Enable/disable the fix for PSP master mode FSRT with dummy stop &
284+ * frame end padding capability
285+ */
286+ sscr2 |= (ssp -> params .quirks & SOF_DAI_INTEL_SSP_QUIRK_PSPSRWFDFD ) ?
287+ SSCR2_PSPSRWFDFD : 0 ;
288+
255289 mdivc = 0x1 ;
256290#ifdef CONFIG_CANNONLAKE
257291 if (!config -> ssp .mclk_rate || config -> ssp .mclk_rate > F_24000_kHz ) {
Original file line number Diff line number Diff line change @@ -133,9 +133,13 @@ extern const struct dai_ops ssp_ops;
133133#elif defined CONFIG_APOLLOLAKE || defined CONFIG_CANNONLAKE \
134134 || defined CONFIG_HASWELL || defined CONFIG_BROADWELL
135135#define SSCR2_TURM1 BIT(1)
136+ #define SSCR2_PSPSRWFDFD BIT(3)
137+ #define SSCR2_PSPSTWFDFD BIT(4)
136138#define SSCR2_SDFD BIT(14)
137139#define SSCR2_SDPM BIT(16)
138140#define SSCR2_LJDFD BIT(17)
141+ #define SSCR2_MMRATF BIT(18)
142+ #define SSCR2_SMTATF BIT(19)
139143#endif
140144
141145
Original file line number Diff line number Diff line change @@ -226,6 +226,15 @@ struct sof_ipc_compound_hdr {
226226#define SOF_DAI_FMT_INV_MASK 0x0f00
227227#define SOF_DAI_FMT_MASTER_MASK 0xf000
228228
229+ #define SOF_DAI_INTEL_SSP_QUIRK_TINTE (1 << 0) /* ssc1: TINTE */
230+ #define SOF_DAI_INTEL_SSP_QUIRK_PINTE (1 << 1) /* ssc1: PINTE */
231+ #define SOF_DAI_INTEL_SSP_QUIRK_SMTATF (1 << 2) /* ssc2: SMTATF */
232+ #define SOF_DAI_INTEL_SSP_QUIRK_MMRATF (1 << 3) /* ssc2: MMRATF */
233+ #define SOF_DAI_INTEL_SSP_QUIRK_PSPSTWFDFD (1 << 4) /* ssc2: PSPSTWFDFD */
234+ #define SOF_DAI_INTEL_SSP_QUIRK_PSPSRWFDFD (1 << 5) /* ssc2: PSPSRWFDFD*/
235+ /* here is the possibility to define others aux macros */
236+
237+
229238/** \brief Types of DAI */
230239enum sof_ipc_dai_type {
231240 SOF_DAI_INTEL_NONE = 0 , /**< None */
@@ -259,7 +268,7 @@ struct sof_ipc_dai_ssp_params {
259268 uint32_t bclk_keep_active ;
260269 uint32_t fs_keep_active ;
261270
262- // uint32_t quirks; // FIXME: is 32 bits enough ?
271+ uint32_t quirks ; // FIXME: is 32 bits enough ?
263272
264273 /* private data, e.g. for quirks */
265274 //uint32_t pdata[10]; // FIXME: would really need ~16 u32
You can’t perform that action at this time.
0 commit comments