Lines Matching refs:hw_cfg
110 for (i = 0; i < ssp->ssp_prm[di].hw_cfg[hwi].tdm_slots; i++)
143 ssp->ssp_blob[di][hwi].sstsa = SSTSA_SSTSA(ssp->ssp_prm[di].hw_cfg[hwi].tx_slots);
146 ssp->ssp_blob[di][hwi].ssrsa = SSRSA_SSRSA(ssp->ssp_prm[di].hw_cfg[hwi].rx_slots);
148 switch (ssp->ssp_prm[di].hw_cfg[hwi].format & SSP_FMT_CLOCK_PROVIDER_MASK) {
172 switch (ssp->ssp_prm[di].hw_cfg[hwi].format & SSP_FMT_INV_MASK) {
242 if (!ssp->ssp_prm[di].hw_cfg[hwi].mclk_rate) {
244 ssp->ssp_prm[di].hw_cfg[hwi].mclk_rate);
248 if (!ssp->ssp_prm[di].hw_cfg[hwi].bclk_rate ||
249 ssp->ssp_prm[di].hw_cfg[hwi].bclk_rate > ssp->ssp_prm[di].hw_cfg[hwi].mclk_rate) {
251 ssp->ssp_prm[di].hw_cfg[hwi].bclk_rate,
252 ssp->ssp_prm[di].hw_cfg[hwi].mclk_rate);
257 if (ssp->ssp_prm[di].hw_cfg[hwi].bclk_rate % ssp->ssp_prm[di].hw_cfg[hwi].fsync_rate) {
259 ssp->ssp_prm[di].hw_cfg[hwi].bclk_rate,
260 ssp->ssp_prm[di].hw_cfg[hwi].fsync_rate);
265 bdiv = ssp->ssp_prm[di].hw_cfg[hwi].bclk_rate / ssp->ssp_prm[di].hw_cfg[hwi].fsync_rate;
266 if (bdiv < ssp->ssp_prm[di].hw_cfg[hwi].tdm_slot_width *
267 ssp->ssp_prm[di].hw_cfg[hwi].tdm_slots) {
269 ssp->ssp_prm[di].hw_cfg[hwi].tdm_slot_width *
270 ssp->ssp_prm[di].hw_cfg[hwi].tdm_slots);
275 if (ssp->ssp_prm[di].hw_cfg[hwi].tdm_slot_width > 38) {
277 ssp->ssp_prm[di].hw_cfg[hwi].tdm_slot_width);
281 bdiv_min = ssp->ssp_prm[di].hw_cfg[hwi].tdm_slots *
283 ssp->ssp_prm[di].hw_cfg[hwi].tdm_slot_width :
299 switch (ssp->ssp_prm[di].hw_cfg[hwi].format & SSP_FMT_FORMAT_MASK) {
304 ssp->ssp_blob[di][hwi].ssc0 |= SSCR0_FRDC(ssp->ssp_prm[di].hw_cfg[hwi].tdm_slots);
352 ssp->ssp_blob[di][hwi].ssc0 |= SSCR0_FRDC(ssp->ssp_prm[di].hw_cfg[hwi].tdm_slots);
409 SSCR0_FRDC(ssp->ssp_prm[di].hw_cfg[hwi].tdm_slots);
435 active_tx_slots = popcount(ssp->ssp_prm[di].hw_cfg[hwi].tx_slots);
436 active_rx_slots = popcount(ssp->ssp_prm[di].hw_cfg[hwi].rx_slots);
444 frame_end_padding = bdiv - ssp->ssp_prm[di].hw_cfg[hwi].tdm_slots *
445 ssp->ssp_prm[di].hw_cfg[hwi].tdm_slot_width;
447 slot_end_padding = ssp->ssp_prm[di].hw_cfg[hwi].tdm_slot_width -
467 ssp->ssp_prm[di].hw_cfg[hwi].format);
484 total_sample_size = ssp->ssp_prm[di].hw_cfg[hwi].tdm_slot_width *
485 ssp->ssp_prm[di].hw_cfg[hwi].tdm_slots;
487 ssp->ssp_prm[di].hw_cfg[hwi].fsync_rate)) {
497 ssp->ssp_prm[di].hw_cfg[hwi].fsync_rate);
528 if (ssp->ssp_prm[di].io_clk % ssp->ssp_prm[di].hw_cfg[hwi].mclk_rate) {
533 clk_div = ssp->ssp_prm[di].io_clk / ssp->ssp_prm[di].hw_cfg[hwi].mclk_rate;
805 *channel_count = ssp->ssp_prm[dai_index].hw_cfg[hw_index].tdm_slots;
806 *sample_rate = ssp->ssp_prm[dai_index].hw_cfg[hw_index].fsync_rate;
807 *bits_per_sample = ssp->ssp_prm[dai_index].hw_cfg[hw_index].tdm_slot_width;
975 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].format = SSP_FMT_I2S;
977 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].format = SSP_FMT_RIGHT_J;
979 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].format = SSP_FMT_LEFT_J;
981 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].format = SSP_FMT_DSP_A;
983 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].format = SSP_FMT_DSP_B;
993 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].format |= SSP_FMT_CBP_CFP;
995 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].format |= SSP_FMT_CBP_CFC;
999 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].format |= SSP_FMT_CBC_CFP;
1001 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].format |= SSP_FMT_CBC_CFC;
1007 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].format |= SSP_FMT_IB_IF;
1009 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].format |= SSP_FMT_IB_NF;
1012 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].format |= SSP_FMT_NB_IF;
1014 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].format |= SSP_FMT_NB_NF;
1017 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].mclk_rate = mclk_freq;
1018 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].bclk_rate = bclk_freq;
1019 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].fsync_rate = fsync_freq;
1020 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].tdm_slots = tdm_slots;
1021 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].tdm_slot_width = tdm_slot_width;
1022 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].tx_slots = tx_slots;
1023 ssp->ssp_prm[ssp->ssp_count].hw_cfg[hwi].rx_slots = rx_slots;