From: Hans de Goede <hdegoede@redhat.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Bard Liao <bardliao@realtek.com>,
Oder Chiou <oder_chiou@realtek.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
alsa-devel@alsa-project.org,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Takashi Iwai <tiwai@suse.com>
Subject: [PATCH v3 05/10] ASoC: Intel: bytcr_rt5640: Unify BYTCR input defaults
Date: Sun, 13 May 2018 09:24:30 +0200 [thread overview]
Message-ID: <20180513072435.3358-6-hdegoede@redhat.com> (raw)
In-Reply-To: <20180513072435.3358-1-hdegoede@redhat.com>
Currently we've 2 places with BYTCR defaults: 1. The generic catch-all
DMI_SYS_VENDOR=="Insyde" DMI quirk which selects SSP0-AIF1 for generic
Insyde BYTCR tablets without the ACPI channel package; and 2. the
defaults in the if (is_bytcr) {} code block.
Currently these are not identical, both select IN3 as the internal mic
output, but the "Insyde" DMI quirk leaves out the DIFF_MIC quirk. The
DIFF_MIC quirk should be enabled by default, because enabling diff. input
helps a lot for devices with a differential mic, where as it is a nop on
devices with a normal mic.
This commit adds the DIFF_MIC quirk to the "Insyde" DMI quirk path, by
adding a new BYTCR_INPUT_DEFAULTS define and using that in both code paths
which set BYTCR defaults.
Having a single place where the BYTCR input defaults are defined also
allows defining jack-detect defaults in a single place in a follow-up
commit.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
sound/soc/intel/boards/bytcr_rt5640.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 09cdfd57e383..355c241470b5 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -82,6 +82,10 @@ enum {
#define BYT_RT5640_MCLK_EN BIT(22)
#define BYT_RT5640_MCLK_25MHZ BIT(23)
+#define BYTCR_INPUT_DEFAULTS \
+ (BYT_RT5640_IN3_MAP | \
+ BYT_RT5640_DIFF_MIC)
+
/* in-diff or dmic-pin + jdsrc + ovcd-th + -sf + jd-inv + terminating entry */
#define MAX_NO_PROPS 6
@@ -475,7 +479,7 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
},
- .driver_data = (void *)(BYT_RT5640_IN3_MAP |
+ .driver_data = (void *)(BYTCR_INPUT_DEFAULTS |
BYT_RT5640_MCLK_EN |
BYT_RT5640_SSP0_AIF1),
@@ -979,8 +983,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
}
/* change defaults for Baytrail-CR capture */
- byt_rt5640_quirk |= BYT_RT5640_IN3_MAP;
- byt_rt5640_quirk |= BYT_RT5640_DIFF_MIC;
+ byt_rt5640_quirk |= BYTCR_INPUT_DEFAULTS;
} else {
byt_rt5640_quirk |= BYT_RT5640_DMIC1_MAP;
}
--
2.17.0
next prev parent reply other threads:[~2018-05-13 7:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-13 7:24 [PATCH v3 00/10] ASoC: rt5640: Add jack-detect and button-press support Hans de Goede
2018-05-13 7:24 ` [PATCH v3 01/10] ASoC: Intel: bytcr_rt5640: Use device properties for setting up dmic Hans de Goede
2018-05-17 16:40 ` Applied "ASoC: Intel: bytcr_rt5640: Use device properties for setting up dmic" to the asoc tree Mark Brown
2018-05-13 7:24 ` [PATCH v3 02/10] ASoC: Intel: bytcr_rt5640: Fix Dell Venue 8 5830 Pro quirk Hans de Goede
2018-05-13 7:24 ` [PATCH v3 03/10] ASoC: Intel: bytcr_rt5640: Enable jack detection Hans de Goede
2018-05-13 7:24 ` [PATCH v3 04/10] ASoC: Intel: bytcr_rt5640: Change BYTCR default input to IN3 Hans de Goede
2018-05-13 7:24 ` Hans de Goede [this message]
2018-05-13 7:24 ` [PATCH v3 06/10] ASoC: Intel: bytcr_rt5640: Add default jack-detect settings Hans de Goede
2018-05-13 7:24 ` [PATCH v3 07/10] ASoC: Intel: bytcr_rt5640: Sort DMI quirk list alphabetically Hans de Goede
2018-05-13 7:24 ` [PATCH v3 08/10] ASoC: Intel: bytcr_rt5640: Use dmi_first_match() for DMI quirk handling Hans de Goede
2018-05-13 7:24 ` [PATCH v3 09/10] ASoC: Intel: bytcr_rt5640: Add quirks for various devices Hans de Goede
2018-05-13 7:24 ` [PATCH v3 10/10] ASoC: Intel: bytcr_rt5640: Set card long_name based on quirks Hans de Goede
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=20180513072435.3358-6-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=oder_chiou@realtek.com \
--cc=pierre-louis.bossart@linux.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 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).