[alsa-devel] [RFC v3 06/11] ASoC: hdac_hda: add ASoC based HDA codec driver

Ughreja, Rakesh A rakesh.a.ughreja at intel.com
Mon Dec 18 05:06:13 CET 2017



>-----Original Message-----
>From: Takashi Iwai [mailto:tiwai at suse.de]
>Sent: Saturday, December 16, 2017 2:44 PM
>To: Ughreja, Rakesh A <rakesh.a.ughreja at intel.com>
>Cc: alsa-devel at alsa-project.org; broonie at kernel.org;
>liam.r.girdwood at linux.intel.com; pierre-louis.bossart at linux.intel.com; Koul, Vinod
><vinod.koul at intel.com>; Patches Audio <patches.audio at intel.com>
>Subject: Re: [RFC v3 06/11] ASoC: hdac_hda: add ASoC based HDA codec driver
>

>> 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.
>
>My assumption is that there is only one hda_codec_driver_register().
>The legacy code needs to be rewritten to implement the standard
>probe/remove as preliminary.  Any the rest differentiation is done via
>additional callbacks at probe/remove time.
>

Oh I see. Let me work on this and may ask you some additional clarifications.

Regards,
Rakesh



More information about the Alsa-devel mailing list