mirror of https://github.com/thesofproject/sof.git
dma: dma channel null condition check
dma channel null condition check for pipelines without using any of the specified dma channels. Signed-off-by: maruthi machani <maruthi.machani@amd.corp-partner.google.com>
This commit is contained in:
parent
8862f8863a
commit
f217130a53
|
@ -131,8 +131,10 @@ static int dma_multi_chan_domain_register(struct ll_schedule_domain *domain,
|
||||||
if (!pipe_task->registrable)
|
if (!pipe_task->registrable)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
for (i = 0; i < dma_domain->num_dma; ++i) {
|
for (i = 0; i < dma_domain->num_dma ; ++i) {
|
||||||
for (j = 0; j < dmas[i].plat_data.channels; ++j) {
|
if (dmas[i].chan == NULL)
|
||||||
|
continue;
|
||||||
|
for (j = 0; j < dmas[i].plat_data.channels ; ++j) {
|
||||||
/* channel not set as scheduling source */
|
/* channel not set as scheduling source */
|
||||||
if (!dma_is_scheduling_source(&dmas[i].chan[j]))
|
if (!dma_is_scheduling_source(&dmas[i].chan[j]))
|
||||||
continue;
|
continue;
|
||||||
|
@ -222,7 +224,9 @@ static int dma_multi_chan_domain_unregister(struct ll_schedule_domain *domain,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (i = 0; i < dma_domain->num_dma; ++i) {
|
for (i = 0; i < dma_domain->num_dma; ++i) {
|
||||||
for (j = 0; j < dmas[i].plat_data.channels; ++j) {
|
if (dmas[i].chan == NULL)
|
||||||
|
continue;
|
||||||
|
for (j = 0; j < dmas[i].plat_data.channels ; ++j) {
|
||||||
/* channel not set as scheduling source */
|
/* channel not set as scheduling source */
|
||||||
if (!dma_is_scheduling_source(&dmas[i].chan[j]))
|
if (!dma_is_scheduling_source(&dmas[i].chan[j]))
|
||||||
continue;
|
continue;
|
||||||
|
@ -280,6 +284,8 @@ static bool dma_multi_chan_domain_is_pending(struct ll_schedule_domain *domain,
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
for (i = 0; i < dma_domain->num_dma; ++i) {
|
for (i = 0; i < dma_domain->num_dma; ++i) {
|
||||||
|
if (dmas[i].chan == NULL)
|
||||||
|
continue;
|
||||||
for (j = 0; j < dmas[i].plat_data.channels; ++j) {
|
for (j = 0; j < dmas[i].plat_data.channels; ++j) {
|
||||||
if (!*comp) {
|
if (!*comp) {
|
||||||
status = dma_interrupt_legacy(&dmas[i].chan[j],
|
status = dma_interrupt_legacy(&dmas[i].chan[j],
|
||||||
|
|
Loading…
Reference in New Issue