File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ static inline int ssp_set_config(struct dai *dai,
165165 uint32_t active_rx_slots = 2 ;
166166 uint32_t sample_width = 2 ;
167167
168+ bool inverted_bclk = false;
168169 bool inverted_frame = false;
169170 bool cfs = false;
170171 bool start_delay = false;
@@ -260,18 +261,28 @@ static inline int ssp_set_config(struct dai *dai,
260261 inverted_frame = true; /* handled later with format */
261262 break ;
262263 case SOF_DAI_FMT_IB_IF :
263- sspsp |= SSPSP_SCMODE ( 2 );
264+ inverted_bclk = true; /* handled later with bclk idle */
264265 inverted_frame = true; /* handled later with format */
265266 break ;
266267 case SOF_DAI_FMT_IB_NF :
267- sspsp |= SSPSP_SCMODE ( 2 );
268+ inverted_bclk = true; /* handled later with bclk idle */
268269 break ;
269270 default :
270271 trace_ssp_error ("ec3" );
271272 ret = - EINVAL ;
272273 goto out ;
273274 }
274275
276+ /* supporting bclk idle state */
277+ if (ssp -> params .clks_control &
278+ SOF_DAI_INTEL_SSP_CLKCTRL_BCLK_IDLE_HIGH ) {
279+ /* bclk idle state high */
280+ sspsp |= SSPSP_SCMODE ((inverted_bclk ^ 0x3 ) & 0x3 );
281+ } else {
282+ /* bclk idle state low */
283+ sspsp |= SSPSP_SCMODE (inverted_bclk );
284+ }
285+
275286 sscr0 |= SSCR0_MOD | SSCR0_ACS ;
276287
277288 mdivc = mn_reg_read (0x0 );
You can’t perform that action at this time.
0 commit comments