Re: [alsa-devel] Applied "ASoC: soc-core: defer card probe until all component is added to list" to the asoc tree
Hi Rohit > > I got below WARNING by this patch. > > I guess we need mutex_lock() on snd_soc_register_card() ? > > Right, we should have client_mutex lock before calling > soc_find_component(). > > We will post fix. Thanks !! Best regards --- Kuninori Morimoto
Re: [alsa-devel] Applied "ASoC: soc-core: defer card probe until all component is added to list" to the asoc tree
Thanks Kuninori for reporting the issue. On 1/10/2019 8:02 AM, Kuninori Morimoto wrote: Hi Mark, Ajit From: Ajit Pandey Date: Wed, 9 Jan 2019 14:17:07 +0530 Subject: [PATCH] ASoC: soc-core: defer card probe until all component is added to list DAI component probe is not called if it is not present in component list during sound card registration. Check if component is available in component list for platform and cpu dai before soundcard registration. Signed-off-by: Ajit Pandey Signed-off-by: Rohit kumar Signed-off-by: Mark Brown --- I got below WARNING by this patch. I guess we need mutex_lock() on snd_soc_register_card() ? Right, we should have client_mutex lock before calling soc_find_component(). We will post fix. ... [drm] Device feb0.display probed [drm] Cannot find any crtc or sizes [drm] Cannot find any crtc or sizes WARNING: CPU: 0 PID: 76 at sound/soc/soc-core.c:739 soc_find_component+0xb8/0xc0 CPU: 0 PID: 76 Comm: kworker/0:1 Not tainted 5.0.0-rc1+ #1360 Hardware name: Renesas H3ULCB Kingfisher board based on r8a7795 ES2.0+ (DT) Workqueue: events deferred_probe_work_func pstate: 6005 (nZCv daif -PAN -UAO) pc : soc_find_component+0xb8/0xc0 lr : soc_find_component+0xb4/0xc0 sp : 1217ba10 x29: 1217ba10 x28: x27: 10a82920 x26: x25: 8006f9c59900 x24: 105f33a0 x23: 10948d70 x22: x21: 10af1720 x20: 8006ff80b6d8 x19: 8006f8523080 x18: 0010 x17: x16: x15: x14: 0720072007200720 x13: 0720072007200720 x12: 0720072007200720 x11: 0720072007200720 x10: 0720072007200720 x9 : x8 : 10a85000 x7 : 10114bd4 x6 : 0001 x5 : 0018 x4 : 0001 x3 : x2 : 0003 x1 : 10af17b0 x0 : Call trace: soc_find_component+0xb8/0xc0 soc_init_dai_link+0x18c/0x210 snd_soc_register_card.part.16+0x138/0x198 snd_soc_register_card+0x30/0x48 devm_snd_soc_register_card+0x4c/0xa0 graph_probe+0x2d8/0x388 platform_drv_probe+0x58/0xa8 really_probe+0x1c0/0x2a0 driver_probe_device+0x5c/0xf0 __device_attach_driver+0x9c/0xe0 ... Regards, Rohit -- Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.
Re: [alsa-devel] Applied "ASoC: soc-core: defer card probe until all component is added to list" to the asoc tree
Hi Mark, Ajit > From: Ajit Pandey > Date: Wed, 9 Jan 2019 14:17:07 +0530 > Subject: [PATCH] ASoC: soc-core: defer card probe until all component is added > to list > > DAI component probe is not called if it is not present > in component list during sound card registration. > Check if component is available in component list for > platform and cpu dai before soundcard registration. > > Signed-off-by: Ajit Pandey > Signed-off-by: Rohit kumar > Signed-off-by: Mark Brown > --- I got below WARNING by this patch. I guess we need mutex_lock() on snd_soc_register_card() ? ... [drm] Device feb0.display probed [drm] Cannot find any crtc or sizes [drm] Cannot find any crtc or sizes WARNING: CPU: 0 PID: 76 at sound/soc/soc-core.c:739 soc_find_component+0xb8/0xc0 CPU: 0 PID: 76 Comm: kworker/0:1 Not tainted 5.0.0-rc1+ #1360 Hardware name: Renesas H3ULCB Kingfisher board based on r8a7795 ES2.0+ (DT) Workqueue: events deferred_probe_work_func pstate: 6005 (nZCv daif -PAN -UAO) pc : soc_find_component+0xb8/0xc0 lr : soc_find_component+0xb4/0xc0 sp : 1217ba10 x29: 1217ba10 x28: x27: 10a82920 x26: x25: 8006f9c59900 x24: 105f33a0 x23: 10948d70 x22: x21: 10af1720 x20: 8006ff80b6d8 x19: 8006f8523080 x18: 0010 x17: x16: x15: x14: 0720072007200720 x13: 0720072007200720 x12: 0720072007200720 x11: 0720072007200720 x10: 0720072007200720 x9 : x8 : 10a85000 x7 : 10114bd4 x6 : 0001 x5 : 0018 x4 : 0001 x3 : x2 : 0003 x1 : 10af17b0 x0 : Call trace: soc_find_component+0xb8/0xc0 soc_init_dai_link+0x18c/0x210 snd_soc_register_card.part.16+0x138/0x198 snd_soc_register_card+0x30/0x48 devm_snd_soc_register_card+0x4c/0xa0 graph_probe+0x2d8/0x388 platform_drv_probe+0x58/0xa8 really_probe+0x1c0/0x2a0 driver_probe_device+0x5c/0xf0 __device_attach_driver+0x9c/0xe0 ...