All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Cezary Rojewski <cezary.rojewski@intel.com>, alsa-devel@alsa-project.org
Cc: broonie@kernel.org, tiwai@suse.com
Subject: Re: [PATCH] ALSA: hda: Allow SST driver on SKL and KBL platforms with DMIC
Date: Wed, 6 May 2020 15:26:24 -0500	[thread overview]
Message-ID: <697b0a05-1827-c62d-bf41-0bf02f93a405@linux.intel.com> (raw)
In-Reply-To: <20200506201656.18299-1-cezary.rojewski@intel.com>



On 5/6/20 3:16 PM, Cezary Rojewski wrote:
> Update intel-dspcfg with FLAG_SST_ONLY_IF_DMIC option and use it for
> Skylake and Kabylake platforms when DMIC is present.

Sounds good Cezary but your changes will not apply on Takashi's for-5.8 
tree, they will have a minor conflict with my SoundWire changes 
submitted in early April.

++<<<<<<< HEAD
  +#define FLAG_SST                      BIT(0)
  +#define FLAG_SOF                      BIT(1)
  +#define FLAG_SOF_ONLY_IF_DMIC         BIT(16)
  +#define FLAG_SOF_ONLY_IF_SOUNDWIRE    BIT(17)
  +
  +#define FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE (FLAG_SOF_ONLY_IF_DMIC | \
  +                                          FLAG_SOF_ONLY_IF_SOUNDWIRE)
++=======
+ #define FLAG_SST              BIT(0)
+ #define FLAG_SOF              BIT(1)
+ #define FLAG_SST_ONLY_IF_DMIC BIT(15)
+ #define FLAG_SOF_ONLY_IF_DMIC BIT(16)
++>>>>>>> ALSA: hda: Allow SST driver on SKL and KBL platforms with DMIC


> 
> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
> ---
>   sound/hda/intel-dsp-config.c | 22 ++++++++++++++++++++--
>   1 file changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
> index be1df80ed013..41c271d646bf 100644
> --- a/sound/hda/intel-dsp-config.c
> +++ b/sound/hda/intel-dsp-config.c
> @@ -16,6 +16,7 @@ MODULE_PARM_DESC(dsp_driver, "Force the DSP driver for Intel DSP (0=auto, 1=lega
>   
>   #define FLAG_SST		BIT(0)
>   #define FLAG_SOF		BIT(1)
> +#define FLAG_SST_ONLY_IF_DMIC	BIT(15)
>   #define FLAG_SOF_ONLY_IF_DMIC	BIT(16)
>   
>   struct config_entry {
> @@ -100,6 +101,10 @@ static const struct config_entry config_table[] = {
>   			{}
>   		}
>   	},
> +	{
> +		.flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC,
> +		.device = 0x9d70,
> +	},
>   #endif
>   /* Kabylake-LP */
>   #if IS_ENABLED(CONFIG_SND_SOC_INTEL_KBL)
> @@ -116,6 +121,10 @@ static const struct config_entry config_table[] = {
>   			{}
>   		}
>   	},
> +	{
> +		.flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC,
> +		.device = 0x9d71,
> +	},
>   #endif
>   
>   /*
> @@ -346,8 +355,17 @@ int snd_intel_dsp_driver_probe(struct pci_dev *pci)
>   		}
>   	}
>   
> -	if (cfg->flags & FLAG_SST)
> -		return SND_INTEL_DSP_DRIVER_SST;
> +
> +	if (cfg->flags & FLAG_SST) {
> +		if (cfg->flags & FLAG_SST_ONLY_IF_DMIC) {
> +			if (snd_intel_dsp_check_dmic(pci)) {
> +				dev_info(&pci->dev, "Digital mics found on Skylake+ platform, using SST driver\n");
> +				return SND_INTEL_DSP_DRIVER_SST;
> +			}
> +		} else {
> +			return SND_INTEL_DSP_DRIVER_SST;
> +		}
> +	}
>   
>   	return SND_INTEL_DSP_DRIVER_LEGACY;
>   }
> 

  reply	other threads:[~2020-05-06 20:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 20:16 [PATCH] ALSA: hda: Allow SST driver on SKL and KBL platforms with DMIC Cezary Rojewski
2020-05-06 20:26 ` Pierre-Louis Bossart [this message]
2020-05-06 20:43   ` 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=697b0a05-1827-c62d-bf41-0bf02f93a405@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=tiwai@suse.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 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.