From: Takashi Iwai <tiwai@suse.de>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: liam.r.girdwood@linux.intel.com, alsa-devel@alsa-project.org,
broonie@kernel.org, vkoul@kernel.org
Subject: Re: [PATCH v5 8/8] ASoC: Intel: Skylake: add option to control HDAudio + DSP usage
Date: Tue, 31 Jul 2018 12:48:22 +0200 [thread overview]
Message-ID: <s5hbmanr895.wl-tiwai@suse.de> (raw)
In-Reply-To: <20180727230554.31027-9-pierre-louis.bossart@linux.intel.com>
On Sat, 28 Jul 2018 01:05:54 +0200,
Pierre-Louis Bossart wrote:
>
> Add two options to explicitly enable HDAudio + DSP usage and force its
> use
>
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---
> sound/soc/intel/Kconfig | 19 +++++++++++++++++++
> sound/soc/intel/skylake/skl.c | 7 ++++++-
> 2 files changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> index 0caa1f4eb94d..93c3693cdf13 100644
> --- a/sound/soc/intel/Kconfig
> +++ b/sound/soc/intel/Kconfig
> @@ -117,6 +117,25 @@ config SND_SOC_INTEL_SKYLAKE
> GeminiLake or CannonLake platform with the DSP enabled in the BIOS
> then enable this option by saying Y or m.
>
> +config SND_SOC_INTEL_SKYLAKE_HDA_DSP
> + bool "Enable HDAudio Codec + DSP support"
> + depends on SND_SOC_INTEL_SKYLAKE
> + help
> + If you have a Intel Skylake+ platform with the DSP enabled in
> + the BIOS and an HDAudio codec, then enable this option by saying Y
> + This option will only have an effect if there are no ACPI-enumerated
> + audio devices (I2C, SoundWire).
IMO, the change needed for this config should be folded into the patch
4 "ASoC: Intel: Skylake: use HDAudio if ACPI enumeration fails").
> +config SND_SOC_INTEL_SKYLAKE_FORCE_HDA_DSP
> + bool "Force HDAudio Codec + DSP support"
> + depends on SND_SOC_INTEL_SKYLAKE_HDA_DSP
> + help
> + If you have a Intel Skylake+ platform with the DSP enabled in
> + the BIOS and an HDAudio codec, then enable this option by saying Y
> + This option will ignore information from the BIOS and force the use
> + of the HDaudio codec, if present.
> + This is a debug option not recommended for distros.
... and this one is better to be a module option.
Distros tend to enable all possible options, and this may be set
unnecessarily. If any, this kconfig should be only toggling the
default option value.
Just another nitpicking:
> @@ -474,6 +474,7 @@ static struct skl_ssp_clk skl_ssp_clks[] = {
> {.name = "ssp5_sclkfs"},
> };
>
> +#if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKYLAKE_HDA_DSP)
> static struct snd_soc_acpi_mach *skl_find_hda_machine(struct skl *skl,
> struct snd_soc_acpi_mach *machines)
> {
> @@ -492,6 +493,7 @@ static struct snd_soc_acpi_mach *skl_find_hda_machine(struct skl *skl,
>
> return mach;
> }
> +#endif
Defining a dumb skl_find_hda_machine() returning NULL as #else would
reduce one more ifdef. Also, CONFIG_SND_SOC_INTEL_SKYLAKE_HDA_DSP is
a bool, so it can be a simple ifdef without IS_ENABLED().
#ifdef CONFIG_SND_SOC_INTEL_SKYLAKE_HDA_DSP
static struct snd_soc_acpi_mach *skl_find_hda_machine(struct skl *skl,
struct snd_soc_acpi_mach *machines)
{
....
}
#else
static struct snd_soc_acpi_mach *skl_find_hda_machine(struct skl *skl,
struct snd_soc_acpi_mach *machines)
{
return NULL;
}
#endif
thanks,
Takashi
next prev parent reply other threads:[~2018-07-31 10:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-27 23:05 [PATCH v5 0/8] Enable HDA Codec support on Intel Platforms Pierre-Louis Bossart
2018-07-27 23:05 ` [PATCH v5 1/8] ASoC: Intel: Skylake: extend widget handling Pierre-Louis Bossart
2018-08-01 9:47 ` Mark Brown
2018-07-27 23:05 ` [PATCH v5 2/8] ASoC: Intel: common: add table for HDA-based platforms Pierre-Louis Bossart
2018-07-27 23:05 ` [PATCH v5 3/8] ASoC: Intel: Boards: Machine driver for SKL+ w/ HDAudio codecs Pierre-Louis Bossart
2018-08-01 10:04 ` Mark Brown
2018-07-27 23:05 ` [PATCH v5 4/8] ASoC: Intel: Skylake: use HDAudio if ACPI enumeration fails Pierre-Louis Bossart
2018-07-27 23:05 ` [PATCH v5 5/8] ASoC: Intel: Skylake: add HDA BE DAIs Pierre-Louis Bossart
2018-07-27 23:05 ` [PATCH v5 6/8] ASoC: Intel: Skylake: use hda_bus instead of hdac_bus Pierre-Louis Bossart
2018-07-27 23:05 ` [PATCH v5 7/8] ASoC: hdac_hda: add asoc extension for legacy HDA codec drivers Pierre-Louis Bossart
2018-07-27 23:05 ` [PATCH v5 8/8] ASoC: Intel: Skylake: add option to control HDAudio + DSP usage Pierre-Louis Bossart
2018-07-31 10:48 ` Takashi Iwai [this message]
2018-07-31 16:06 ` Pierre-Louis Bossart
2018-07-31 16:20 ` Mark Brown
2018-08-01 14:50 ` Pierre-Louis Bossart
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=s5hbmanr895.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=vkoul@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.