File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -266,6 +266,40 @@ static inline int ssp_set_config(struct dai *dai,
266266
267267 sscr0 |= SSCR0_MOD | SSCR0_ACS ;
268268
269+ /* Additional hardware settings */
270+
271+ /* Receiver Time-out Interrupt Disabled/Enabled */
272+ sscr1 |= (ssp -> params .quirks & SOF_DAI_INTEL_SSP_QUIRK_TINTE ) ?
273+ SSCR1_TINTE : 0 ;
274+
275+ /* Peripheral Trailing Byte Interrupts Disable/Enable */
276+ sscr1 |= (ssp -> params .quirks & SOF_DAI_INTEL_SSP_QUIRK_PINTE ) ?
277+ SSCR1_PINTE : 0 ;
278+
279+ /* Transmit data are driven at the same/opposite clock edge specified
280+ * in SSPSP.SCMODE[1:0]
281+ */
282+ sscr2 |= (ssp -> params .quirks & SOF_DAI_INTEL_SSP_QUIRK_SMTATF ) ?
283+ SSCR2_SMTATF : 0 ;
284+
285+ /* Receive data are sampled at the same/opposite clock edge specified
286+ * in SSPSP.SCMODE[1:0]
287+ */
288+ sscr2 |= (ssp -> params .quirks & SOF_DAI_INTEL_SSP_QUIRK_MMRATF ) ?
289+ SSCR2_MMRATF : 0 ;
290+
291+ /* Enable/disable the fix for PSP slave mode TXD wait for frame
292+ * de-assertion before starting the second channel
293+ */
294+ sscr2 |= (ssp -> params .quirks & SOF_DAI_INTEL_SSP_QUIRK_PSPSTWFDFD ) ?
295+ SSCR2_PSPSTWFDFD : 0 ;
296+
297+ /* Enable/disable the fix for PSP master mode FSRT with dummy stop &
298+ * frame end padding capability
299+ */
300+ sscr2 |= (ssp -> params .quirks & SOF_DAI_INTEL_SSP_QUIRK_PSPSRWFDFD ) ?
301+ SSCR2_PSPSRWFDFD : 0 ;
302+
269303 mdivc = 0x1 ;
270304#ifdef CONFIG_CANNONLAKE
271305 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