ASoC: Intel: bytct_rt5640: change default capture settings
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 4 Apr 2017 19:32:04 +0000 (19:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Apr 2017 10:41:16 +0000 (12:41 +0200)
[ Upstream commit bf46241bee7bc3ec28703796f4fbd56085055fca ]

Most Baytrail-CR devices use analog differential microphones,
modify capture default to avoid DMI quirks. Keep digital mics
for all other configurations.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/intel/boards/bytcr_rt5640.c

index bff77a1..0d9811c 100644 (file)
@@ -57,9 +57,7 @@ struct byt_rt5640_private {
        struct clk *mclk;
 };
 
-static unsigned long byt_rt5640_quirk = BYT_RT5640_DMIC1_MAP |
-                                       BYT_RT5640_DMIC_EN |
-                                       BYT_RT5640_MCLK_EN;
+static unsigned long byt_rt5640_quirk = BYT_RT5640_MCLK_EN;
 
 static void log_quirks(struct device *dev)
 {
@@ -738,6 +736,13 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
                if (res_info->acpi_ipc_irq_index == 0) {
                        byt_rt5640_quirk |= BYT_RT5640_SSP0_AIF2;
                }
+
+               /* change defaults for Baytrail-CR capture */
+               byt_rt5640_quirk |= BYT_RT5640_IN1_MAP;
+               byt_rt5640_quirk |= BYT_RT5640_DIFF_MIC;
+       } else {
+               byt_rt5640_quirk |= (BYT_RT5640_DMIC1_MAP |
+                               BYT_RT5640_DMIC_EN);
        }
 
        /* check quirks before creating card */