diff options
| -rw-r--r-- | sound/soc/generic/audio-graph-card.c | 13 | ||||
| -rw-r--r-- | sound/soc/generic/audio-graph-card2.c | 17 | ||||
| -rw-r--r-- | sound/soc/generic/simple-card-utils.c | 11 | ||||
| -rw-r--r-- | sound/soc/generic/simple-card.c | 22 | ||||
| -rw-r--r-- | sound/soc/intel/boards/sof_rt5682.c | 1 | ||||
| -rw-r--r-- | sound/soc/tegra/tegra_asoc_machine.c | 2 |
6 files changed, 61 insertions, 5 deletions
diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index d788f5f23a8a..4e85536a1b26 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -613,10 +613,16 @@ static int graph_count_noml(struct asoc_simple_priv *priv, return -EINVAL; } + /* + * DON'T REMOVE platforms + * see + * simple-card.c :: simple_count_noml() + */ li->num[li->link].cpus = 1; - li->num[li->link].codecs = 1; li->num[li->link].platforms = 1; + li->num[li->link].codecs = 1; + li->link += 1; /* 1xCPU-Codec */ dev_dbg(dev, "Count As Normal\n"); @@ -637,6 +643,11 @@ static int graph_count_dpcm(struct asoc_simple_priv *priv, } if (li->cpu) { + /* + * DON'T REMOVE platforms + * see + * simple-card.c :: simple_count_noml() + */ li->num[li->link].cpus = 1; li->num[li->link].platforms = 1; diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index 259544f64df9..d145b74d41e4 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -1046,8 +1046,14 @@ static int graph_count_normal(struct asoc_simple_priv *priv, * => lnk: port { endpoint { .. }; }; * }; */ + /* + * DON'T REMOVE platforms + * see + * simple-card.c :: simple_count_noml() + */ li->num[li->link].cpus = li->num[li->link].platforms = graph_counter(cpu_port); + li->num[li->link].codecs = graph_counter(codec_port); of_node_put(cpu_ep); @@ -1079,6 +1085,11 @@ static int graph_count_dpcm(struct asoc_simple_priv *priv, */ if (asoc_graph_is_ports0(lnk)) { + /* + * DON'T REMOVE platforms + * see + * simple-card.c :: simple_count_noml() + */ li->num[li->link].cpus = graph_counter(rport); /* FE */ li->num[li->link].platforms = graph_counter(rport); } else { @@ -1113,8 +1124,14 @@ static int graph_count_c2c(struct asoc_simple_priv *priv, * }; * }; */ + /* + * DON'T REMOVE platforms + * see + * simple-card.c :: simple_count_noml() + */ li->num[li->link].cpus = li->num[li->link].platforms = graph_counter(codec0); + li->num[li->link].codecs = graph_counter(codec1); of_node_put(ports); diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 56552a616f21..34a9b91e676f 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -638,7 +638,16 @@ EXPORT_SYMBOL_GPL(asoc_simple_dai_init); void asoc_simple_canonicalize_platform(struct snd_soc_dai_link_component *platforms, struct snd_soc_dai_link_component *cpus) { - /* Assumes platform == cpu */ + /* + * Assumes Platform == CPU + * + * Some CPU might be using soc-generic-dmaengine-pcm. This means CPU and Platform + * are different Component, but are sharing same component->dev. + * + * Let's assume Platform is same as CPU if it doesn't identify Platform on DT. + * see + * simple-card.c :: simple_count_noml() + */ if (!platforms->of_node) platforms->of_node = cpus->of_node; } diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index e98932c16754..fcd6c44f89f6 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -509,10 +509,25 @@ static int simple_count_noml(struct asoc_simple_priv *priv, return -EINVAL; } + /* + * DON'T REMOVE platforms + * + * Some CPU might be using soc-generic-dmaengine-pcm. This means CPU and Platform + * are different Component, but are sharing same component->dev. + * Simple Card had been supported it without special Platform selection. + * We need platforms here. + * + * In case of no Platform, it will be Platform == CPU, but Platform will be + * ignored by snd_soc_rtd_add_component(). + * + * see + * simple-card-utils.c :: asoc_simple_canonicalize_platform() + */ li->num[li->link].cpus = 1; - li->num[li->link].codecs = 1; li->num[li->link].platforms = 1; + li->num[li->link].codecs = 1; + li->link += 1; return 0; @@ -531,6 +546,11 @@ static int simple_count_dpcm(struct asoc_simple_priv *priv, } if (li->cpu) { + /* + * DON'T REMOVE platforms + * see + * simple_count_noml() + */ li->num[li->link].cpus = 1; li->num[li->link].platforms = 1; diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c index 2eec32846078..76ee2e35e1ef 100644 --- a/sound/soc/intel/boards/sof_rt5682.c +++ b/sound/soc/intel/boards/sof_rt5682.c @@ -793,7 +793,6 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, } links[id].init = max_98390_spk_codec_init; links[id].ops = &max_98390_ops; - links[id].dpcm_capture = 1; } else { max_98357a_dai_link(&links[id]); diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c index c2aaa496468c..f5092b410926 100644 --- a/sound/soc/tegra/tegra_asoc_machine.c +++ b/sound/soc/tegra/tegra_asoc_machine.c @@ -203,7 +203,7 @@ int tegra_asoc_machine_init(struct snd_soc_pcm_runtime *rtd) "nvidia,coupled-mic-hp-det")) { tegra_machine_mic_jack_gpio.desc = machine->gpiod_hp_det; tegra_machine_mic_jack_gpio.jack_status_check = coupled_mic_hp_check; - }; + } err = snd_soc_jack_add_gpios(&tegra_machine_mic_jack, 1, &tegra_machine_mic_jack_gpio); |
