On Mon, 2015-10-05 at 11:07 +0100, Mark Brown wrote:
On Sat, Oct 03, 2015 at 11:01:40PM +0800, Koro Chen wrote:
On Fri, 2015-10-02 at 15:48 +0100, Mark Brown wrote:
On Fri, Oct 02, 2015 at 06:34:24PM +0800, Koro Chen wrote:
I have two cards originally but the second one failed because of the patch ASoC: Prevent components from being bound to multiple cards.
My configuration is like this: card0: use platform's DAI component A card1: use the same platform's DAI component B
What do you mean by "DAI component" here? It's not a term I'm familiar with...
Sorry I didn't make myself clear enough. In the sound/soc/mediatek/mtk-afe-pcm.c, I register two components "mtk_afe_pcm_dai_component" and "mtk_afe_hdmi_dai_component", each has its corresponding DAIs. Card0 (which is mt8173-rt5676-rt5650.c) uses DAIs from the first component, and card1 (new) uses DAIs of the second component. These two components are probed successfully and separately by card0 and card1, but card1 failed to probe another component created by snd_soc_register_platform(), which is already bound to card0.
OK, I see. We probably do want to relax that restriction, it makes more sense at the DAI level but at the component level when we have components that have a bunch of independant DAIs hanging off a DMA controler as one component (which does make sense) then it breaks.
Thanks for your suggestion. Is it make sense if we use component->registered_as_component, which is only true in case of snd_soc_register_component() and will be false for components created by snd_soc_register_platform() or snd_soc_register_codec(), then modify the check condition like this:
@@ -1102,11 +1102,12 @@ static int soc_probe_component(struct snd_soc_card *card, struct snd_soc_dai *dai; int ret;
if (!strcmp(component->name, "snd-soc-dummy")) return 0;
if (component->card) { - if (component->card != card) { + if (component->card != card && component->registered_as_component) {