>-----Original Message----- >From: Takashi Iwai [mailto:tiwai@xxxxxxx] >Sent: Friday, December 15, 2017 9:18 PM >To: Ughreja, Rakesh A <rakesh.a.ughreja@xxxxxxxxx> >Cc: alsa-devel@xxxxxxxxxxxxxxxx; broonie@xxxxxxxxxx; >liam.r.girdwood@xxxxxxxxxxxxxxx; pierre-louis.bossart@xxxxxxxxxxxxxxx; Koul, Vinod ><vinod.koul@xxxxxxxxx>; Patches Audio <patches.audio@xxxxxxxxx> >Subject: Re: [RFC v3 06/11] ASoC: hdac_hda: add ASoC based HDA codec driver > >> >Can we check differently? For example, we may put some difference in >> >the driver and check it here instead of the static IS_ENABLED(). >> >> Do you think a module parameter is a good idea ? > >I don't think so. We do need to consider a better way. > >Maybe an alternative is to give the additional indirect calls. >That is, put some new ops or hook to the bus for calling some extra >probing task in addition to the standard codec probe. > I am not sure if I understand you fully, so asking some follow up Questions. I am assuming you are asking me to implement something like following. Where I have to implement snd_hda_get_mode() function which would return "true" if we need to register the driver as "asoc" driver. Is that right understanding ? int __hda_codec_driver_register(struct hda_codec_driver *drv, const char *name, struct module *owner) { /* * check if we need to register ASoC HDA driver */ #if IS_ENABLED(CONFIG_SND_SOC_HDAC_HDA) int asoc_mode = snd_hda_get_mode(); if (asoc_mode) { drv->core.id_table = drv->id; return __hdac_hda_codec_driver_register(&drv->core, name, owner); } #endif return __hda_legacy_codec_driver_register(drv, name, owner); } If above is true then the follow up question is, what are the criteria to determine the mode. Since I cannot assume that the bus instance is already created at the time of driver registration, I am not sure how to determine what kind of platform driver would be loaded in future. Regards, Rakesh _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel