diff mbox series

ASoC: Intel: bytcr_rt5640: Add quirk for the Advantech MICA-071 tablet

Message ID 20221213123246.11226-1-hdegoede@redhat.com
State Accepted
Commit a1dec9d70b6ad97087b60b81d2492134a84208c6
Headers show
Series ASoC: Intel: bytcr_rt5640: Add quirk for the Advantech MICA-071 tablet | expand

Commit Message

Hans de Goede Dec. 13, 2022, 12:32 p.m. UTC
The Advantech MICA-071 tablet deviates from the defaults for
a non CR Bay Trail based tablet in several ways:

1. It uses an analog MIC on IN3 rather then using DMIC1
2. It only has 1 speaker
3. It needs the OVCD current threshold to be set to 1500uA instead of
   the default 2000uA to reliable differentiate between headphones vs
   headsets

Add a quirk with these settings for this tablet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 sound/soc/intel/boards/bytcr_rt5640.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Pierre-Louis Bossart Dec. 13, 2022, 3:42 p.m. UTC | #1
On 12/13/22 06:32, Hans de Goede wrote:
> The Advantech MICA-071 tablet deviates from the defaults for
> a non CR Bay Trail based tablet in several ways:
> 
> 1. It uses an analog MIC on IN3 rather then using DMIC1
> 2. It only has 1 speaker
> 3. It needs the OVCD current threshold to be set to 1500uA instead of
>    the default 2000uA to reliable differentiate between headphones vs
>    headsets
> 
> Add a quirk with these settings for this tablet.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

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

> ---
>  sound/soc/intel/boards/bytcr_rt5640.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
> index fb9d9e271845..ddd2625bed90 100644
> --- a/sound/soc/intel/boards/bytcr_rt5640.c
> +++ b/sound/soc/intel/boards/bytcr_rt5640.c
> @@ -570,6 +570,21 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
>  					BYT_RT5640_SSP0_AIF1 |
>  					BYT_RT5640_MCLK_EN),
>  	},
> +	{
> +		/* Advantech MICA-071 */
> +		.matches = {
> +			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Advantech"),
> +			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "MICA-071"),
> +		},
> +		/* OVCD Th = 1500uA to reliable detect head-phones vs -set */
> +		.driver_data = (void *)(BYT_RT5640_IN3_MAP |
> +					BYT_RT5640_JD_SRC_JD2_IN4N |
> +					BYT_RT5640_OVCD_TH_1500UA |
> +					BYT_RT5640_OVCD_SF_0P75 |
> +					BYT_RT5640_MONO_SPEAKER |
> +					BYT_RT5640_DIFF_MIC |
> +					BYT_RT5640_MCLK_EN),
> +	},
>  	{
>  		.matches = {
>  			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ARCHOS"),
Mark Brown Dec. 14, 2022, 2:53 p.m. UTC | #2
On Tue, 13 Dec 2022 13:32:46 +0100, Hans de Goede wrote:
> The Advantech MICA-071 tablet deviates from the defaults for
> a non CR Bay Trail based tablet in several ways:
> 
> 1. It uses an analog MIC on IN3 rather then using DMIC1
> 2. It only has 1 speaker
> 3. It needs the OVCD current threshold to be set to 1500uA instead of
>    the default 2000uA to reliable differentiate between headphones vs
>    headsets
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: Intel: bytcr_rt5640: Add quirk for the Advantech MICA-071 tablet
      commit: a1dec9d70b6ad97087b60b81d2492134a84208c6

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index fb9d9e271845..ddd2625bed90 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -570,6 +570,21 @@  static const struct dmi_system_id byt_rt5640_quirk_table[] = {
 					BYT_RT5640_SSP0_AIF1 |
 					BYT_RT5640_MCLK_EN),
 	},
+	{
+		/* Advantech MICA-071 */
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Advantech"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "MICA-071"),
+		},
+		/* OVCD Th = 1500uA to reliable detect head-phones vs -set */
+		.driver_data = (void *)(BYT_RT5640_IN3_MAP |
+					BYT_RT5640_JD_SRC_JD2_IN4N |
+					BYT_RT5640_OVCD_TH_1500UA |
+					BYT_RT5640_OVCD_SF_0P75 |
+					BYT_RT5640_MONO_SPEAKER |
+					BYT_RT5640_DIFF_MIC |
+					BYT_RT5640_MCLK_EN),
+	},
 	{
 		.matches = {
 			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ARCHOS"),