mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
	upstream@semihalf.com, kai.vehmanen@linux.intel.com,
	harshapriya.n@intel.com, rad@semihalf.com,
	pierre-louis.bossart@linux.intel.com, tiwai@suse.com,
	hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.com,
	cujomalainey@chromium.org, lma@semihalf.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 02/14] ASoC: codecs: Add HD-Audio codec driver
Date: Tue, 5 Jul 2022 12:20:38 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2207051218200.513966@ramsan.of.borg> (raw)
In-Reply-To: <20220511162403.3987658-3-cezary.rojewski@intel.com>

 	Hi Cezary,

On Wed, 11 May 2022, Cezary Rojewski wrote:
> Add generic ASoC equivalent of ALSA HD-Audio codec. This codec is
> designed to follow HDA_DEV_LEGACY convention. Driver wrapps existing
> hda_codec.c handlers to prevent code duplication within the newly added
> code. Number of DAIs created is dependent on capabilities exposed by the
> codec itself. Because of this, single solution can be applied to support
> every single HD-Audio codec type.
>
> At the same time, through the ASoC topology, platform drivers may limit
> the number of endpoints available to the userspace as codec driver
> exposes BE DAIs only.
>
> Both hda_codec_probe() and hda_codec_remove() declare their expectations
> on device's usage_count and suspended-status. This is to catch any
> unexpected behavior as PM-related code for HD-Audio has been changing
> quite a bit throughout the years.
>
> In order for codec DAI list to reflect its actual PCM capabilities, PCMs
> need to be built and that can only happen once codec device is
> constructed. To do that, a valid component->card->snd_card pointer is
> needed. Said pointer will be provided by the framework once all card
> components are accounted for and their probing can begin. Usage of
> "binder" BE DAI solves the problem - codec can be listed as one of
> HD-Audio card components without declaring any actual BE DAIs
> statically.
>
> Relation with hdac_hda:
>
> Addition of parallel solution is motivated by behavioral differences
> between hdac_hda.c and its legacy equivalent found in sound/pci/hda
> e.g.: lack of dynamic, based on codec capabilities, resource allocation
> and high cost of removing such differences on actively used targets.
> Major goal of codec driver presented here is to follow HD-Audio legacy
> behavior in 1:1 fashion by becoming a wrapper. Doing so increases code
> coverage of the legacy code and reduces the maintenance cost for both
> solutions.
>
> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>

Thanks for your patch, which is now commit b5df2a7dca1cc6c6 ("ASoC:
codecs: Add HD-Audio codec driver") in sound-asoc/for-next.

> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -937,6 +937,16 @@ config SND_SOC_HDAC_HDA
> 	tristate
> 	select SND_HDA
>
> +config SND_SOC_HDA
> +	tristate "HD-Audio codec driver"
> +	select SND_HDA_EXT_CORE
> +	select SND_HDA

I am wondering if this needs a platform dependency?
Or perhaps this symbol should be made invisible, as it is selected by
SND_SOC_INTEL_AVS_MACH_HDAUDIO?  Are there any other users?

Thanks!

> +	help
> +	  This enables HD-Audio codec support in ASoC subsystem. Compared
> +	  to SND_SOC_HDAC_HDA, driver's behavior is identical to HD-Audio
> +	  legacy solution - including the dynamic resource allocation
> +	  based on actual codec capabilities.
> +
> config SND_SOC_ICS43432
> 	tristate "ICS43423 and compatible i2s microphones"
>

Gr{oetje,eeting}s,

 						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
 							    -- Linus Torvalds

       reply	other threads:[~2022-07-05 10:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220511162403.3987658-1-cezary.rojewski@intel.com>
     [not found] ` <20220511162403.3987658-3-cezary.rojewski@intel.com>
2022-07-05 10:20   ` Geert Uytterhoeven [this message]
2022-07-05 12:01     ` Cezary Rojewski

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=alpine.DEB.2.22.394.2207051218200.513966@ramsan.of.borg \
    --to=geert@linux-m68k.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=cujomalainey@chromium.org \
    --cc=harshapriya.n@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®