forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/sound/soc/rockchip/rockchip_multi_dais.c
....@@ -80,9 +80,19 @@
8080 {
8181 struct rk_mdais_dev *mdais = to_info(dai);
8282 struct snd_soc_dai *child;
83
+ unsigned int *channel_maps;
8384 int ret = 0, i = 0;
8485
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
+
8591 for (i = 0; i < mdais->num_dais; i++) {
92
+ /* skip DAIs which have no channel mapping */
93
+ if (!channel_maps[i])
94
+ continue;
95
+
8696 child = mdais->dais[i].dai;
8797 if (child->driver->ops && child->driver->ops->trigger) {
8898 ret = child->driver->ops->trigger(substream,
....@@ -258,7 +268,7 @@
258268
259269 dai_component.of_node = np;
260270
261
- return snd_soc_find_dai(&dai_component);
271
+ return snd_soc_find_dai_with_mutex(&dai_component);
262272 }
263273
264274 static int mdais_runtime_suspend(struct device *dev)