From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
<alsa-devel@alsa-project.org>
Cc: upstream@semihalf.com, harshapriya.n@intel.com, rad@semihalf.com,
tiwai@suse.com, hdegoede@redhat.com, broonie@kernel.org,
cujomalainey@chromium.org, lma@semihalf.com
Subject: Re: [PATCH 0/4] ALSA: hda: Expose codec organization functions
Date: Tue, 8 Feb 2022 11:00:47 +0100 [thread overview]
Message-ID: <ccc9c1b7-bcf7-e2c8-35e9-0ad323c22fa6@intel.com> (raw)
In-Reply-To: <e609134a-a501-77fb-dcb8-60514d231d3d@linux.intel.com>
On 2022-02-07 1:35 PM, Pierre-Louis Bossart wrote:
>
>
> On 2/7/22 05:49, Cezary Rojewski wrote:
>> Changes expose several function that are currently unavailable for
>> HDA-DSP drivers for use. Those functions are:
>>
>> snd_hda_codec_cleanup_for_unbind()
>> snd_hda_codec_set_power_save()
>> snd_hda_codec_register()
>> snd_hda_codec_unregister()
>> snd_hda_codec_device_init()
>
>
> It would be useful to explain why a platform driver would need to make
> use of codec-management related routines, which would typically be
> needed only in a codec or machine driver, or hidden as part of a generic
> bus layer.
>
> In addition, both the Skylake and SOF/HDA drivers make use of e.g.,
> snd_hdac_ext_bus_device_init(), what was wrong with this approach that's
> been used since 2018?
Thanks for chiming in! So, all HDA drivers currently available in ASoC
are _assuming_ codec resources, they are not _reading_ them. To be
efficient and only create DAIs and other components when needed, codec's
->pcm_list_head need to be filled in with data before ASoC sound card
can be fully enumerated.
Initialization routines for HDA device require pointer to instance of
struct snd_card upfront whereas ASoC framework gives you such pointer
only once all components are accounted for. Also, component granulation
seen in ASoC causes need for adjustment for order of operations when
registering/probing codec device to achieve correctness (resource wise)
I'd mentioned above. We could have coded that logic ourselves but that's
a duplication as the logic is already there.
Regards,
Czarek
prev parent reply other threads:[~2022-02-08 10:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 11:49 [PATCH 0/4] ALSA: hda: Expose codec organization functions Cezary Rojewski
2022-02-07 11:49 ` [PATCH 1/4] ALSA: hda: Add snd_hdac_ext_bus_link_at() helper Cezary Rojewski
2022-02-07 11:49 ` [PATCH 2/4] ALSA: hda: Update and expose snd_hda_codec_device_init() Cezary Rojewski
2022-02-07 11:49 ` [PATCH 3/4] ALSA: hda: Update and expose codec register procedures Cezary Rojewski
2022-02-08 15:54 ` Kai Vehmanen
2022-02-08 16:34 ` Cezary Rojewski
2022-02-08 17:14 ` Takashi Iwai
2022-02-09 10:21 ` Cezary Rojewski
2022-02-09 10:38 ` Cezary Rojewski
2022-02-09 14:19 ` Takashi Iwai
2022-02-08 17:46 ` Pierre-Louis Bossart
2022-02-09 12:05 ` Cezary Rojewski
2022-02-09 16:08 ` Pierre-Louis Bossart
2022-02-11 14:42 ` Cezary Rojewski
2022-02-11 15:23 ` Pierre-Louis Bossart
2022-02-14 9:54 ` Cezary Rojewski
2022-02-07 11:49 ` [PATCH 4/4] ALSA: hda: Expose codec cleanup and power-save functions Cezary Rojewski
2022-02-07 12:35 ` [PATCH 0/4] ALSA: hda: Expose codec organization functions Pierre-Louis Bossart
2022-02-08 10:00 ` Cezary Rojewski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ccc9c1b7-bcf7-e2c8-35e9-0ad323c22fa6@intel.com \
--to=cezary.rojewski@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cujomalainey@chromium.org \
--cc=harshapriya.n@intel.com \
--cc=hdegoede@redhat.com \
--cc=lma@semihalf.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rad@semihalf.com \
--cc=tiwai@suse.com \
--cc=upstream@semihalf.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox