mbox series

[v2,0/4] ALSA: hda: Expose codec organization functions

Message ID 20220214101404.4074026-1-cezary.rojewski@intel.com (mailing list archive)
Headers show
Series ALSA: hda: Expose codec organization functions | expand

Message

Cezary Rojewski Feb. 14, 2022, 10:14 a.m. UTC
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()

This allows upcoming AVS driver [1] to re-use even mode of HDA related
code that is currently available in sound/pci/hda and sound/hda and
prevent any code duplication within avs-driver that would otherwise had
to happen.

Last patch in the series provides snd_hdac_ext_bus_link_at() - a helper
function which allows for retrieval of HDA segment (link) based on codec
address directly. This is simpler than parsing codec-name first to
extract the address what is the case for snd_hdac_ext_bus_get_link().
The latter function is updated to re-use newly added one so core logic
is not duplicated after the addition.


Changes v1 -> v2:
- snd_hda_codec_new() now calls snd_hda_codec_device_new() with
  'snddev_managed' param set to 'true', reported by Kai


[1]: https://lore.kernel.org/all/20211208111301.1817725-1-cezary.rojewski@intel.com/


Cezary Rojewski (4):
  ALSA: hda: Add snd_hdac_ext_bus_link_at() helper
  ALSA: hda: Update and expose snd_hda_codec_device_init()
  ALSA: hda: Update and expose codec register procedures
  ALSA: hda: Expose codec cleanup and power-save functions

 include/sound/hda_codec.h           | 11 +++-
 include/sound/hdaudio_ext.h         |  1 +
 sound/hda/ext/hdac_ext_controller.c | 31 +++++++---
 sound/pci/hda/hda_codec.c           | 94 ++++++++++++++++++++---------
 sound/pci/hda/hda_local.h           |  2 -
 sound/soc/codecs/hdac_hda.c         |  2 +-
 6 files changed, 100 insertions(+), 41 deletions(-)

Comments

Cezary Rojewski Feb. 21, 2022, 9:51 a.m. UTC | #1
On 2022-02-14 11:14 AM, 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()
> 
> This allows upcoming AVS driver [1] to re-use even mode of HDA related
> code that is currently available in sound/pci/hda and sound/hda and
> prevent any code duplication within avs-driver that would otherwise had
> to happen.
> 
> Last patch in the series provides snd_hdac_ext_bus_link_at() - a helper
> function which allows for retrieval of HDA segment (link) based on codec
> address directly. This is simpler than parsing codec-name first to
> extract the address what is the case for snd_hdac_ext_bus_get_link().
> The latter function is updated to re-use newly added one so core logic
> is not duplicated after the addition.
> 
> 
> Changes v1 -> v2:
> - snd_hda_codec_new() now calls snd_hda_codec_device_new() with
>    'snddev_managed' param set to 'true', reported by Kai

Hello Takashi,

Is there anything else I could help with or explain to help get this 
series merged?


Regards,
Czarek
Takashi Iwai Feb. 21, 2022, 10:07 a.m. UTC | #2
On Mon, 21 Feb 2022 10:51:25 +0100,
Cezary Rojewski wrote:
> 
> On 2022-02-14 11:14 AM, 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()
> >
> > This allows upcoming AVS driver [1] to re-use even mode of HDA related
> > code that is currently available in sound/pci/hda and sound/hda and
> > prevent any code duplication within avs-driver that would otherwise had
> > to happen.
> >
> > Last patch in the series provides snd_hdac_ext_bus_link_at() - a helper
> > function which allows for retrieval of HDA segment (link) based on codec
> > address directly. This is simpler than parsing codec-name first to
> > extract the address what is the case for snd_hdac_ext_bus_get_link().
> > The latter function is updated to re-use newly added one so core logic
> > is not duplicated after the addition.
> >
> >
> > Changes v1 -> v2:
> > - snd_hda_codec_new() now calls snd_hda_codec_device_new() with
> >    'snddev_managed' param set to 'true', reported by Kai
> 
> Hello Takashi,
> 
> Is there anything else I could help with or explain to help get this
> series merged?

I merged all patches now to for-next branch.


thanks,

Takashi