| .. | .. |
|---|
| 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, |
|---|
| .. | .. |
|---|
| 258 | 268 | |
|---|
| 259 | 269 | dai_component.of_node = np; |
|---|
| 260 | 270 | |
|---|
| 261 | | - return snd_soc_find_dai(&dai_component); |
|---|
| 271 | + return snd_soc_find_dai_with_mutex(&dai_component); |
|---|
| 262 | 272 | } |
|---|
| 263 | 273 | |
|---|
| 264 | 274 | static int mdais_runtime_suspend(struct device *dev) |
|---|