| .. | .. |
|---|
| 80 | 80 | { |
|---|
| 81 | 81 | struct rk_mdais_dev *mdais = to_info(dai); |
|---|
| 82 | 82 | struct snd_soc_dai *child; |
|---|
| 83 | + unsigned int *channel_maps; |
|---|
| 83 | 84 | int ret = 0, i = 0; |
|---|
| 84 | 85 | |
|---|
| 86 | + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
|---|
| 87 | + channel_maps = mdais->playback_channel_maps; |
|---|
| 88 | + else |
|---|
| 89 | + channel_maps = mdais->capture_channel_maps; |
|---|
| 90 | + |
|---|
| 85 | 91 | for (i = 0; i < mdais->num_dais; i++) { |
|---|
| 92 | + /* skip DAIs which have no channel mapping */ |
|---|
| 93 | + if (!channel_maps[i]) |
|---|
| 94 | + continue; |
|---|
| 95 | + |
|---|
| 86 | 96 | child = mdais->dais[i].dai; |
|---|
| 87 | 97 | if (child->driver->ops && child->driver->ops->trigger) { |
|---|
| 88 | 98 | ret = child->driver->ops->trigger(substream, |
|---|