Lines Matching refs:channel
31 uint32_t channel, in intel_adsp_hda_dma_host_in_config() argument
39 __ASSERT(channel < cfg->dma_channels, "Channel does not exist"); in intel_adsp_hda_dma_host_in_config()
49 res = intel_adsp_hda_set_buffer(cfg->base, cfg->regblock_size, channel, buf, in intel_adsp_hda_dma_host_in_config()
53 *DGMBS(cfg->base, cfg->regblock_size, channel) = in intel_adsp_hda_dma_host_in_config()
56 intel_adsp_hda_set_sample_container_size(cfg->base, cfg->regblock_size, channel, in intel_adsp_hda_dma_host_in_config()
65 uint32_t channel, in intel_adsp_hda_dma_host_out_config() argument
73 __ASSERT(channel < cfg->dma_channels, "Channel does not exist"); in intel_adsp_hda_dma_host_out_config()
84 res = intel_adsp_hda_set_buffer(cfg->base, cfg->regblock_size, channel, buf, in intel_adsp_hda_dma_host_out_config()
88 *DGMBS(cfg->base, cfg->regblock_size, channel) = in intel_adsp_hda_dma_host_out_config()
91 intel_adsp_hda_set_sample_container_size(cfg->base, cfg->regblock_size, channel, in intel_adsp_hda_dma_host_out_config()
99 uint32_t channel, in intel_adsp_hda_dma_link_in_config() argument
107 __ASSERT(channel < cfg->dma_channels, "Channel does not exist"); in intel_adsp_hda_dma_link_in_config()
117 res = intel_adsp_hda_set_buffer(cfg->base, cfg->regblock_size, channel, buf, in intel_adsp_hda_dma_link_in_config()
120 intel_adsp_hda_set_sample_container_size(cfg->base, cfg->regblock_size, channel, in intel_adsp_hda_dma_link_in_config()
129 uint32_t channel, in intel_adsp_hda_dma_link_out_config() argument
137 __ASSERT(channel < cfg->dma_channels, "Channel does not exist"); in intel_adsp_hda_dma_link_out_config()
148 res = intel_adsp_hda_set_buffer(cfg->base, cfg->regblock_size, channel, buf, in intel_adsp_hda_dma_link_out_config()
151 intel_adsp_hda_set_sample_container_size(cfg->base, cfg->regblock_size, channel, in intel_adsp_hda_dma_link_out_config()
159 int intel_adsp_hda_dma_link_reload(const struct device *dev, uint32_t channel, in intel_adsp_hda_dma_link_reload() argument
164 __ASSERT(channel < cfg->dma_channels, "Channel does not exist"); in intel_adsp_hda_dma_link_reload()
166 intel_adsp_hda_link_commit(cfg->base, cfg->regblock_size, channel, size); in intel_adsp_hda_dma_link_reload()
171 int intel_adsp_hda_dma_host_reload(const struct device *dev, uint32_t channel, in intel_adsp_hda_dma_host_reload() argument
176 __ASSERT(channel < cfg->dma_channels, "Channel does not exist"); in intel_adsp_hda_dma_host_reload()
180 channel); in intel_adsp_hda_dma_host_reload()
190 const uint32_t rp = *DGBRP(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_host_reload()
195 channel, next_rp); in intel_adsp_hda_dma_host_reload()
196 intel_adsp_hda_enable_buffer_interrupt(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_host_reload()
200 const uint32_t wp = *DGBWP(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_host_reload()
205 channel, next_wp); in intel_adsp_hda_dma_host_reload()
206 intel_adsp_hda_enable_buffer_interrupt(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_host_reload()
213 intel_adsp_hda_host_commit(cfg->base, cfg->regblock_size, channel, size); in intel_adsp_hda_dma_host_reload()
218 int intel_adsp_hda_dma_status(const struct device *dev, uint32_t channel, in intel_adsp_hda_dma_status() argument
226 __ASSERT(channel < cfg->dma_channels, "Channel does not exist"); in intel_adsp_hda_dma_status()
228 uint32_t unused = intel_adsp_hda_unused(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_status()
229 uint32_t used = *DGBS(cfg->base, cfg->regblock_size, channel) - unused; in intel_adsp_hda_dma_status()
232 stat->busy = *DGCS(cfg->base, cfg->regblock_size, channel) & DGCS_GBUSY; in intel_adsp_hda_dma_status()
233 stat->write_position = *DGBWP(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_status()
234 stat->read_position = *DGBRP(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_status()
243 tmp = *DGLLLPL(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_status()
244 llp_u = *DGLLLPU(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_status()
245 llp_l = *DGLLLPL(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_status()
248 llp_u = *DGLLLPU(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_status()
257 channel); in intel_adsp_hda_dma_status()
259 intel_adsp_hda_underrun_clear(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_status()
265 channel); in intel_adsp_hda_dma_status()
267 intel_adsp_hda_overrun_clear(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_status()
278 bool intel_adsp_hda_dma_chan_filter(const struct device *dev, int channel, void *filter_param) in intel_adsp_hda_dma_chan_filter() argument
288 if (channel == requested_channel) { in intel_adsp_hda_dma_chan_filter()
295 int intel_adsp_hda_dma_start(const struct device *dev, uint32_t channel) in intel_adsp_hda_dma_start() argument
301 __ASSERT(channel < cfg->dma_channels, "Channel does not exist"); in intel_adsp_hda_dma_start()
322 if (intel_adsp_hda_is_enabled(cfg->base, cfg->regblock_size, channel)) { in intel_adsp_hda_dma_start()
327 intel_adsp_hda_enable(cfg->base, cfg->regblock_size, channel, set_fifordy); in intel_adsp_hda_dma_start()
330 size = intel_adsp_hda_get_buffer_size(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_start()
331 intel_adsp_hda_link_commit(cfg->base, cfg->regblock_size, channel, size); in intel_adsp_hda_dma_start()
342 int intel_adsp_hda_dma_stop(const struct device *dev, uint32_t channel) in intel_adsp_hda_dma_stop() argument
346 __ASSERT(channel < cfg->dma_channels, "Channel does not exist"); in intel_adsp_hda_dma_stop()
348 if (!intel_adsp_hda_is_enabled(cfg->base, cfg->regblock_size, channel)) { in intel_adsp_hda_dma_stop()
352 intel_adsp_hda_disable(cfg->base, cfg->regblock_size, channel); in intel_adsp_hda_dma_stop()
354 if (!WAIT_FOR(!intel_adsp_hda_is_enabled(cfg->base, cfg->regblock_size, channel), 1000, in intel_adsp_hda_dma_stop()