Commit fcdf1391 authored by Hans de Goede's avatar Hans de Goede Committed by Mark Brown

ASoC: Intel: bytcr_rt5651: Remove IN2 input mappings

BYT_RT5651_IN2_MAP was introduced in commit 39712db8 ("SoC: intel: byt:
Introduce new custom IN2 map"), uses in commit 2fe30129 ("ASoC: intel:
byt: Enable IN2 map quirk for a KIANO laptop"), only to be replaced by a
new BYT_RT5651_IN1_IN2_MAP quirk in commit ea261bd0 ("ASoC: intel:
byt: Introduce new map for dual mics") quickly afterwards, because the
KIANO laptop has 2 internal mics on IN1 and IN2 and the headset mic is
not in IN1 where the BYT_RT5651_IN2_MAP maps it, but on IN3.

Now that the KIANO quirk entry uses BYT_RT5651_IN1_IN2_MAP, there are no
users of BYT_RT5651_IN2_MAP left. This makes sense since the headset mic
seems to always be connected to IN3, so BYT_RT5651_IN2_MAP is not useful.

To deal with BYT_RT5651_IN2_MAP wrongly mapping the headset mic to IN1,
BYT_RT5651_IN2_HS_IN3_MAP was added in commit f026e063 ("ASoC: Intel:
bytcr_rt5651: Add new IN2_HS_IN3 input map and a quirk using it"). This
was based on the assumption then some devices have the internal mic
connected to IN2 only. Further testing has shown that this is wrong and the
internal mic is always connected to IN1 and sometimes to both IN1 and IN2.

TL;DR: Both BYT_RT5651_IN2_MAP and BYT_RT5651_IN2_HS_IN3_MAP are based on
on wrong assumptions from the past and are no longer useful now, so they
can both be removed.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 366780df
...@@ -40,10 +40,8 @@ ...@@ -40,10 +40,8 @@
enum { enum {
BYT_RT5651_DMIC_MAP, BYT_RT5651_DMIC_MAP,
BYT_RT5651_IN1_MAP, BYT_RT5651_IN1_MAP,
BYT_RT5651_IN2_MAP,
BYT_RT5651_IN1_IN2_MAP, BYT_RT5651_IN1_IN2_MAP,
BYT_RT5651_IN1_HS_IN3_MAP, BYT_RT5651_IN1_HS_IN3_MAP,
BYT_RT5651_IN2_HS_IN3_MAP,
}; };
enum { enum {
...@@ -100,14 +98,10 @@ static void log_quirks(struct device *dev) ...@@ -100,14 +98,10 @@ static void log_quirks(struct device *dev)
dev_info(dev, "quirk DMIC_MAP enabled"); dev_info(dev, "quirk DMIC_MAP enabled");
if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP) if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP)
dev_info(dev, "quirk IN1_MAP enabled"); 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_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_IN2_MAP) if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_IN2_MAP)
dev_info(dev, "quirk IN1_IN2_MAP enabled"); dev_info(dev, "quirk IN1_IN2_MAP enabled");
if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_HS_IN3_MAP) if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_HS_IN3_MAP)
dev_info(dev, "quirk IN1_HS_IN3_MAP enabled"); dev_info(dev, "quirk IN1_HS_IN3_MAP enabled");
if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN2_HS_IN3_MAP)
dev_info(dev, "quirk IN2_HS_IN3_MAP enabled");
if (BYT_RT5651_JDSRC(byt_rt5651_quirk)) { if (BYT_RT5651_JDSRC(byt_rt5651_quirk)) {
dev_info(dev, "quirk realtek,jack-detect-source %ld\n", dev_info(dev, "quirk realtek,jack-detect-source %ld\n",
BYT_RT5651_JDSRC(byt_rt5651_quirk)); BYT_RT5651_JDSRC(byt_rt5651_quirk));
...@@ -256,12 +250,6 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = { ...@@ -256,12 +250,6 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = {
{"IN2P", NULL, "Headset Mic"}, {"IN2P", NULL, "Headset 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_soc_dapm_route byt_rt5651_intmic_in1_in2_map[] = { static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_in2_map[] = {
{"Internal Mic", NULL, "micbias1"}, {"Internal Mic", NULL, "micbias1"},
{"IN1P", NULL, "Internal Mic"}, {"IN1P", NULL, "Internal Mic"},
...@@ -275,12 +263,6 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_hs_in3_map[] = { ...@@ -275,12 +263,6 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_hs_in3_map[] = {
{"IN3P", NULL, "Headset Mic"}, {"IN3P", NULL, "Headset Mic"},
}; };
static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_hs_in3_map[] = {
{"Internal Mic", NULL, "micbias1"},
{"IN2P", NULL, "Internal Mic"},
{"IN3P", NULL, "Headset Mic"},
};
static const struct snd_soc_dapm_route byt_rt5651_ssp0_aif1_map[] = { static const struct snd_soc_dapm_route byt_rt5651_ssp0_aif1_map[] = {
{"ssp0 Tx", NULL, "modem_out"}, {"ssp0 Tx", NULL, "modem_out"},
{"modem_in", NULL, "ssp0 Rx"}, {"modem_in", NULL, "ssp0 Rx"},
...@@ -462,10 +444,6 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime) ...@@ -462,10 +444,6 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
custom_map = byt_rt5651_intmic_in1_map; custom_map = byt_rt5651_intmic_in1_map;
num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_map); num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_map);
break; break;
case BYT_RT5651_IN2_MAP:
custom_map = byt_rt5651_intmic_in2_map;
num_routes = ARRAY_SIZE(byt_rt5651_intmic_in2_map);
break;
case BYT_RT5651_IN1_IN2_MAP: case BYT_RT5651_IN1_IN2_MAP:
custom_map = byt_rt5651_intmic_in1_in2_map; custom_map = byt_rt5651_intmic_in1_in2_map;
num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_in2_map); num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_in2_map);
...@@ -474,10 +452,6 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime) ...@@ -474,10 +452,6 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
custom_map = byt_rt5651_intmic_in1_hs_in3_map; custom_map = byt_rt5651_intmic_in1_hs_in3_map;
num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_hs_in3_map); num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_hs_in3_map);
break; break;
case BYT_RT5651_IN2_HS_IN3_MAP:
custom_map = byt_rt5651_intmic_in2_hs_in3_map;
num_routes = ARRAY_SIZE(byt_rt5651_intmic_in2_hs_in3_map);
break;
default: default:
custom_map = byt_rt5651_intmic_dmic_map; custom_map = byt_rt5651_intmic_dmic_map;
num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic_map); num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic_map);
...@@ -723,9 +697,9 @@ struct acpi_chan_package { /* ACPICA seems to require 64 bit integers */ ...@@ -723,9 +697,9 @@ struct acpi_chan_package { /* ACPICA seems to require 64 bit integers */
static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
{ {
const char * const intmic_name[] = const char * const intmic_name[] =
{ "dmic", "in1", "in2", "in12", "in1", "in2" }; { "dmic", "in1", "in12", "in1" };
const char * const hsmic_name[] = const char * const hsmic_name[] =
{ "in2", "in2", "in1", "in3", "in3", "in3" }; { "in2", "in2", "in3", "in3" };
struct byt_rt5651_private *priv; struct byt_rt5651_private *priv;
struct snd_soc_acpi_mach *mach; struct snd_soc_acpi_mach *mach;
const char *i2c_name = NULL; const char *i2c_name = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment