linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Carlo Caione <carlo@caione.org>,
	linux@endlessm.com, lgirdwood@gmail.com, broonie@kernel.org,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Cc: Carlo Caione <carlo@endlessm.com>
Subject: Re: [alsa-devel] [PATCH] SoC: intel: byt: Introduce new custom IN2 map
Date: Wed, 18 Oct 2017 13:05:31 -0500	[thread overview]
Message-ID: <b09a704c-bb3e-32c4-afcb-d11379b6a3b9@linux.intel.com> (raw)
In-Reply-To: <20171018164957.2270-1-carlo@caione.org>

On 10/18/17 11:49 AM, Carlo Caione wrote:
> From: Carlo Caione <carlo@endlessm.com>
> 
> Introduce a new custom dapm routes map to quirk platforms with the
> internal mic connected to IN2P.

LGTM. If we start getting more quirks for this codec, we should think of 
adding a module parameters to select them from the command line or with 
modprobe (as done in other machine drivers).

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> 
> Signed-off-by: Carlo Caione <carlo@endlessm.com>
> ---
>   sound/soc/intel/boards/bytcr_rt5651.c | 16 +++++++++++++++-
>   1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
> index 3076bfc0db5e..1dad5c98c9ef 100644
> --- a/sound/soc/intel/boards/bytcr_rt5651.c
> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
> @@ -37,6 +37,7 @@
>   enum {
>   	BYT_RT5651_DMIC_MAP,
>   	BYT_RT5651_IN1_MAP,
> +	BYT_RT5651_IN2_MAP,
>   };
>   
>   #define BYT_RT5651_MAP(quirk)	((quirk) & GENMASK(7, 0))
> @@ -58,6 +59,8 @@ static void log_quirks(struct device *dev)
>   		dev_info(dev, "quirk DMIC_MAP enabled");
>   	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP)
>   		dev_info(dev, "quirk IN1_MAP enabled");
> +	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN2_MAP)
> +		dev_info(dev, "quirk IN2_MAP enabled");
>   	if (byt_rt5651_quirk & BYT_RT5651_DMIC_EN)
>   		dev_info(dev, "quirk DMIC enabled");
>   	if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN)
> @@ -143,7 +146,6 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = {
>   	{"ssp2 Rx", NULL, "AIF1 Capture"},
>   
>   	{"Headset Mic", NULL, "micbias1"}, /* lowercase for rt5651 */
> -	{"IN2P", NULL, "Headset Mic"},
>   	{"Headphone", NULL, "HPOL"},
>   	{"Headphone", NULL, "HPOR"},
>   	{"Speaker", NULL, "LOUTL"},
> @@ -151,15 +153,23 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = {
>   };
>   
>   static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic_map[] = {
> +	{"IN2P", NULL, "Headset Mic"},
>   	{"DMIC L1", NULL, "Internal Mic"},
>   	{"DMIC R1", NULL, "Internal Mic"},
>   };
>   
>   static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = {
>   	{"Internal Mic", NULL, "micbias1"},
> +	{"IN2P", NULL, "Headset Mic"},
>   	{"IN1P", NULL, "Internal Mic"},
>   };
>   
> +static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
> +	{"Internal Mic", NULL, "micbias1"},
> +	{"IN1P", NULL, "Headset Mic"},
> +	{"IN2P", NULL, "Internal Mic"},
> +};
> +
>   static const struct snd_kcontrol_new byt_rt5651_controls[] = {
>   	SOC_DAPM_PIN_SWITCH("Headphone"),
>   	SOC_DAPM_PIN_SWITCH("Headset Mic"),
> @@ -246,6 +256,10 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
>   		custom_map = byt_rt5651_intmic_in1_map;
>   		num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_map);
>   		break;
> +	case BYT_RT5651_IN2_MAP:
> +		custom_map = byt_rt5651_intmic_in2_map;
> +		num_routes = ARRAY_SIZE(byt_rt5651_intmic_in2_map);
> +		break;
>   	default:
>   		custom_map = byt_rt5651_intmic_dmic_map;
>   		num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic_map);
> 

  reply	other threads:[~2017-10-18 18:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18 16:49 [PATCH] SoC: intel: byt: Introduce new custom IN2 map Carlo Caione
2017-10-18 18:05 ` Pierre-Louis Bossart [this message]
2017-11-16 13:53   ` [alsa-devel] " Carlo Caione
2017-11-21  9:30     ` Carlo Caione
2017-11-21 15:12       ` Pierre-Louis Bossart
2017-10-21 10:13 ` Applied "SoC: intel: byt: Introduce new custom IN2 map" to the asoc tree Mark Brown

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=b09a704c-bb3e-32c4-afcb-d11379b6a3b9@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=carlo@caione.org \
    --cc=carlo@endlessm.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@endlessm.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;
as well as URLs for NNTP newsgroup(s).