Lines Matching full:dma

9 #include <zephyr/drivers/dma.h>
39 * Tests host input streams with the DMA API
46 const struct device *dma; in ZTEST() local
70 dma = DEVICE_DT_GET(DT_NODELABEL(hda_host_in)); in ZTEST()
71 zassert_true(device_is_ready(dma), "DMA device is not ready"); in ZTEST()
73 channel = dma_request_channel(dma, NULL); in ZTEST()
74 zassert_true(channel >= 0, "Expected a valid DMA channel"); in ZTEST()
75 hda_dump_regs(HOST_IN, HDA_REGBLOCK_SIZE, channel, "dma channel"); in ZTEST()
96 res = dma_config(dma, channel, &dma_cfg); in ZTEST()
97 hda_dump_regs(HOST_IN, HDA_REGBLOCK_SIZE, channel, "dsp dma config"); in ZTEST()
98 zassert_ok(res, "Expected dma config to succeed"); in ZTEST()
100 res = dma_start(dma, channel); in ZTEST()
101 hda_dump_regs(HOST_IN, HDA_REGBLOCK_SIZE, channel, "dsp dma start"); in ZTEST()
102 zassert_ok(res, "Expected dma start to succeed"); in ZTEST()
108 res = dma_reload(dma, channel, 0, 0, DMA_BUF_SIZE); in ZTEST()
109 zassert_ok(res, "Expected dma reload to succeed"); in ZTEST()
110 hda_dump_regs(HOST_IN, HDA_REGBLOCK_SIZE, channel, "dsp dma reload"); in ZTEST()
116 res = dma_get_status(dma, channel, &status); in ZTEST()
117 zassert_ok(res, "Expected dma status to succeed"); in ZTEST()
138 res = dma_stop(dma, channel); in ZTEST()
139 zassert_ok(res, "Expected dma stop to succeed"); in ZTEST()
143 * Tests host output streams with the DMA API
147 const struct device *dma; in test_hda_host_out_dma() local
159 dma = DEVICE_DT_GET(DT_NODELABEL(hda_host_out)); in test_hda_host_out_dma()
160 zassert_true(device_is_ready(dma), "DMA device is not ready"); in test_hda_host_out_dma()
162 channel = dma_request_channel(dma, NULL); in test_hda_host_out_dma()
163 zassert_true(channel >= 0, "Expected a valid DMA channel"); in test_hda_host_out_dma()
164 hda_dump_regs(HOST_OUT, HDA_REGBLOCK_SIZE, channel, "dma request channel"); in test_hda_host_out_dma()
185 res = dma_config(dma, channel, &dma_cfg); in test_hda_host_out_dma()
186 hda_dump_regs(HOST_OUT, HDA_REGBLOCK_SIZE, channel, "dsp dma config"); in test_hda_host_out_dma()
187 zassert_ok(res, "Expected dma config to succeed"); in test_hda_host_out_dma()
189 res = dma_start(dma, channel); in test_hda_host_out_dma()
190 hda_dump_regs(HOST_OUT, HDA_REGBLOCK_SIZE, channel, "dsp dma start"); in test_hda_host_out_dma()
191 zassert_ok(res, "Expected dma start to succeed"); in test_hda_host_out_dma()
225 res = dma_reload(dma, channel, 0, 0, DMA_BUF_SIZE); in test_hda_host_out_dma()
226 zassert_ok(res, "Expected dma reload to succeed"); in test_hda_host_out_dma()
227 hda_dump_regs(HOST_OUT, HDA_REGBLOCK_SIZE, channel, "dsp dma reload"); in test_hda_host_out_dma()
234 res = dma_stop(dma, channel); in test_hda_host_out_dma()
235 zassert_ok(res, "Expected dma stop to succeed"); in test_hda_host_out_dma()
236 hda_dump_regs(HOST_OUT, HDA_REGBLOCK_SIZE, channel, "dsp dma stop"); in test_hda_host_out_dma()