Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: vamshi.krishna.gopal@intel.com, alsa-devel@alsa-project.org,
	"Rojewski, Cezary" <cezary.rojewski@intel.com>
Cc: harshapriya.n@intel.com, sathya.prakash.m.r@intel.com,
	broonie@kernel.org, biernacki@google.com,
	pierre-louis.bossart@intel.com
Subject: Re: [PATCH 2/2] ASoc: Intel: board: add BE DAI link for WoV
Date: Wed, 24 Mar 2021 13:43:07 -0500	[thread overview]
Message-ID: <66a73c07-8152-9f55-c8e6-bb5bf68056ac@linux.intel.com> (raw)
In-Reply-To: <20210324175200.44922-3-vamshi.krishna.gopal@intel.com>



On 3/24/21 12:52 PM, vamshi.krishna.gopal@intel.com wrote:
> From: Mac Chiang <mac.chiang@intel.com>
> 
> create dai link in kbl_da7219_max98357a driver for wake on voice
> functionality.
> 
> changes picked from broonie's tree
> commit 0c7941a63a0f
> ("ASoC: Intel: Skylake: Use refcap device for mono recording")
> commit 2154be362c90
> ("ASoc: Intel: boards: Add WOV as sink for nau88l25_ssm4567 machine")
> 
> Signed-off-by: Mac Chiang <mac.chiang@intel.com>
> Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
> Tested-by: Kaiyen Chang <kaiyen.chang@intel.corp-partner.google.com>
> Tested-by: luke yang <luke_yang@compal.corp-partner.google.com>
> Tested-by: Grace Kao <grace.kao@intel.com>
> Tested-by: Kaiyen Chang <kaiyen.chang@intel.com>
> Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
> ---
>   sound/soc/intel/boards/kbl_da7219_max98357a.c | 35 +++++++++++++++++++
>   1 file changed, 35 insertions(+)
> 
> diff --git a/sound/soc/intel/boards/kbl_da7219_max98357a.c b/sound/soc/intel/boards/kbl_da7219_max98357a.c
> index 1d6b2855874d..c9d83eebf4a8 100644
> --- a/sound/soc/intel/boards/kbl_da7219_max98357a.c
> +++ b/sound/soc/intel/boards/kbl_da7219_max98357a.c
> @@ -44,6 +44,7 @@ struct kbl_codec_private {
>   enum {
>   	KBL_DPCM_AUDIO_PB = 0,
>   	KBL_DPCM_AUDIO_CP,
> +	KBL_DPCM_AUDIO_REF_CP,
>   	KBL_DPCM_AUDIO_DMIC_CP,
>   	KBL_DPCM_AUDIO_HDMI1_PB,
>   	KBL_DPCM_AUDIO_HDMI2_PB,
> @@ -335,12 +336,36 @@ static struct snd_soc_ops kabylake_dmic_ops = {
>   	.startup = kabylake_dmic_startup,
>   };
>   
> +static const struct snd_pcm_hw_constraint_list constraints_refcap = {
> +	.count = ARRAY_SIZE(ch_mono),
> +	.list  = ch_mono,
> +};
> +
> +static int kabylake_refcap_startup(struct snd_pcm_substream *substream)
> +{
> +	substream->runtime->hw.channels_max = 1;
> +	snd_pcm_hw_constraint_list(substream->runtime, 0,
> +					SNDRV_PCM_HW_PARAM_CHANNELS,
> +					&constraints_refcap);
> +
> +	return snd_pcm_hw_constraint_list(substream->runtime, 0,
> +					SNDRV_PCM_HW_PARAM_RATE,
> +					&constraints_16000);
> +}
> +
> +static struct snd_soc_ops skylaye_refcap_ops = {
> +	.startup = kabylake_refcap_startup,
> +};
> +
>   SND_SOC_DAILINK_DEF(dummy,
>   	DAILINK_COMP_ARRAY(COMP_DUMMY()));
>   
>   SND_SOC_DAILINK_DEF(system,
>   	DAILINK_COMP_ARRAY(COMP_CPU("System Pin")));
>   
> +SND_SOC_DAILINK_DEF(reference,
> +	DAILINK_COMP_ARRAY(COMP_CPU("Reference Pin")));
> +
>   SND_SOC_DAILINK_DEF(dmic,
>   	DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin")));
>   
> @@ -415,6 +440,16 @@ static struct snd_soc_dai_link kabylake_dais[] = {
>   		.ops = &kabylake_da7219_fe_ops,
>   		SND_SOC_DAILINK_REG(system, dummy, platform),
>   	},
> +	[KBL_DPCM_AUDIO_REF_CP] = {
> +		.name = "Kbl Audio Reference cap",
> +		.stream_name = "Wake on Voice",

Does anyone have a clear definition of what "REF_CP" and "reference" 
mean? it's not echo reference since there is a separate entry for this, 
so not sure what the term means.

Half of the SKL/KBL drivers seem to use this FE for "Wake on Voice" and 
the other half use it for 'Refcap', this doesn't look very consistent.

> +		.init = NULL,
> +		.dpcm_capture = 1,
> +		.nonatomic = 1,
> +		.dynamic = 1,
> +		.ops = &skylaye_refcap_ops,
> +		SND_SOC_DAILINK_REG(reference, dummy, platform),
> +	},
>   	[KBL_DPCM_AUDIO_DMIC_CP] = {
>   		.name = "Kbl Audio DMIC cap",
>   		.stream_name = "dmiccap",
> 

  reply	other threads:[~2021-03-24 18:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 17:51 [PATCH 0/2] kbl_da7219_max9357a machine changes for wov and MST vamshi.krishna.gopal
2021-03-24 17:51 ` [PATCH 1/2] ASoC: Intel: kbl: Add MST route change to kbl machine drivers vamshi.krishna.gopal
2021-03-24 18:34   ` Pierre-Louis Bossart
2021-03-25 18:07     ` Gopal, Vamshi Krishna
2021-03-25 22:05       ` Pierre-Louis Bossart
2021-03-31 18:49         ` Gopal, Vamshi Krishna
2021-03-24 17:52 ` [PATCH 2/2] ASoc: Intel: board: add BE DAI link for WoV vamshi.krishna.gopal
2021-03-24 18:43   ` Pierre-Louis Bossart [this message]
2021-03-24 23:39   ` kernel test robot

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=66a73c07-8152-9f55-c8e6-bb5bf68056ac@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=biernacki@google.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=harshapriya.n@intel.com \
    --cc=pierre-louis.bossart@intel.com \
    --cc=sathya.prakash.m.r@intel.com \
    --cc=vamshi.krishna.gopal@intel.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