Lines Matching refs:pdi
1241 struct sdw_cdns_pdi *pdi; in cdns_allocate_pdi() local
1247 pdi = devm_kcalloc(cdns->dev, num, sizeof(*pdi), GFP_KERNEL); in cdns_allocate_pdi()
1248 if (!pdi) in cdns_allocate_pdi()
1252 pdi[i].num = i + pdi_offset; in cdns_allocate_pdi()
1255 *stream = pdi; in cdns_allocate_pdi()
1816 struct sdw_cdns_pdi *pdi, in cdns_find_pdi() argument
1822 if (pdi[i].num == dai_id) in cdns_find_pdi()
1823 return &pdi[i]; in cdns_find_pdi()
1837 u32 ch, u32 dir, struct sdw_cdns_pdi *pdi) in sdw_cdns_config_stream() argument
1847 offset = CDNS_PORTCTRL + pdi->num * CDNS_PORT_OFFSET; in sdw_cdns_config_stream()
1852 val = pdi->num; in sdw_cdns_config_stream()
1855 cdns_writel(cdns, CDNS_PDI_CONFIG(pdi->num), val); in sdw_cdns_config_stream()
1872 struct sdw_cdns_pdi *pdi = NULL; in sdw_cdns_alloc_pdi() local
1875 pdi = cdns_find_pdi(cdns, 0, stream->num_in, stream->in, in sdw_cdns_alloc_pdi()
1878 pdi = cdns_find_pdi(cdns, 0, stream->num_out, stream->out, in sdw_cdns_alloc_pdi()
1882 if (!pdi) in sdw_cdns_alloc_pdi()
1883 pdi = cdns_find_pdi(cdns, 0, stream->num_bd, stream->bd, in sdw_cdns_alloc_pdi()
1886 if (pdi) { in sdw_cdns_alloc_pdi()
1887 pdi->l_ch_num = 0; in sdw_cdns_alloc_pdi()
1888 pdi->h_ch_num = ch - 1; in sdw_cdns_alloc_pdi()
1889 pdi->dir = dir; in sdw_cdns_alloc_pdi()
1890 pdi->ch_count = ch; in sdw_cdns_alloc_pdi()
1893 return pdi; in sdw_cdns_alloc_pdi()