From: Hans de Goede <hdegoede@redhat.com>
To: Liam Girdwood <liam.r.girdwood@linux.intel.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>,
Carlo Caione <carlo@endlessm.com>
Subject: [PATCH 5/9] ASoC: Intel: bytcr_rt5651: Fix IN1 map headsetmic mapping
Date: Sun, 24 Jun 2018 16:06:30 +0200 [thread overview]
Message-ID: <20180624140634.16835-6-hdegoede@redhat.com> (raw)
In-Reply-To: <20180624140634.16835-1-hdegoede@redhat.com>
The initial bytcr_rt5651 machine driver commit mapped IN2 as the headset
mic. In retrospect this is not correct as all known boards have the headset
mic on IN3. To workaround this special IN?_HS_IN3 mappings were added.
This commit fixes the original IN1 mapping to correctly have the headset
mic on IN3, moves all users of the IN1_HS_IN3 mapping over to the fixed
IN1_MAP and drops the now no longer needed IN1_HS_IN3 mapping.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
sound/soc/intel/boards/bytcr_rt5651.c | 29 +++++++--------------------
1 file changed, 7 insertions(+), 22 deletions(-)
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index c1bc3d4df841..70067e31a33e 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -43,7 +43,6 @@ enum {
BYT_RT5651_DMIC_MAP,
BYT_RT5651_IN1_MAP,
BYT_RT5651_IN1_IN2_MAP,
- BYT_RT5651_IN1_HS_IN3_MAP,
};
enum {
@@ -92,7 +91,7 @@ struct byt_rt5651_private {
/* Default: jack-detect on JD1_1, internal mic on in1, headsetmic on in3 */
static unsigned long byt_rt5651_quirk = BYT_RT5651_DEFAULT_QUIRKS |
- BYT_RT5651_IN1_HS_IN3_MAP;
+ BYT_RT5651_IN1_MAP;
static void log_quirks(struct device *dev)
{
@@ -102,8 +101,6 @@ static void log_quirks(struct device *dev)
dev_info(dev, "quirk IN1_MAP enabled");
if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_IN2_MAP)
dev_info(dev, "quirk IN1_IN2_MAP enabled");
- if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_HS_IN3_MAP)
- dev_info(dev, "quirk IN1_HS_IN3_MAP enabled");
if (BYT_RT5651_JDSRC(byt_rt5651_quirk)) {
dev_info(dev, "quirk realtek,jack-detect-source %ld\n",
BYT_RT5651_JDSRC(byt_rt5651_quirk));
@@ -249,7 +246,7 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic_map[] = {
static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = {
{"Internal Mic", NULL, "micbias1"},
{"IN1P", NULL, "Internal Mic"},
- {"IN2P", NULL, "Headset Mic"},
+ {"IN3P", NULL, "Headset Mic"},
};
static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_in2_map[] = {
@@ -259,12 +256,6 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_in2_map[] = {
{"IN3P", NULL, "Headset Mic"},
};
-static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_hs_in3_map[] = {
- {"Internal Mic", NULL, "micbias1"},
- {"IN1P", NULL, "Internal Mic"},
- {"IN3P", NULL, "Headset Mic"},
-};
-
static const struct snd_soc_dapm_route byt_rt5651_ssp0_aif1_map[] = {
{"ssp0 Tx", NULL, "modem_out"},
{"modem_in", NULL, "ssp0 Rx"},
@@ -350,7 +341,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
DMI_MATCH(DMI_SYS_VENDOR, "Circuitco"),
DMI_MATCH(DMI_PRODUCT_NAME, "Minnowboard Max B3 PLATFORM"),
},
- .driver_data = (void *)(BYT_RT5651_IN1_HS_IN3_MAP),
+ .driver_data = (void *)(BYT_RT5651_IN1_MAP),
},
{
.callback = byt_rt5651_quirk_cb,
@@ -359,7 +350,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Minnowboard Turbot"),
},
.driver_data = (void *)(BYT_RT5651_MCLK_EN |
- BYT_RT5651_IN1_HS_IN3_MAP),
+ BYT_RT5651_IN1_MAP),
},
{
.callback = byt_rt5651_quirk_cb,
@@ -378,7 +369,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "D2D3_Vi8A1"),
},
.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
- BYT_RT5651_IN1_HS_IN3_MAP),
+ BYT_RT5651_IN1_MAP),
},
{
/* VIOS LTH17 */
@@ -469,10 +460,6 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
custom_map = byt_rt5651_intmic_in1_in2_map;
num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_in2_map);
break;
- case BYT_RT5651_IN1_HS_IN3_MAP:
- custom_map = byt_rt5651_intmic_in1_hs_in3_map;
- num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_hs_in3_map);
- break;
default:
custom_map = byt_rt5651_intmic_dmic_map;
num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic_map);
@@ -717,10 +704,8 @@ struct acpi_chan_package { /* ACPICA seems to require 64 bit integers */
static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
{
- const char * const intmic_name[] =
- { "dmic", "in1", "in12", "in1" };
- const char * const hsmic_name[] =
- { "in2", "in2", "in3", "in3" };
+ const char * const intmic_name[] = { "dmic", "in1", "in12" };
+ const char * const hsmic_name[] = { "in2", "in3", "in3" };
struct byt_rt5651_private *priv;
struct snd_soc_acpi_mach *mach;
const char *i2c_name = NULL;
--
2.17.1
next prev parent reply other threads:[~2018-06-24 14:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-24 14:06 [[PATCH 0/9] ASoC: Intel: bytcr_rt5651: Cleanup (input mapping quirks) Hans de Goede
2018-06-24 14:06 ` [PATCH 1/9] ASoC: Intel: bytcr_rt5651: Add BYT_RT5651_DEFAULT_QUIRKS define Hans de Goede
2018-06-27 11:32 ` Applied "ASoC: Intel: bytcr_rt5651: Add BYT_RT5651_DEFAULT_QUIRKS define" to the asoc tree Mark Brown
2018-06-24 14:06 ` [PATCH 2/9] ASoC: Intel: bytcr_rt5651: Change default input map from in2 to in1 Hans de Goede
2018-06-27 11:32 ` Applied "ASoC: Intel: bytcr_rt5651: Change default input map from in2 to in1" to the asoc tree Mark Brown
2018-06-24 14:06 ` [PATCH 3/9] ASoC: Intel: bytcr_rt5651: Fix IN1_IN2_MAP quirk not being logged Hans de Goede
2018-06-27 11:32 ` Applied "ASoC: Intel: bytcr_rt5651: Fix IN1_IN2_MAP quirk not being logged" to the asoc tree Mark Brown
2018-06-24 14:06 ` [PATCH 4/9] ASoC: Intel: bytcr_rt5651: Remove IN2 input mappings Hans de Goede
2018-06-27 11:31 ` Applied "ASoC: Intel: bytcr_rt5651: Remove IN2 input mappings" to the asoc tree Mark Brown
2018-06-24 14:06 ` Hans de Goede [this message]
2018-06-27 11:31 ` Applied "ASoC: Intel: bytcr_rt5651: Fix IN1 map headsetmic mapping" " Mark Brown
2018-06-24 14:06 ` [PATCH 6/9] ASoC: Intel: bytcr_rt5651: Fix DMIC map headsetmic mapping Hans de Goede
2018-06-27 11:31 ` Applied "ASoC: Intel: bytcr_rt5651: Fix DMIC map headsetmic mapping" to the asoc tree Mark Brown
2018-06-24 14:06 ` [PATCH 7/9] ASoC: Intel: bytcr_rt5651: Simplify card long-name Hans de Goede
2018-06-27 11:31 ` Applied "ASoC: Intel: bytcr_rt5651: Simplify card long-name" to the asoc tree Mark Brown
2018-06-24 14:06 ` [PATCH 8/9] ASoC: Intel: bytcr_rt5651: Add BYT_RT5651_HP_LR_SWAPPED quirk Hans de Goede
2018-06-27 11:30 ` Applied "ASoC: Intel: bytcr_rt5651: Add BYT_RT5651_HP_LR_SWAPPED quirk" to the asoc tree Mark Brown
2018-06-24 14:06 ` [PATCH 9/9] ASoC: Intel: bytcr_rt5651: Sort DMI table entries alphabetically Hans de Goede
2018-06-27 11:30 ` Applied "ASoC: Intel: bytcr_rt5651: Sort DMI table entries alphabetically" to the asoc tree Mark Brown
2018-06-25 20:01 ` [[PATCH 0/9] ASoC: Intel: bytcr_rt5651: Cleanup (input mapping quirks) Pierre-Louis Bossart
2018-06-26 9:47 ` Hans de Goede
2018-06-27 4:40 ` Pierre-Louis Bossart
2018-06-27 7:16 ` 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=20180624140634.16835-6-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=broonie@kernel.org \
--cc=carlo@endlessm.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=oder_chiou@realtek.com \
--cc=pierre-louis.bossart@linux.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