ASoC Kernel 6.1: Query regarding dynamic dai link/dapm registration during bootup
Hi All,
On kernel6.1 based Qualcomm target for automotive platform based on Android U, we have a feature early services to launch certain early apps at early init of android bootup cycle. Hence in order to launch early chime sound of audio at early init of android boot up cycle, we need to load all required audio kernel modules at early init stage in order to get sound card registered.
We have certain KPI goals for every early apps to get completed within lesser duration so that we can achieve final KPI goal of android boot complete as per the target specification.
In this journey, while optimizing the sound card registration through machine driver probe to achieve lower KPI for audio early chime sound, we find that for early chime launch we required only selected pcm front end dai links only.
Hence if we keep FE dai link structure in our machine driver with only required items for early chime, overall sound card registrations gets completed within 200msec from the time it starts, which is a very good KPI number to achieve.
So we were trying out code change to split overall FE dai link structure into two, one for early chime and another for all other required dai link's, then some how we need to register early chime related dai link during early init so that sound card registration process gets completed quickly, later stage we want to dynamically load all other FE dai links.
Could you please help us to suggest on how can we achieve this?. Is there any possible way out to avoid static FE dai link registration for all required ones from machine driver during machine driver probe, instead register only limited list of dai links.
Later can we dynamically register the dai links in order to get PCM devices entries created based on use case.
Currently we have this API devm_snd_soc_register_card() being called with snd_soc_card parameter which has all possible FE dai links populated at once.
Queries: 1) can we register sound card twice during bootup, once with limited dai links and next with all required ones? 2) can we register dai links/dapm dynamically based on use case requriement? 3) If it is possible, could you share any reference from any other vendor who is able to achieve the same?.
Regards, Shalini M
On Tue, Oct 29, 2024 at 10:35:08AM +0000, Shalini Manjunatha (Consultant) (QUIC) wrote:
Please fix your mail client to word wrap within paragraphs at something substantially less than 80 columns. Doing this makes your messages much easier to read and reply to.
- can we register sound card twice during bootup, once with limited
dai links and next with all required ones?
You can certainly register a card driver, then unregister it and register a new one that binds to the same firmware?
- can we register dai links/dapm dynamically based on use case requriement?
- If it is possible, could you share any reference from any other vendor who is able to achieve the same?.
In theory you should be able to dynamically add controls, but it's not something people really do at the minute. You'd have to be careful with locking and make sure that your userspace can cope with things appearing dynamically.
Hi All,
Could you please share your input on previously asked query?. We are waiting for response. Thanks in advance.
Regards, Shalini M ________________________________ From: Shalini Manjunatha (Consultant) (QUIC) quic_c_shalma@quicinc.com Sent: Tuesday, October 29, 2024 11:35 PM To: Vinod Koul vkoul@kernel.org; Liam Girdwood lgirdwood@gmail.com; Mark Brown broonie@kernel.org; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Raghu Ballappa Bankapur (QUIC) quic_rbankapu@quicinc.com; alsa-devel@alsa-project.org alsa-devel@alsa-project.org; linux-sound@vger.kernel.org linux-sound@vger.kernel.org; Shalini Manjunatha (Consultant) (QUIC) quic_c_shalma@quicinc.com Cc: Krishna Kishor Jha (QUIC) quic_kkishorj@quicinc.com Subject: ASoC Kernel 6.1: Query regarding dynamic dai link/dapm registration during bootup
Hi All,
On kernel6.1 based Qualcomm target for automotive platform based on Android U, we have a feature early services to launch certain early apps at early init of android bootup cycle. Hence in order to launch early chime sound of audio at early init of android boot up cycle, we need to load all required audio kernel modules at early init stage in order to get sound card registered.
We have certain KPI goals for every early apps to get completed within lesser duration so that we can achieve final KPI goal of android boot complete as per the target specification.
In this journey, while optimizing the sound card registration through machine driver probe to achieve lower KPI for audio early chime sound, we find that for early chime launch we required only selected pcm front end dai links only.
Hence if we keep FE dai link structure in our machine driver with only required items for early chime, overall sound card registrations gets completed within 200msec from the time it starts, which is a very good KPI number to achieve.
So we were trying out code change to split overall FE dai link structure into two, one for early chime and another for all other required dai link's, then some how we need to register early chime related dai link during early init so that sound card registration process gets completed quickly, later stage we want to dynamically load all other FE dai links.
Could you please help us to suggest on how can we achieve this?. Is there any possible way out to avoid static FE dai link registration for all required ones from machine driver during machine driver probe, instead register only limited list of dai links.
Later can we dynamically register the dai links in order to get PCM devices entries created based on use case.
Currently we have this API devm_snd_soc_register_card() being called with snd_soc_card parameter which has all possible FE dai links populated at once.
Queries: 1) can we register sound card twice during bootup, once with limited dai links and next with all required ones? 2) can we register dai links/dapm dynamically based on use case requriement? 3) If it is possible, could you share any reference from any other vendor who is able to achieve the same?.
Regards, Shalini M
On Fri, Nov 08, 2024 at 05:25:44AM +0000, Shalini Manjunatha (Consultant) wrote:
Could you please share your input on previously asked query?. We are waiting for response. Thanks in advance.
Please don't top post, reply in line with needed context. This allows readers to readily follow the flow of conversation and understand what you are talking about and also helps ensure that everything in the discussion is being addressed.
https://lore.kernel.org/linux-sound/aa1a8eb7-685c-4aa7-b73c-640bbcebdcd5@sir...
participants (3)
-
Mark Brown
-
Shalini Manjunatha (Consultant)
-
Shalini Manjunatha (Consultant) (QUIC)