All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] ASoC: rt5651: Various fixes and quirks
@ 2018-07-18 20:55 Hans de Goede
  2018-07-18 20:55 ` [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control Hans de Goede
                   ` (6 more replies)
  0 siblings, 7 replies; 24+ messages in thread
From: Hans de Goede @ 2018-07-18 20:55 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Bard Liao, Oder Chiou
  Cc: Hans de Goede, alsa-devel, Pierre-Louis Bossart, Carlo Caione

Hi All,

Here is my last (big) round of (Intel) rt5651 support updates, with
these patches combined with the updated, matching UCM profiles from here:
https://github.com/jwrdegoede/alsa-lib/commits/master

All 7 different devices I have work 100% OOTB, without requiring
any manual config or mixer setup. After this there should be no more
big changes.

I will submit the matching alsa-lib UCM profile changes upstream once
this set is in -next (and thus I can be sure the long-names will not
change due to review).

Note that unfortunately my previous round of cleanup patches removed
1 input mapping (of the 3 mappings in total it removed) which is
actually necessary. So this series re-introduces that 1 mapping. I did
not notice this before because UCM input profile switching does not work
reliably for some reason, something which I still need to investigate.
This time I manually veryfied that the correct / expected mixer settings
where used while testing.

Regards,

Hans

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control
  2018-07-18 20:55 [PATCH 0/6] ASoC: rt5651: Various fixes and quirks Hans de Goede
@ 2018-07-18 20:55 ` Hans de Goede
  2018-07-19 15:02   ` Mark Brown
  2018-07-19 16:57   ` Applied "ASoC: rt5651: Add IN3 Boost volume control" to the asoc tree Mark Brown
  2018-07-18 20:55 ` [PATCH 2/6] ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some boards Hans de Goede
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 24+ messages in thread
From: Hans de Goede @ 2018-07-18 20:55 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Bard Liao, Oder Chiou
  Cc: Hans de Goede, alsa-devel, Pierre-Louis Bossart, Carlo Caione

Add a mixer control for the IN3 Boost volume, IN3 is used for the headset
mic on most devices, so this is necessary to control the headset mic
volume.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 sound/soc/codecs/rt5651.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c
index 0462049e739c..985852fd9723 100644
--- a/sound/soc/codecs/rt5651.c
+++ b/sound/soc/codecs/rt5651.c
@@ -331,11 +331,13 @@ static const struct snd_kcontrol_new rt5651_snd_controls[] = {
 	SOC_DOUBLE_TLV("Mono DAC Playback Volume", RT5651_DAC2_DIG_VOL,
 			RT5651_L_VOL_SFT, RT5651_R_VOL_SFT,
 			175, 0, dac_vol_tlv),
-	/* IN1/IN2 Control */
+	/* IN1/IN2/IN3 Control */
 	SOC_SINGLE_TLV("IN1 Boost", RT5651_IN1_IN2,
 		RT5651_BST_SFT1, 8, 0, bst_tlv),
 	SOC_SINGLE_TLV("IN2 Boost", RT5651_IN1_IN2,
 		RT5651_BST_SFT2, 8, 0, bst_tlv),
+	SOC_SINGLE_TLV("IN3 Boost", RT5651_IN3,
+		RT5651_BST_SFT1, 8, 0, bst_tlv),
 	/* INL/INR Volume Control */
 	SOC_DOUBLE_TLV("IN Capture Volume", RT5651_INL1_INR1_VOL,
 			RT5651_INL_VOL_SFT, RT5651_INR_VOL_SFT,
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/6] ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some boards
  2018-07-18 20:55 [PATCH 0/6] ASoC: rt5651: Various fixes and quirks Hans de Goede
  2018-07-18 20:55 ` [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control Hans de Goede
@ 2018-07-18 20:55 ` Hans de Goede
  2018-07-19 16:57   ` Applied "ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some boards" to the asoc tree Mark Brown
  2018-07-18 20:55 ` [PATCH 3/6] ASoC: Intel: bytcr_rt5651: Set OVCD limit for VIOS LTH17 to 2000uA Hans de Goede
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 24+ messages in thread
From: Hans de Goede @ 2018-07-18 20:55 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Bard Liao, Oder Chiou
  Cc: Hans de Goede, alsa-devel, Pierre-Louis Bossart, Carlo Caione

Some boards have I2cSerialBusV2, GpioIo, GpioInt as ACPI resources, other
boards may  have I2cSerialBusV2, GpioInt, GpioIo instead. We want the
GpioIo one for the ext-amp-enable-gpio.

So far we've been assuming that the GpioIo one always comes first, this
commit adds code to detect which one comes first and to add the right
gpio-mapping.

This fixes sound not working on the Vios LTH17 laptop.

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

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index b687043c8425..601e47c33ba8 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -747,13 +747,74 @@ static const struct x86_cpu_id cherrytrail_cpu_ids[] = {
 	{}
 };
 
-static const struct acpi_gpio_params ext_amp_enable_gpios = { 0, 0, false };
+static const struct acpi_gpio_params first_gpio = { 0, 0, false };
+static const struct acpi_gpio_params second_gpio = { 1, 0, false };
 
-static const struct acpi_gpio_mapping byt_rt5651_gpios[] = {
-	{ "ext-amp-enable-gpios", &ext_amp_enable_gpios, 1 },
+static const struct acpi_gpio_mapping byt_rt5651_amp_en_first[] = {
+	{ "ext-amp-enable-gpios", &first_gpio, 1 },
 	{ },
 };
 
+static const struct acpi_gpio_mapping byt_rt5651_amp_en_second[] = {
+	{ "ext-amp-enable-gpios", &second_gpio, 1 },
+	{ },
+};
+
+/*
+ * Some boards have I2cSerialBusV2, GpioIo, GpioInt as ACPI resources, other
+ * boards may  have I2cSerialBusV2, GpioInt, GpioIo instead. We want the
+ * GpioIo one for the ext-amp-enable-gpio and both count for the index in
+ * acpi_gpio_params index.  So we have 2 different mappings and the code
+ * below figures out which one to use.
+ */
+struct byt_rt5651_acpi_resource_data {
+	int gpio_count;
+	int gpio_int_idx;
+};
+
+static int snd_byt_rt5651_acpi_resource(struct acpi_resource *ares, void *arg)
+{
+	struct byt_rt5651_acpi_resource_data *data = arg;
+
+	if (ares->type != ACPI_RESOURCE_TYPE_GPIO)
+		return 0;
+
+	if (ares->data.gpio.connection_type == ACPI_RESOURCE_GPIO_TYPE_INT)
+		data->gpio_int_idx = data->gpio_count;
+
+	data->gpio_count++;
+	return 0;
+}
+
+static void snd_byt_rt5651_mc_add_amp_en_gpio_mapping(struct device *codec)
+{
+	struct byt_rt5651_acpi_resource_data data = { 0, -1 };
+	LIST_HEAD(resources);
+	int ret;
+
+	ret = acpi_dev_get_resources(ACPI_COMPANION(codec), &resources,
+				     snd_byt_rt5651_acpi_resource, &data);
+	if (ret < 0) {
+		dev_warn(codec, "Failed to get ACPI resources, not adding external amplifier GPIO mapping\n");
+		return;
+	}
+
+	/* All info we need is gathered during the walk */
+	acpi_dev_free_resource_list(&resources);
+
+	switch (data.gpio_int_idx) {
+	case 0:
+		devm_acpi_dev_add_driver_gpios(codec, byt_rt5651_amp_en_second);
+		break;
+	case 1:
+		devm_acpi_dev_add_driver_gpios(codec, byt_rt5651_amp_en_first);
+		break;
+	default:
+		dev_warn(codec, "Unknown GpioInt index %d, not adding external amplifier GPIO mapping\n",
+			 data.gpio_int_idx);
+	}
+}
+
 struct acpi_chan_package {   /* ACPICA seems to require 64 bit integers */
 	u64 aif_value;       /* 1: AIF1, 2: AIF2 */
 	u64 mclock_value;    /* usually 25MHz (0x17d7940), ignored */
@@ -876,7 +937,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 
 	/* Cherry Trail devices use an external amplifier enable gpio */
 	if (x86_match_cpu(cherrytrail_cpu_ids)) {
-		devm_acpi_dev_add_driver_gpios(codec_dev, byt_rt5651_gpios);
+		snd_byt_rt5651_mc_add_amp_en_gpio_mapping(codec_dev);
 		priv->ext_amp_gpio = devm_fwnode_get_index_gpiod_from_child(
 						&pdev->dev, "ext-amp-enable", 0,
 						codec_dev->fwnode,
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/6] ASoC: Intel: bytcr_rt5651: Set OVCD limit for VIOS LTH17 to 2000uA
  2018-07-18 20:55 [PATCH 0/6] ASoC: rt5651: Various fixes and quirks Hans de Goede
  2018-07-18 20:55 ` [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control Hans de Goede
  2018-07-18 20:55 ` [PATCH 2/6] ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some boards Hans de Goede
@ 2018-07-18 20:55 ` Hans de Goede
  2018-07-19 16:57   ` Applied "ASoC: Intel: bytcr_rt5651: Set OVCD limit for VIOS LTH17 to 2000uA" to the asoc tree Mark Brown
  2018-07-18 20:55 ` [PATCH 4/6] ASoC: Intel: bytcr_rt5651: Add IN2 input mapping Hans de Goede
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 24+ messages in thread
From: Hans de Goede @ 2018-07-18 20:55 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Bard Liao, Oder Chiou
  Cc: Hans de Goede, alsa-devel, Pierre-Louis Bossart, Carlo Caione

With the default over current detect limit of 1500uA headsets on often
get detected as headphones on the VIOS LTH17 and even when detected as
headset the OVCD current triggers often while plugged in, resulting in
false-positive button press detection.

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

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 601e47c33ba8..53ac97c15fc6 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -414,8 +414,11 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 			DMI_MATCH(DMI_SYS_VENDOR, "VIOS"),
 			DMI_MATCH(DMI_PRODUCT_NAME, "LTH17"),
 		},
-		.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
-					BYT_RT5651_IN1_IN2_MAP),
+		.driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP |
+					BYT_RT5651_JD1_1 |
+					BYT_RT5651_OVCD_TH_2000UA |
+					BYT_RT5651_OVCD_SF_1P0 |
+					BYT_RT5651_MCLK_EN),
 	},
 	{}
 };
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 4/6] ASoC: Intel: bytcr_rt5651: Add IN2 input mapping
  2018-07-18 20:55 [PATCH 0/6] ASoC: rt5651: Various fixes and quirks Hans de Goede
                   ` (2 preceding siblings ...)
  2018-07-18 20:55 ` [PATCH 3/6] ASoC: Intel: bytcr_rt5651: Set OVCD limit for VIOS LTH17 to 2000uA Hans de Goede
@ 2018-07-18 20:55 ` Hans de Goede
  2018-07-18 21:20   ` Pierre-Louis Bossart
  2018-07-19 16:57   ` Applied "ASoC: Intel: bytcr_rt5651: Add IN2 input mapping" to the asoc tree Mark Brown
  2018-07-18 20:55 ` [PATCH 5/6] ASoC: Intel: bytcr_rt5651: Add mono speaker quirk Hans de Goede
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 24+ messages in thread
From: Hans de Goede @ 2018-07-18 20:55 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Bard Liao, Oder Chiou
  Cc: Hans de Goede, alsa-devel, Pierre-Louis Bossart, Carlo Caione

During the recent cleanup series 3 of the 6 input mappings where removed
from the bytcr_rt5651 machine driver because testing showed that none of
them were used.

However some devices do actually have their internal mic on IN2 (and
only IN2, not IN1 and IN2), this did not show during previous tests
due to a bug in the userspace UCM input device switching code.

This commit re-adds the IN2 mapping for devices with the internal mic.
on IN2 and the headser mic on IN3 and enables this mapping on devices
with their internal mic on IN2.

This commit also changes the default internal mic input to IN2, because
all my 7 test devices have their mic there.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Note I have put getting to the bottom of the UCM input device switching
code and fixing it on my TODO list
---
 sound/soc/intel/boards/bytcr_rt5651.c | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 53ac97c15fc6..d85530b1cc8e 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -44,6 +44,7 @@
 enum {
 	BYT_RT5651_DMIC_MAP,
 	BYT_RT5651_IN1_MAP,
+	BYT_RT5651_IN2_MAP,
 	BYT_RT5651_IN1_IN2_MAP,
 };
 
@@ -93,9 +94,9 @@ struct byt_rt5651_private {
 	struct snd_soc_jack jack;
 };
 
-/* Default: jack-detect on JD1_1, internal mic on in1, headsetmic on in3 */
+/* Default: jack-detect on JD1_1, internal mic on in2, headsetmic on in3 */
 static unsigned long byt_rt5651_quirk = BYT_RT5651_DEFAULT_QUIRKS |
-					BYT_RT5651_IN1_MAP;
+					BYT_RT5651_IN2_MAP;
 
 static void log_quirks(struct device *dev)
 {
@@ -103,6 +104,8 @@ static void log_quirks(struct device *dev)
 		dev_info(dev, "quirk DMIC_MAP enabled");
 	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP)
 		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)
 		dev_info(dev, "quirk IN1_IN2_MAP enabled");
 	if (BYT_RT5651_JDSRC(byt_rt5651_quirk)) {
@@ -270,6 +273,12 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = {
 	{"IN3P", NULL, "Headset Mic"},
 };
 
+static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
+	{"Internal Mic", NULL, "micbias1"},
+	{"IN2P", NULL, "Internal Mic"},
+	{"IN3P", NULL, "Headset Mic"},
+};
+
 static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_in2_map[] = {
 	{"Internal Mic", NULL, "micbias1"},
 	{"IN1P", NULL, "Internal Mic"},
@@ -364,7 +373,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
 		},
 		.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
-					BYT_RT5651_IN1_MAP |
+					BYT_RT5651_IN2_MAP |
 					BYT_RT5651_HP_LR_SWAPPED),
 	},
 	{
@@ -375,7 +384,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_MAP |
+					BYT_RT5651_IN2_MAP |
 					BYT_RT5651_HP_LR_SWAPPED),
 	},
 	{
@@ -468,6 +477,10 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
 		custom_map = byt_rt5651_intmic_in1_map;
 		num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_map);
 		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:
 		custom_map = byt_rt5651_intmic_in1_in2_map;
 		num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_in2_map);
@@ -825,7 +838,7 @@ 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 mic_name[] = { "dmic", "in1", "in12" };
+	const char * const mic_name[] = { "dmic", "in1", "in2", "in12" };
 	struct byt_rt5651_private *priv;
 	struct snd_soc_acpi_mach *mach;
 	struct device *codec_dev;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 5/6] ASoC: Intel: bytcr_rt5651: Add mono speaker quirk
  2018-07-18 20:55 [PATCH 0/6] ASoC: rt5651: Various fixes and quirks Hans de Goede
                   ` (3 preceding siblings ...)
  2018-07-18 20:55 ` [PATCH 4/6] ASoC: Intel: bytcr_rt5651: Add IN2 input mapping Hans de Goede
@ 2018-07-18 20:55 ` Hans de Goede
  2018-07-19 16:56   ` Applied "ASoC: Intel: bytcr_rt5651: Add mono speaker quirk" to the asoc tree Mark Brown
  2018-07-18 20:55 ` [PATCH 6/6] ASoC: Intel: bytcr_rt5651: Add quirk table entries for various devices Hans de Goede
  2018-12-24 14:15 ` [PATCH 0/6] ASoC: rt5651: Various fixes and quirks Hans de Goede
  6 siblings, 1 reply; 24+ messages in thread
From: Hans de Goede @ 2018-07-18 20:55 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Bard Liao, Oder Chiou
  Cc: Hans de Goede, alsa-devel, Pierre-Louis Bossart, Carlo Caione

During my initial round of bytcr_rt5651 long-name patches I did not include
a difference for mono vs stereo speaker setups in the longname because it
seems that all 5651 devices with only a single speaker do some mixing of
left + right on the PCB.

However further testing has shown that while this works great when only
playing audio on the left or right channel, the output becomes garbled
when using both channels at once. Something which does not happen when
using the Stereo DAC MIXL / MIXR switches to mix the channels together
inside the codec and then only outputting on a single channel.

So we need to have separate UCM profiles and thus separate long-names
for devices with a mono speaker vs stereo speakers. Just as we already
have for the bytcr_rt5640 case.

This commit adds a new BYT_RT5651_MONO_SPEAKER quirk and adds "stereo-spk"
or "mono-spk" to the long-name based on this and enables this mapping on
devices with a mono speaker.

Changing the long-name like this is ok for now, since I'm still working
on the UCM profiles, so they are not in upstream alsa-lib yet.

This brings the long-name naming scheme fully in sync with the bytcr_rt5640
case, which is good from a consistency pov.

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

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index d85530b1cc8e..8374e633796d 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -79,6 +79,7 @@ enum {
 #define BYT_RT5651_SSP0_AIF1		BIT(20)
 #define BYT_RT5651_SSP0_AIF2		BIT(21)
 #define BYT_RT5651_HP_LR_SWAPPED	BIT(22)
+#define BYT_RT5651_MONO_SPEAKER		BIT(23)
 
 #define BYT_RT5651_DEFAULT_QUIRKS	(BYT_RT5651_MCLK_EN | \
 					 BYT_RT5651_JD1_1   | \
@@ -128,6 +129,8 @@ static void log_quirks(struct device *dev)
 		dev_info(dev, "quirk SSP0_AIF1 enabled\n");
 	if (byt_rt5651_quirk & BYT_RT5651_SSP0_AIF2)
 		dev_info(dev, "quirk SSP0_AIF2 enabled\n");
+	if (byt_rt5651_quirk & BYT_RT5651_MONO_SPEAKER)
+		dev_info(dev, "quirk MONO_SPEAKER enabled\n");
 }
 
 #define BYT_CODEC_DAI1	"rt5651-aif1"
@@ -374,7 +377,8 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 		},
 		.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
 					BYT_RT5651_IN2_MAP |
-					BYT_RT5651_HP_LR_SWAPPED),
+					BYT_RT5651_HP_LR_SWAPPED |
+					BYT_RT5651_MONO_SPEAKER),
 	},
 	{
 		/* Chuwi Vi8 Plus (CWI519) */
@@ -385,7 +389,8 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 		},
 		.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
 					BYT_RT5651_IN2_MAP |
-					BYT_RT5651_HP_LR_SWAPPED),
+					BYT_RT5651_HP_LR_SWAPPED |
+					BYT_RT5651_MONO_SPEAKER),
 	},
 	{
 		/* KIANO SlimNote 14.2 */
@@ -700,7 +705,7 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = {
 static char byt_rt5651_codec_name[SND_ACPI_I2C_ID_LEN];
 static char byt_rt5651_codec_aif_name[12]; /*  = "rt5651-aif[1|2]" */
 static char byt_rt5651_cpu_dai_name[10]; /*  = "ssp[0|2]-port" */
-static char byt_rt5651_long_name[40]; /* = "bytcr-rt5651-*-mic[-swapped-hp]" */
+static char byt_rt5651_long_name[50]; /* = "bytcr-rt5651-*-spk-*-mic[-swapped-hp]" */
 
 static int byt_rt5651_suspend(struct snd_soc_card *card)
 {
@@ -1025,7 +1030,9 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 		hp_swapped = "";
 
 	snprintf(byt_rt5651_long_name, sizeof(byt_rt5651_long_name),
-		 "bytcr-rt5651-%s-mic%s",
+		 "bytcr-rt5651-%s-spk-%s-mic%s",
+		 (byt_rt5651_quirk & BYT_RT5651_MONO_SPEAKER) ?
+			"mono" : "stereo",
 		 mic_name[BYT_RT5651_MAP(byt_rt5651_quirk)], hp_swapped);
 	byt_rt5651_card.long_name = byt_rt5651_long_name;
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 6/6] ASoC: Intel: bytcr_rt5651: Add quirk table entries for various devices
  2018-07-18 20:55 [PATCH 0/6] ASoC: rt5651: Various fixes and quirks Hans de Goede
                   ` (4 preceding siblings ...)
  2018-07-18 20:55 ` [PATCH 5/6] ASoC: Intel: bytcr_rt5651: Add mono speaker quirk Hans de Goede
@ 2018-07-18 20:55 ` Hans de Goede
  2018-07-19 16:56   ` Applied "ASoC: Intel: bytcr_rt5651: Add quirk table entries for various devices" to the asoc tree Mark Brown
  2018-12-24 14:15 ` [PATCH 0/6] ASoC: rt5651: Various fixes and quirks Hans de Goede
  6 siblings, 1 reply; 24+ messages in thread
From: Hans de Goede @ 2018-07-18 20:55 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Bard Liao, Oder Chiou
  Cc: Hans de Goede, alsa-devel, Pierre-Louis Bossart, Carlo Caione

Add quirk table entries for the following tablets:

ITWorks TW701
Ployer Momo7w
Trekstor win7
Yours 8"

These all use the default settings, except that they only have a single
speaker and thus need the mono-speaker quirk.

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

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 8374e633796d..f8a68bdb3885 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -392,6 +392,21 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 					BYT_RT5651_HP_LR_SWAPPED |
 					BYT_RT5651_MONO_SPEAKER),
 	},
+	{
+		/* I.T.Works TW701, Ployer Momo7w and Trekstor ST70416-6
+		 * (these all use the same mainboard) */
+		.callback = byt_rt5651_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "INSYDE Corp."),
+			/* Partial match for all of itWORKS.G.WI71C.JGBMRBA,
+			 * TREK.G.WI71C.JGBMRBA0x and MOMO.G.WI71C.MABMRBA02 */
+			DMI_MATCH(DMI_BIOS_VERSION, ".G.WI71C."),
+		},
+		.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
+					BYT_RT5651_IN2_MAP |
+					BYT_RT5651_SSP0_AIF1 |
+					BYT_RT5651_MONO_SPEAKER),
+	},
 	{
 		/* KIANO SlimNote 14.2 */
 		.callback = byt_rt5651_quirk_cb,
@@ -434,6 +449,19 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 					BYT_RT5651_OVCD_SF_1P0 |
 					BYT_RT5651_MCLK_EN),
 	},
+	{
+		/* Yours Y8W81 (and others using the same mainboard) */
+		.callback = byt_rt5651_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "INSYDE Corp."),
+			/* Partial match for all devs with a W86C mainboard */
+			DMI_MATCH(DMI_BIOS_VERSION, ".F.W86C."),
+		},
+		.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
+					BYT_RT5651_IN2_MAP |
+					BYT_RT5651_SSP0_AIF1 |
+					BYT_RT5651_MONO_SPEAKER),
+	},
 	{}
 };
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 4/6] ASoC: Intel: bytcr_rt5651: Add IN2 input mapping
  2018-07-18 20:55 ` [PATCH 4/6] ASoC: Intel: bytcr_rt5651: Add IN2 input mapping Hans de Goede
@ 2018-07-18 21:20   ` Pierre-Louis Bossart
  2018-07-19 11:37     ` Hans de Goede
  2018-07-19 16:57   ` Applied "ASoC: Intel: bytcr_rt5651: Add IN2 input mapping" to the asoc tree Mark Brown
  1 sibling, 1 reply; 24+ messages in thread
From: Pierre-Louis Bossart @ 2018-07-18 21:20 UTC (permalink / raw)
  To: Hans de Goede, Liam Girdwood, Mark Brown, Bard Liao, Oder Chiou
  Cc: alsa-devel, Carlo Caione



On 07/18/2018 03:55 PM, Hans de Goede wrote:
> During the recent cleanup series 3 of the 6 input mappings where removed
> from the bytcr_rt5651 machine driver because testing showed that none of
> them were used.
>
> However some devices do actually have their internal mic on IN2 (and
> only IN2, not IN1 and IN2), this did not show during previous tests
> due to a bug in the userspace UCM input device switching code.
>
> This commit re-adds the IN2 mapping for devices with the internal mic.
> on IN2 and the headser mic on IN3 and enables this mapping on devices
> with their internal mic on IN2.
I am getting dizzy :-)
is the conclusion that hs==IN3 (no change) and int-mic==(DMIC, IN1, IN2, 
IN12)
and the UCM names only use the latter for differentiation of profiles?

>
> This commit also changes the default internal mic input to IN2, because
> all my 7 test devices have their mic there.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> Note I have put getting to the bottom of the UCM input device switching
> code and fixing it on my TODO list
> ---
>   sound/soc/intel/boards/bytcr_rt5651.c | 23 ++++++++++++++++++-----
>   1 file changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
> index 53ac97c15fc6..d85530b1cc8e 100644
> --- a/sound/soc/intel/boards/bytcr_rt5651.c
> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
> @@ -44,6 +44,7 @@
>   enum {
>   	BYT_RT5651_DMIC_MAP,
>   	BYT_RT5651_IN1_MAP,
> +	BYT_RT5651_IN2_MAP,
>   	BYT_RT5651_IN1_IN2_MAP,
>   };
>   
> @@ -93,9 +94,9 @@ struct byt_rt5651_private {
>   	struct snd_soc_jack jack;
>   };
>   
> -/* Default: jack-detect on JD1_1, internal mic on in1, headsetmic on in3 */
> +/* Default: jack-detect on JD1_1, internal mic on in2, headsetmic on in3 */
>   static unsigned long byt_rt5651_quirk = BYT_RT5651_DEFAULT_QUIRKS |
> -					BYT_RT5651_IN1_MAP;
> +					BYT_RT5651_IN2_MAP;
>   
>   static void log_quirks(struct device *dev)
>   {
> @@ -103,6 +104,8 @@ static void log_quirks(struct device *dev)
>   		dev_info(dev, "quirk DMIC_MAP enabled");
>   	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP)
>   		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)
>   		dev_info(dev, "quirk IN1_IN2_MAP enabled");
>   	if (BYT_RT5651_JDSRC(byt_rt5651_quirk)) {
> @@ -270,6 +273,12 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = {
>   	{"IN3P", NULL, "Headset Mic"},
>   };
>   
> +static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
> +	{"Internal Mic", NULL, "micbias1"},
> +	{"IN2P", NULL, "Internal Mic"},
> +	{"IN3P", NULL, "Headset Mic"},
> +};
> +
>   static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_in2_map[] = {
>   	{"Internal Mic", NULL, "micbias1"},
>   	{"IN1P", NULL, "Internal Mic"},
> @@ -364,7 +373,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
>   			DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
>   		},
>   		.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
> -					BYT_RT5651_IN1_MAP |
> +					BYT_RT5651_IN2_MAP |
>   					BYT_RT5651_HP_LR_SWAPPED),
>   	},
>   	{
> @@ -375,7 +384,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_MAP |
> +					BYT_RT5651_IN2_MAP |
>   					BYT_RT5651_HP_LR_SWAPPED),
>   	},
>   	{
> @@ -468,6 +477,10 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
>   		custom_map = byt_rt5651_intmic_in1_map;
>   		num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_map);
>   		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:
>   		custom_map = byt_rt5651_intmic_in1_in2_map;
>   		num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_in2_map);
> @@ -825,7 +838,7 @@ 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 mic_name[] = { "dmic", "in1", "in12" };
> +	const char * const mic_name[] = { "dmic", "in1", "in2", "in12" };
>   	struct byt_rt5651_private *priv;
>   	struct snd_soc_acpi_mach *mach;
>   	struct device *codec_dev;

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 4/6] ASoC: Intel: bytcr_rt5651: Add IN2 input mapping
  2018-07-18 21:20   ` Pierre-Louis Bossart
@ 2018-07-19 11:37     ` Hans de Goede
  2018-07-19 13:08       ` Pierre-Louis Bossart
  0 siblings, 1 reply; 24+ messages in thread
From: Hans de Goede @ 2018-07-19 11:37 UTC (permalink / raw)
  To: Pierre-Louis Bossart, Liam Girdwood, Mark Brown, Bard Liao, Oder Chiou
  Cc: alsa-devel, Carlo Caione

Hi,

On 18-07-18 23:20, Pierre-Louis Bossart wrote:
> 
> 
> On 07/18/2018 03:55 PM, Hans de Goede wrote:
>> During the recent cleanup series 3 of the 6 input mappings where removed
>> from the bytcr_rt5651 machine driver because testing showed that none of
>> them were used.
>>
>> However some devices do actually have their internal mic on IN2 (and
>> only IN2, not IN1 and IN2), this did not show during previous tests
>> due to a bug in the userspace UCM input device switching code.
>>
>> This commit re-adds the IN2 mapping for devices with the internal mic.
>> on IN2 and the headser mic on IN3 and enables this mapping on devices
>> with their internal mic on IN2.
> I am getting dizzy :-)
> is the conclusion that hs==IN3 (no change) and int-mic==(DMIC, IN1, IN2, IN12)

Yes that is the conclusion. Sorry about this, as said my previous
testing was wrong because of an userspace bug (which I still need to
track down).

 > and the UCM names only use the latter for differentiation of profiles?

Correct. This pretty much fully aligns the rt5651 code with the rt5640 code
wrt long-names.

Regards,

Hans


> 
>>
>> This commit also changes the default internal mic input to IN2, because
>> all my 7 test devices have their mic there.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> Note I have put getting to the bottom of the UCM input device switching
>> code and fixing it on my TODO list
>> ---
>>   sound/soc/intel/boards/bytcr_rt5651.c | 23 ++++++++++++++++++-----
>>   1 file changed, 18 insertions(+), 5 deletions(-)
>>
>> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
>> index 53ac97c15fc6..d85530b1cc8e 100644
>> --- a/sound/soc/intel/boards/bytcr_rt5651.c
>> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
>> @@ -44,6 +44,7 @@
>>   enum {
>>       BYT_RT5651_DMIC_MAP,
>>       BYT_RT5651_IN1_MAP,
>> +    BYT_RT5651_IN2_MAP,
>>       BYT_RT5651_IN1_IN2_MAP,
>>   };
>> @@ -93,9 +94,9 @@ struct byt_rt5651_private {
>>       struct snd_soc_jack jack;
>>   };
>> -/* Default: jack-detect on JD1_1, internal mic on in1, headsetmic on in3 */
>> +/* Default: jack-detect on JD1_1, internal mic on in2, headsetmic on in3 */
>>   static unsigned long byt_rt5651_quirk = BYT_RT5651_DEFAULT_QUIRKS |
>> -                    BYT_RT5651_IN1_MAP;
>> +                    BYT_RT5651_IN2_MAP;
>>   static void log_quirks(struct device *dev)
>>   {
>> @@ -103,6 +104,8 @@ static void log_quirks(struct device *dev)
>>           dev_info(dev, "quirk DMIC_MAP enabled");
>>       if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP)
>>           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)
>>           dev_info(dev, "quirk IN1_IN2_MAP enabled");
>>       if (BYT_RT5651_JDSRC(byt_rt5651_quirk)) {
>> @@ -270,6 +273,12 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = {
>>       {"IN3P", NULL, "Headset Mic"},
>>   };
>> +static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
>> +    {"Internal Mic", NULL, "micbias1"},
>> +    {"IN2P", NULL, "Internal Mic"},
>> +    {"IN3P", NULL, "Headset Mic"},
>> +};
>> +
>>   static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_in2_map[] = {
>>       {"Internal Mic", NULL, "micbias1"},
>>       {"IN1P", NULL, "Internal Mic"},
>> @@ -364,7 +373,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
>>               DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
>>           },
>>           .driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
>> -                    BYT_RT5651_IN1_MAP |
>> +                    BYT_RT5651_IN2_MAP |
>>                       BYT_RT5651_HP_LR_SWAPPED),
>>       },
>>       {
>> @@ -375,7 +384,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_MAP |
>> +                    BYT_RT5651_IN2_MAP |
>>                       BYT_RT5651_HP_LR_SWAPPED),
>>       },
>>       {
>> @@ -468,6 +477,10 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
>>           custom_map = byt_rt5651_intmic_in1_map;
>>           num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_map);
>>           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:
>>           custom_map = byt_rt5651_intmic_in1_in2_map;
>>           num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_in2_map);
>> @@ -825,7 +838,7 @@ 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 mic_name[] = { "dmic", "in1", "in12" };
>> +    const char * const mic_name[] = { "dmic", "in1", "in2", "in12" };
>>       struct byt_rt5651_private *priv;
>>       struct snd_soc_acpi_mach *mach;
>>       struct device *codec_dev;
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 4/6] ASoC: Intel: bytcr_rt5651: Add IN2 input mapping
  2018-07-19 11:37     ` Hans de Goede
@ 2018-07-19 13:08       ` Pierre-Louis Bossart
  0 siblings, 0 replies; 24+ messages in thread
From: Pierre-Louis Bossart @ 2018-07-19 13:08 UTC (permalink / raw)
  To: Hans de Goede, Liam Girdwood, Mark Brown, Bard Liao, Oder Chiou
  Cc: alsa-devel, Carlo Caione

On 7/19/18 6:37 AM, Hans de Goede wrote:
> Hi,
> 
> On 18-07-18 23:20, Pierre-Louis Bossart wrote:
>>
>>
>> On 07/18/2018 03:55 PM, Hans de Goede wrote:
>>> During the recent cleanup series 3 of the 6 input mappings where removed
>>> from the bytcr_rt5651 machine driver because testing showed that none of
>>> them were used.
>>>
>>> However some devices do actually have their internal mic on IN2 (and
>>> only IN2, not IN1 and IN2), this did not show during previous tests
>>> due to a bug in the userspace UCM input device switching code.
>>>
>>> This commit re-adds the IN2 mapping for devices with the internal mic.
>>> on IN2 and the headser mic on IN3 and enables this mapping on devices
>>> with their internal mic on IN2.
>> I am getting dizzy :-)
>> is the conclusion that hs==IN3 (no change) and int-mic==(DMIC, IN1, 
>> IN2, IN12)
> 
> Yes that is the conclusion. Sorry about this, as said my previous
> testing was wrong because of an userspace bug (which I still need to
> track down).
> 
>  > and the UCM names only use the latter for differentiation of profiles?
> 
> Correct. This pretty much fully aligns the rt5651 code with the rt5640 code
> wrt long-names.

Sounds good, the patches look ok to me. Thanks for all the work you've 
been doing on this platform.
All the bytcr_rt5651 changes

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



> 
> Regards,
> 
> Hans
> 
> 
>>
>>>
>>> This commit also changes the default internal mic input to IN2, because
>>> all my 7 test devices have their mic there.
>>>
>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>> ---
>>> Note I have put getting to the bottom of the UCM input device switching
>>> code and fixing it on my TODO list
>>> ---
>>>   sound/soc/intel/boards/bytcr_rt5651.c | 23 ++++++++++++++++++-----
>>>   1 file changed, 18 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c 
>>> b/sound/soc/intel/boards/bytcr_rt5651.c
>>> index 53ac97c15fc6..d85530b1cc8e 100644
>>> --- a/sound/soc/intel/boards/bytcr_rt5651.c
>>> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
>>> @@ -44,6 +44,7 @@
>>>   enum {
>>>       BYT_RT5651_DMIC_MAP,
>>>       BYT_RT5651_IN1_MAP,
>>> +    BYT_RT5651_IN2_MAP,
>>>       BYT_RT5651_IN1_IN2_MAP,
>>>   };
>>> @@ -93,9 +94,9 @@ struct byt_rt5651_private {
>>>       struct snd_soc_jack jack;
>>>   };
>>> -/* Default: jack-detect on JD1_1, internal mic on in1, headsetmic on 
>>> in3 */
>>> +/* Default: jack-detect on JD1_1, internal mic on in2, headsetmic on 
>>> in3 */
>>>   static unsigned long byt_rt5651_quirk = BYT_RT5651_DEFAULT_QUIRKS |
>>> -                    BYT_RT5651_IN1_MAP;
>>> +                    BYT_RT5651_IN2_MAP;
>>>   static void log_quirks(struct device *dev)
>>>   {
>>> @@ -103,6 +104,8 @@ static void log_quirks(struct device *dev)
>>>           dev_info(dev, "quirk DMIC_MAP enabled");
>>>       if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP)
>>>           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)
>>>           dev_info(dev, "quirk IN1_IN2_MAP enabled");
>>>       if (BYT_RT5651_JDSRC(byt_rt5651_quirk)) {
>>> @@ -270,6 +273,12 @@ static const struct snd_soc_dapm_route 
>>> byt_rt5651_intmic_in1_map[] = {
>>>       {"IN3P", NULL, "Headset Mic"},
>>>   };
>>> +static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
>>> +    {"Internal Mic", NULL, "micbias1"},
>>> +    {"IN2P", NULL, "Internal Mic"},
>>> +    {"IN3P", NULL, "Headset Mic"},
>>> +};
>>> +
>>>   static const struct snd_soc_dapm_route 
>>> byt_rt5651_intmic_in1_in2_map[] = {
>>>       {"Internal Mic", NULL, "micbias1"},
>>>       {"IN1P", NULL, "Internal Mic"},
>>> @@ -364,7 +373,7 @@ static const struct dmi_system_id 
>>> byt_rt5651_quirk_table[] = {
>>>               DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
>>>           },
>>>           .driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
>>> -                    BYT_RT5651_IN1_MAP |
>>> +                    BYT_RT5651_IN2_MAP |
>>>                       BYT_RT5651_HP_LR_SWAPPED),
>>>       },
>>>       {
>>> @@ -375,7 +384,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_MAP |
>>> +                    BYT_RT5651_IN2_MAP |
>>>                       BYT_RT5651_HP_LR_SWAPPED),
>>>       },
>>>       {
>>> @@ -468,6 +477,10 @@ static int byt_rt5651_init(struct 
>>> snd_soc_pcm_runtime *runtime)
>>>           custom_map = byt_rt5651_intmic_in1_map;
>>>           num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_map);
>>>           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:
>>>           custom_map = byt_rt5651_intmic_in1_in2_map;
>>>           num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_in2_map);
>>> @@ -825,7 +838,7 @@ 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 mic_name[] = { "dmic", "in1", "in12" };
>>> +    const char * const mic_name[] = { "dmic", "in1", "in2", "in12" };
>>>       struct byt_rt5651_private *priv;
>>>       struct snd_soc_acpi_mach *mach;
>>>       struct device *codec_dev;
>>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control
  2018-07-18 20:55 ` [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control Hans de Goede
@ 2018-07-19 15:02   ` Mark Brown
  2018-07-20  1:31     ` Bard Liao
  2018-07-19 16:57   ` Applied "ASoC: rt5651: Add IN3 Boost volume control" to the asoc tree Mark Brown
  1 sibling, 1 reply; 24+ messages in thread
From: Mark Brown @ 2018-07-19 15:02 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Oder Chiou, alsa-devel, Pierre-Louis Bossart, Liam Girdwood,
	Carlo Caione, Bard Liao


[-- Attachment #1.1: Type: text/plain, Size: 455 bytes --]

On Wed, Jul 18, 2018 at 10:55:37PM +0200, Hans de Goede wrote:

> +	/* IN1/IN2/IN3 Control */
>  	SOC_SINGLE_TLV("IN1 Boost", RT5651_IN1_IN2,
>  		RT5651_BST_SFT1, 8, 0, bst_tlv),
>  	SOC_SINGLE_TLV("IN2 Boost", RT5651_IN1_IN2,
>  		RT5651_BST_SFT2, 8, 0, bst_tlv),
> +	SOC_SINGLE_TLV("IN3 Boost", RT5651_IN3,
> +		RT5651_BST_SFT1, 8, 0, bst_tlv),

These should all have Volume added to the name however that's a
preexisting bug so not a blocker on this.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Applied "ASoC: Intel: bytcr_rt5651: Add quirk table entries for various devices" to the asoc tree
  2018-07-18 20:55 ` [PATCH 6/6] ASoC: Intel: bytcr_rt5651: Add quirk table entries for various devices Hans de Goede
@ 2018-07-19 16:56   ` Mark Brown
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2018-07-19 16:56 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Oder Chiou, alsa-devel, Pierre-Louis Bossart, Liam Girdwood,
	Mark Brown, Carlo Caione, Bard Liao

The patch

   ASoC: Intel: bytcr_rt5651: Add quirk table entries for various devices

has been applied to the asoc tree at

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

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

>From 06aa6e51273c9ac458af0bb9be95603cfbad14ec Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 18 Jul 2018 22:55:42 +0200
Subject: [PATCH] ASoC: Intel: bytcr_rt5651: Add quirk table entries for
 various devices

Add quirk table entries for the following tablets:

ITWorks TW701
Ployer Momo7w
Trekstor win7
Yours 8"

These all use the default settings, except that they only have a single
speaker and thus need the mono-speaker quirk.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 28 +++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 8374e633796d..f8a68bdb3885 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -392,6 +392,21 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 					BYT_RT5651_HP_LR_SWAPPED |
 					BYT_RT5651_MONO_SPEAKER),
 	},
+	{
+		/* I.T.Works TW701, Ployer Momo7w and Trekstor ST70416-6
+		 * (these all use the same mainboard) */
+		.callback = byt_rt5651_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "INSYDE Corp."),
+			/* Partial match for all of itWORKS.G.WI71C.JGBMRBA,
+			 * TREK.G.WI71C.JGBMRBA0x and MOMO.G.WI71C.MABMRBA02 */
+			DMI_MATCH(DMI_BIOS_VERSION, ".G.WI71C."),
+		},
+		.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
+					BYT_RT5651_IN2_MAP |
+					BYT_RT5651_SSP0_AIF1 |
+					BYT_RT5651_MONO_SPEAKER),
+	},
 	{
 		/* KIANO SlimNote 14.2 */
 		.callback = byt_rt5651_quirk_cb,
@@ -434,6 +449,19 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 					BYT_RT5651_OVCD_SF_1P0 |
 					BYT_RT5651_MCLK_EN),
 	},
+	{
+		/* Yours Y8W81 (and others using the same mainboard) */
+		.callback = byt_rt5651_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "INSYDE Corp."),
+			/* Partial match for all devs with a W86C mainboard */
+			DMI_MATCH(DMI_BIOS_VERSION, ".F.W86C."),
+		},
+		.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
+					BYT_RT5651_IN2_MAP |
+					BYT_RT5651_SSP0_AIF1 |
+					BYT_RT5651_MONO_SPEAKER),
+	},
 	{}
 };
 
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Applied "ASoC: Intel: bytcr_rt5651: Add mono speaker quirk" to the asoc tree
  2018-07-18 20:55 ` [PATCH 5/6] ASoC: Intel: bytcr_rt5651: Add mono speaker quirk Hans de Goede
@ 2018-07-19 16:56   ` Mark Brown
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2018-07-19 16:56 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Oder Chiou, alsa-devel, Pierre-Louis Bossart, Liam Girdwood,
	Mark Brown, Carlo Caione, Bard Liao

The patch

   ASoC: Intel: bytcr_rt5651: Add mono speaker quirk

has been applied to the asoc tree at

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

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

>From a0d1d867c262f4ad5d8e4925e2212711ebdbf2b7 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 18 Jul 2018 22:55:41 +0200
Subject: [PATCH] ASoC: Intel: bytcr_rt5651: Add mono speaker quirk

During my initial round of bytcr_rt5651 long-name patches I did not include
a difference for mono vs stereo speaker setups in the longname because it
seems that all 5651 devices with only a single speaker do some mixing of
left + right on the PCB.

However further testing has shown that while this works great when only
playing audio on the left or right channel, the output becomes garbled
when using both channels at once. Something which does not happen when
using the Stereo DAC MIXL / MIXR switches to mix the channels together
inside the codec and then only outputting on a single channel.

So we need to have separate UCM profiles and thus separate long-names
for devices with a mono speaker vs stereo speakers. Just as we already
have for the bytcr_rt5640 case.

This commit adds a new BYT_RT5651_MONO_SPEAKER quirk and adds "stereo-spk"
or "mono-spk" to the long-name based on this and enables this mapping on
devices with a mono speaker.

Changing the long-name like this is ok for now, since I'm still working
on the UCM profiles, so they are not in upstream alsa-lib yet.

This brings the long-name naming scheme fully in sync with the bytcr_rt5640
case, which is good from a consistency pov.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index d85530b1cc8e..8374e633796d 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -79,6 +79,7 @@ enum {
 #define BYT_RT5651_SSP0_AIF1		BIT(20)
 #define BYT_RT5651_SSP0_AIF2		BIT(21)
 #define BYT_RT5651_HP_LR_SWAPPED	BIT(22)
+#define BYT_RT5651_MONO_SPEAKER		BIT(23)
 
 #define BYT_RT5651_DEFAULT_QUIRKS	(BYT_RT5651_MCLK_EN | \
 					 BYT_RT5651_JD1_1   | \
@@ -128,6 +129,8 @@ static void log_quirks(struct device *dev)
 		dev_info(dev, "quirk SSP0_AIF1 enabled\n");
 	if (byt_rt5651_quirk & BYT_RT5651_SSP0_AIF2)
 		dev_info(dev, "quirk SSP0_AIF2 enabled\n");
+	if (byt_rt5651_quirk & BYT_RT5651_MONO_SPEAKER)
+		dev_info(dev, "quirk MONO_SPEAKER enabled\n");
 }
 
 #define BYT_CODEC_DAI1	"rt5651-aif1"
@@ -374,7 +377,8 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 		},
 		.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
 					BYT_RT5651_IN2_MAP |
-					BYT_RT5651_HP_LR_SWAPPED),
+					BYT_RT5651_HP_LR_SWAPPED |
+					BYT_RT5651_MONO_SPEAKER),
 	},
 	{
 		/* Chuwi Vi8 Plus (CWI519) */
@@ -385,7 +389,8 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 		},
 		.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
 					BYT_RT5651_IN2_MAP |
-					BYT_RT5651_HP_LR_SWAPPED),
+					BYT_RT5651_HP_LR_SWAPPED |
+					BYT_RT5651_MONO_SPEAKER),
 	},
 	{
 		/* KIANO SlimNote 14.2 */
@@ -700,7 +705,7 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = {
 static char byt_rt5651_codec_name[SND_ACPI_I2C_ID_LEN];
 static char byt_rt5651_codec_aif_name[12]; /*  = "rt5651-aif[1|2]" */
 static char byt_rt5651_cpu_dai_name[10]; /*  = "ssp[0|2]-port" */
-static char byt_rt5651_long_name[40]; /* = "bytcr-rt5651-*-mic[-swapped-hp]" */
+static char byt_rt5651_long_name[50]; /* = "bytcr-rt5651-*-spk-*-mic[-swapped-hp]" */
 
 static int byt_rt5651_suspend(struct snd_soc_card *card)
 {
@@ -1025,7 +1030,9 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 		hp_swapped = "";
 
 	snprintf(byt_rt5651_long_name, sizeof(byt_rt5651_long_name),
-		 "bytcr-rt5651-%s-mic%s",
+		 "bytcr-rt5651-%s-spk-%s-mic%s",
+		 (byt_rt5651_quirk & BYT_RT5651_MONO_SPEAKER) ?
+			"mono" : "stereo",
 		 mic_name[BYT_RT5651_MAP(byt_rt5651_quirk)], hp_swapped);
 	byt_rt5651_card.long_name = byt_rt5651_long_name;
 
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Applied "ASoC: Intel: bytcr_rt5651: Add IN2 input mapping" to the asoc tree
  2018-07-18 20:55 ` [PATCH 4/6] ASoC: Intel: bytcr_rt5651: Add IN2 input mapping Hans de Goede
  2018-07-18 21:20   ` Pierre-Louis Bossart
@ 2018-07-19 16:57   ` Mark Brown
  1 sibling, 0 replies; 24+ messages in thread
From: Mark Brown @ 2018-07-19 16:57 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Oder Chiou, alsa-devel, Pierre-Louis Bossart, Liam Girdwood,
	Mark Brown, Carlo Caione, Bard Liao

The patch

   ASoC: Intel: bytcr_rt5651: Add IN2 input mapping

has been applied to the asoc tree at

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

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

>From ac275ee5aa67abe9b65d66071ee333c6b0905b93 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 18 Jul 2018 22:55:40 +0200
Subject: [PATCH] ASoC: Intel: bytcr_rt5651: Add IN2 input mapping

During the recent cleanup series 3 of the 6 input mappings where removed
from the bytcr_rt5651 machine driver because testing showed that none of
them were used.

However some devices do actually have their internal mic on IN2 (and
only IN2, not IN1 and IN2), this did not show during previous tests
due to a bug in the userspace UCM input device switching code.

This commit re-adds the IN2 mapping for devices with the internal mic.
on IN2 and the headser mic on IN3 and enables this mapping on devices
with their internal mic on IN2.

This commit also changes the default internal mic input to IN2, because
all my 7 test devices have their mic there.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 53ac97c15fc6..d85530b1cc8e 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -44,6 +44,7 @@
 enum {
 	BYT_RT5651_DMIC_MAP,
 	BYT_RT5651_IN1_MAP,
+	BYT_RT5651_IN2_MAP,
 	BYT_RT5651_IN1_IN2_MAP,
 };
 
@@ -93,9 +94,9 @@ struct byt_rt5651_private {
 	struct snd_soc_jack jack;
 };
 
-/* Default: jack-detect on JD1_1, internal mic on in1, headsetmic on in3 */
+/* Default: jack-detect on JD1_1, internal mic on in2, headsetmic on in3 */
 static unsigned long byt_rt5651_quirk = BYT_RT5651_DEFAULT_QUIRKS |
-					BYT_RT5651_IN1_MAP;
+					BYT_RT5651_IN2_MAP;
 
 static void log_quirks(struct device *dev)
 {
@@ -103,6 +104,8 @@ static void log_quirks(struct device *dev)
 		dev_info(dev, "quirk DMIC_MAP enabled");
 	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP)
 		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)
 		dev_info(dev, "quirk IN1_IN2_MAP enabled");
 	if (BYT_RT5651_JDSRC(byt_rt5651_quirk)) {
@@ -270,6 +273,12 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = {
 	{"IN3P", NULL, "Headset Mic"},
 };
 
+static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
+	{"Internal Mic", NULL, "micbias1"},
+	{"IN2P", NULL, "Internal Mic"},
+	{"IN3P", NULL, "Headset Mic"},
+};
+
 static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_in2_map[] = {
 	{"Internal Mic", NULL, "micbias1"},
 	{"IN1P", NULL, "Internal Mic"},
@@ -364,7 +373,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
 		},
 		.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
-					BYT_RT5651_IN1_MAP |
+					BYT_RT5651_IN2_MAP |
 					BYT_RT5651_HP_LR_SWAPPED),
 	},
 	{
@@ -375,7 +384,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_MAP |
+					BYT_RT5651_IN2_MAP |
 					BYT_RT5651_HP_LR_SWAPPED),
 	},
 	{
@@ -468,6 +477,10 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
 		custom_map = byt_rt5651_intmic_in1_map;
 		num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_map);
 		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:
 		custom_map = byt_rt5651_intmic_in1_in2_map;
 		num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_in2_map);
@@ -825,7 +838,7 @@ 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 mic_name[] = { "dmic", "in1", "in12" };
+	const char * const mic_name[] = { "dmic", "in1", "in2", "in12" };
 	struct byt_rt5651_private *priv;
 	struct snd_soc_acpi_mach *mach;
 	struct device *codec_dev;
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Applied "ASoC: Intel: bytcr_rt5651: Set OVCD limit for VIOS LTH17 to 2000uA" to the asoc tree
  2018-07-18 20:55 ` [PATCH 3/6] ASoC: Intel: bytcr_rt5651: Set OVCD limit for VIOS LTH17 to 2000uA Hans de Goede
@ 2018-07-19 16:57   ` Mark Brown
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2018-07-19 16:57 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Oder Chiou, alsa-devel, Pierre-Louis Bossart, Liam Girdwood,
	Mark Brown, Carlo Caione, Bard Liao

The patch

   ASoC: Intel: bytcr_rt5651: Set OVCD limit for VIOS LTH17 to 2000uA

has been applied to the asoc tree at

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

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

>From 8627fb257e1673d2c2277494545642921097da86 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 18 Jul 2018 22:55:39 +0200
Subject: [PATCH] ASoC: Intel: bytcr_rt5651: Set OVCD limit for VIOS LTH17 to
 2000uA

With the default over current detect limit of 1500uA headsets on often
get detected as headphones on the VIOS LTH17 and even when detected as
headset the OVCD current triggers often while plugged in, resulting in
false-positive button press detection.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 601e47c33ba8..53ac97c15fc6 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -414,8 +414,11 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 			DMI_MATCH(DMI_SYS_VENDOR, "VIOS"),
 			DMI_MATCH(DMI_PRODUCT_NAME, "LTH17"),
 		},
-		.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
-					BYT_RT5651_IN1_IN2_MAP),
+		.driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP |
+					BYT_RT5651_JD1_1 |
+					BYT_RT5651_OVCD_TH_2000UA |
+					BYT_RT5651_OVCD_SF_1P0 |
+					BYT_RT5651_MCLK_EN),
 	},
 	{}
 };
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Applied "ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some boards" to the asoc tree
  2018-07-18 20:55 ` [PATCH 2/6] ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some boards Hans de Goede
@ 2018-07-19 16:57   ` Mark Brown
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2018-07-19 16:57 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Oder Chiou, alsa-devel, Pierre-Louis Bossart, Liam Girdwood,
	Mark Brown, Carlo Caione, Bard Liao

The patch

   ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some boards

has been applied to the asoc tree at

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

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

>From 0a3badd141f78535315cca9ff5062a7ebf414281 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 18 Jul 2018 22:55:38 +0200
Subject: [PATCH] ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the
 ext-amp on some boards

Some boards have I2cSerialBusV2, GpioIo, GpioInt as ACPI resources, other
boards may  have I2cSerialBusV2, GpioInt, GpioIo instead. We want the
GpioIo one for the ext-amp-enable-gpio.

So far we've been assuming that the GpioIo one always comes first, this
commit adds code to detect which one comes first and to add the right
gpio-mapping.

This fixes sound not working on the Vios LTH17 laptop.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 69 +++++++++++++++++++++++++--
 1 file changed, 65 insertions(+), 4 deletions(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index b687043c8425..601e47c33ba8 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -747,13 +747,74 @@ static const struct x86_cpu_id cherrytrail_cpu_ids[] = {
 	{}
 };
 
-static const struct acpi_gpio_params ext_amp_enable_gpios = { 0, 0, false };
+static const struct acpi_gpio_params first_gpio = { 0, 0, false };
+static const struct acpi_gpio_params second_gpio = { 1, 0, false };
 
-static const struct acpi_gpio_mapping byt_rt5651_gpios[] = {
-	{ "ext-amp-enable-gpios", &ext_amp_enable_gpios, 1 },
+static const struct acpi_gpio_mapping byt_rt5651_amp_en_first[] = {
+	{ "ext-amp-enable-gpios", &first_gpio, 1 },
 	{ },
 };
 
+static const struct acpi_gpio_mapping byt_rt5651_amp_en_second[] = {
+	{ "ext-amp-enable-gpios", &second_gpio, 1 },
+	{ },
+};
+
+/*
+ * Some boards have I2cSerialBusV2, GpioIo, GpioInt as ACPI resources, other
+ * boards may  have I2cSerialBusV2, GpioInt, GpioIo instead. We want the
+ * GpioIo one for the ext-amp-enable-gpio and both count for the index in
+ * acpi_gpio_params index.  So we have 2 different mappings and the code
+ * below figures out which one to use.
+ */
+struct byt_rt5651_acpi_resource_data {
+	int gpio_count;
+	int gpio_int_idx;
+};
+
+static int snd_byt_rt5651_acpi_resource(struct acpi_resource *ares, void *arg)
+{
+	struct byt_rt5651_acpi_resource_data *data = arg;
+
+	if (ares->type != ACPI_RESOURCE_TYPE_GPIO)
+		return 0;
+
+	if (ares->data.gpio.connection_type == ACPI_RESOURCE_GPIO_TYPE_INT)
+		data->gpio_int_idx = data->gpio_count;
+
+	data->gpio_count++;
+	return 0;
+}
+
+static void snd_byt_rt5651_mc_add_amp_en_gpio_mapping(struct device *codec)
+{
+	struct byt_rt5651_acpi_resource_data data = { 0, -1 };
+	LIST_HEAD(resources);
+	int ret;
+
+	ret = acpi_dev_get_resources(ACPI_COMPANION(codec), &resources,
+				     snd_byt_rt5651_acpi_resource, &data);
+	if (ret < 0) {
+		dev_warn(codec, "Failed to get ACPI resources, not adding external amplifier GPIO mapping\n");
+		return;
+	}
+
+	/* All info we need is gathered during the walk */
+	acpi_dev_free_resource_list(&resources);
+
+	switch (data.gpio_int_idx) {
+	case 0:
+		devm_acpi_dev_add_driver_gpios(codec, byt_rt5651_amp_en_second);
+		break;
+	case 1:
+		devm_acpi_dev_add_driver_gpios(codec, byt_rt5651_amp_en_first);
+		break;
+	default:
+		dev_warn(codec, "Unknown GpioInt index %d, not adding external amplifier GPIO mapping\n",
+			 data.gpio_int_idx);
+	}
+}
+
 struct acpi_chan_package {   /* ACPICA seems to require 64 bit integers */
 	u64 aif_value;       /* 1: AIF1, 2: AIF2 */
 	u64 mclock_value;    /* usually 25MHz (0x17d7940), ignored */
@@ -876,7 +937,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 
 	/* Cherry Trail devices use an external amplifier enable gpio */
 	if (x86_match_cpu(cherrytrail_cpu_ids)) {
-		devm_acpi_dev_add_driver_gpios(codec_dev, byt_rt5651_gpios);
+		snd_byt_rt5651_mc_add_amp_en_gpio_mapping(codec_dev);
 		priv->ext_amp_gpio = devm_fwnode_get_index_gpiod_from_child(
 						&pdev->dev, "ext-amp-enable", 0,
 						codec_dev->fwnode,
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Applied "ASoC: rt5651: Add IN3 Boost volume control" to the asoc tree
  2018-07-18 20:55 ` [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control Hans de Goede
  2018-07-19 15:02   ` Mark Brown
@ 2018-07-19 16:57   ` Mark Brown
  1 sibling, 0 replies; 24+ messages in thread
From: Mark Brown @ 2018-07-19 16:57 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Oder Chiou, alsa-devel, Pierre-Louis Bossart, Liam Girdwood,
	Mark Brown, Carlo Caione, Bard Liao

The patch

   ASoC: rt5651: Add IN3 Boost volume control

has been applied to the asoc tree at

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

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

>From eea1662525bd4a158a67ac836b2a1fd9cf77cc81 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 18 Jul 2018 22:55:37 +0200
Subject: [PATCH] ASoC: rt5651: Add IN3 Boost volume control

Add a mixer control for the IN3 Boost volume, IN3 is used for the headset
mic on most devices, so this is necessary to control the headset mic
volume.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/rt5651.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c
index 0462049e739c..985852fd9723 100644
--- a/sound/soc/codecs/rt5651.c
+++ b/sound/soc/codecs/rt5651.c
@@ -331,11 +331,13 @@ static const struct snd_kcontrol_new rt5651_snd_controls[] = {
 	SOC_DOUBLE_TLV("Mono DAC Playback Volume", RT5651_DAC2_DIG_VOL,
 			RT5651_L_VOL_SFT, RT5651_R_VOL_SFT,
 			175, 0, dac_vol_tlv),
-	/* IN1/IN2 Control */
+	/* IN1/IN2/IN3 Control */
 	SOC_SINGLE_TLV("IN1 Boost", RT5651_IN1_IN2,
 		RT5651_BST_SFT1, 8, 0, bst_tlv),
 	SOC_SINGLE_TLV("IN2 Boost", RT5651_IN1_IN2,
 		RT5651_BST_SFT2, 8, 0, bst_tlv),
+	SOC_SINGLE_TLV("IN3 Boost", RT5651_IN3,
+		RT5651_BST_SFT1, 8, 0, bst_tlv),
 	/* INL/INR Volume Control */
 	SOC_DOUBLE_TLV("IN Capture Volume", RT5651_INL1_INR1_VOL,
 			RT5651_INL_VOL_SFT, RT5651_INR_VOL_SFT,
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control
  2018-07-19 15:02   ` Mark Brown
@ 2018-07-20  1:31     ` Bard Liao
  2018-07-20  1:40       ` Pierre-Louis Bossart
  0 siblings, 1 reply; 24+ messages in thread
From: Bard Liao @ 2018-07-20  1:31 UTC (permalink / raw)
  To: Mark Brown, Hans de Goede
  Cc: Liam Girdwood, Oder Chiou, alsa-devel, Pierre-Louis Bossart,
	Carlo Caione

> -----Original Message-----
> From: Mark Brown [mailto:broonie@kernel.org]
> Sent: Thursday, July 19, 2018 11:03 PM
> To: Hans de Goede
> Cc: Liam Girdwood; Bard Liao; Oder Chiou; Pierre-Louis Bossart; Carlo Caione;
> alsa-devel@alsa-project.org
> Subject: Re: [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control
> 
> On Wed, Jul 18, 2018 at 10:55:37PM +0200, Hans de Goede wrote:
> 
> > +	/* IN1/IN2/IN3 Control */
> >  	SOC_SINGLE_TLV("IN1 Boost", RT5651_IN1_IN2,
> >  		RT5651_BST_SFT1, 8, 0, bst_tlv),
> >  	SOC_SINGLE_TLV("IN2 Boost", RT5651_IN1_IN2,
> >  		RT5651_BST_SFT2, 8, 0, bst_tlv),
> > +	SOC_SINGLE_TLV("IN3 Boost", RT5651_IN3,
> > +		RT5651_BST_SFT1, 8, 0, bst_tlv),
> 
> These should all have Volume added to the name however that's a
> preexisting bug so not a blocker on this.

I will add "Volume" to the name for all of them.

> 
> ------Please consider the environment before printing this e-mail.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control
  2018-07-20  1:31     ` Bard Liao
@ 2018-07-20  1:40       ` Pierre-Louis Bossart
  2018-07-20  2:53         ` Bard Liao
  0 siblings, 1 reply; 24+ messages in thread
From: Pierre-Louis Bossart @ 2018-07-20  1:40 UTC (permalink / raw)
  To: Bard Liao, Mark Brown, Hans de Goede
  Cc: Liam Girdwood, Oder Chiou, alsa-devel, Carlo Caione



On 07/19/2018 08:31 PM, Bard Liao wrote:
>> -----Original Message-----
>> From: Mark Brown [mailto:broonie@kernel.org]
>> Sent: Thursday, July 19, 2018 11:03 PM
>> To: Hans de Goede
>> Cc: Liam Girdwood; Bard Liao; Oder Chiou; Pierre-Louis Bossart; Carlo Caione;
>> alsa-devel@alsa-project.org
>> Subject: Re: [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control
>>
>> On Wed, Jul 18, 2018 at 10:55:37PM +0200, Hans de Goede wrote:
>>
>>> +	/* IN1/IN2/IN3 Control */
>>>   	SOC_SINGLE_TLV("IN1 Boost", RT5651_IN1_IN2,
>>>   		RT5651_BST_SFT1, 8, 0, bst_tlv),
>>>   	SOC_SINGLE_TLV("IN2 Boost", RT5651_IN1_IN2,
>>>   		RT5651_BST_SFT2, 8, 0, bst_tlv),
>>> +	SOC_SINGLE_TLV("IN3 Boost", RT5651_IN3,
>>> +		RT5651_BST_SFT1, 8, 0, bst_tlv),
>> These should all have Volume added to the name however that's a
>> preexisting bug so not a blocker on this.
> I will add "Volume" to the name for all of them.
isn't this going to break userspace configs if we change the name of 
controls?

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control
  2018-07-20  1:40       ` Pierre-Louis Bossart
@ 2018-07-20  2:53         ` Bard Liao
  2018-07-27 12:01           ` Hans de Goede
  0 siblings, 1 reply; 24+ messages in thread
From: Bard Liao @ 2018-07-20  2:53 UTC (permalink / raw)
  To: Pierre-Louis Bossart, Mark Brown, Hans de Goede
  Cc: Liam Girdwood, Oder Chiou, alsa-devel, Carlo Caione

> -----Original Message-----
> From: Pierre-Louis Bossart [mailto:pierre-louis.bossart@linux.intel.com]
> Sent: Friday, July 20, 2018 9:40 AM
> To: Bard Liao; Mark Brown; Hans de Goede
> Cc: Liam Girdwood; Oder Chiou; alsa-devel@alsa-project.org; Carlo Caione
> Subject: Re: [alsa-devel] [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume
> control
> 
> On 07/19/2018 08:31 PM, Bard Liao wrote:
> >> -----Original Message-----
> >> From: Mark Brown [mailto:broonie@kernel.org]
> >> Sent: Thursday, July 19, 2018 11:03 PM
> >> To: Hans de Goede
> >> Cc: Liam Girdwood; Bard Liao; Oder Chiou; Pierre-Louis Bossart; Carlo
> Caione;
> >> alsa-devel@alsa-project.org
> >> Subject: Re: [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control
> >>
> >> On Wed, Jul 18, 2018 at 10:55:37PM +0200, Hans de Goede wrote:
> >>
> >>> +	/* IN1/IN2/IN3 Control */
> >>>   	SOC_SINGLE_TLV("IN1 Boost", RT5651_IN1_IN2,
> >>>   		RT5651_BST_SFT1, 8, 0, bst_tlv),
> >>>   	SOC_SINGLE_TLV("IN2 Boost", RT5651_IN1_IN2,
> >>>   		RT5651_BST_SFT2, 8, 0, bst_tlv),
> >>> +	SOC_SINGLE_TLV("IN3 Boost", RT5651_IN3,
> >>> +		RT5651_BST_SFT1, 8, 0, bst_tlv),
> >> These should all have Volume added to the name however that's a
> >> preexisting bug so not a blocker on this.
> > I will add "Volume" to the name for all of them.
> isn't this going to break userspace configs if we change the name of
> controls?

Yes, it should be modified, too.

> 
> ------Please consider the environment before printing this e-mail.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control
  2018-07-20  2:53         ` Bard Liao
@ 2018-07-27 12:01           ` Hans de Goede
  2018-07-30  1:58             ` Bard Liao
  2018-07-30  8:28             ` Mark Brown
  0 siblings, 2 replies; 24+ messages in thread
From: Hans de Goede @ 2018-07-27 12:01 UTC (permalink / raw)
  To: Bard Liao, Pierre-Louis Bossart, Mark Brown
  Cc: Liam Girdwood, Oder Chiou, alsa-devel, Carlo Caione

Hi,

On 07/20/2018 04:53 AM, Bard Liao wrote:
>> -----Original Message-----
>> From: Pierre-Louis Bossart [mailto:pierre-louis.bossart@linux.intel.com]
>> Sent: Friday, July 20, 2018 9:40 AM
>> To: Bard Liao; Mark Brown; Hans de Goede
>> Cc: Liam Girdwood; Oder Chiou; alsa-devel@alsa-project.org; Carlo Caione
>> Subject: Re: [alsa-devel] [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume
>> control
>>
>> On 07/19/2018 08:31 PM, Bard Liao wrote:
>>>> -----Original Message-----
>>>> From: Mark Brown [mailto:broonie@kernel.org]
>>>> Sent: Thursday, July 19, 2018 11:03 PM
>>>> To: Hans de Goede
>>>> Cc: Liam Girdwood; Bard Liao; Oder Chiou; Pierre-Louis Bossart; Carlo
>> Caione;
>>>> alsa-devel@alsa-project.org
>>>> Subject: Re: [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control
>>>>
>>>> On Wed, Jul 18, 2018 at 10:55:37PM +0200, Hans de Goede wrote:
>>>>
>>>>> +	/* IN1/IN2/IN3 Control */
>>>>>    	SOC_SINGLE_TLV("IN1 Boost", RT5651_IN1_IN2,
>>>>>    		RT5651_BST_SFT1, 8, 0, bst_tlv),
>>>>>    	SOC_SINGLE_TLV("IN2 Boost", RT5651_IN1_IN2,
>>>>>    		RT5651_BST_SFT2, 8, 0, bst_tlv),
>>>>> +	SOC_SINGLE_TLV("IN3 Boost", RT5651_IN3,
>>>>> +		RT5651_BST_SFT1, 8, 0, bst_tlv),
>>>> These should all have Volume added to the name however that's a
>>>> preexisting bug so not a blocker on this.
>>> I will add "Volume" to the name for all of them.
>> isn't this going to break userspace configs if we change the name of
>> controls?
> 
> Yes, it should be modified, too.

Or we just live with the  "Volume" part missing for these 3 and don't
break users existing setup for no good reason.

Regards,

Hans

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control
  2018-07-27 12:01           ` Hans de Goede
@ 2018-07-30  1:58             ` Bard Liao
  2018-07-30  8:28             ` Mark Brown
  1 sibling, 0 replies; 24+ messages in thread
From: Bard Liao @ 2018-07-30  1:58 UTC (permalink / raw)
  To: Hans de Goede, Pierre-Louis Bossart, Mark Brown
  Cc: Liam Girdwood, Oder Chiou, alsa-devel, Carlo Caione

> -----Original Message-----
> From: Hans de Goede [mailto:hdegoede@redhat.com]
> Sent: Friday, July 27, 2018 8:02 PM
> To: Bard Liao; Pierre-Louis Bossart; Mark Brown
> Cc: Liam Girdwood; Oder Chiou; alsa-devel@alsa-project.org; Carlo Caione
> Subject: Re: [alsa-devel] [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume
> control
> 
> >> isn't this going to break userspace configs if we change the name of
> >> controls?
> >
> > Yes, it should be modified, too.
> 
> Or we just live with the  "Volume" part missing for these 3 and don't
> break users existing setup for no good reason.

Agree.

> 
> Regards,
> 
> Hans
> 
> ------Please consider the environment before printing this e-mail.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control
  2018-07-27 12:01           ` Hans de Goede
  2018-07-30  1:58             ` Bard Liao
@ 2018-07-30  8:28             ` Mark Brown
  1 sibling, 0 replies; 24+ messages in thread
From: Mark Brown @ 2018-07-30  8:28 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Oder Chiou, alsa-devel, Pierre-Louis Bossart, Liam Girdwood,
	Carlo Caione, Bard Liao


[-- Attachment #1.1: Type: text/plain, Size: 298 bytes --]

On Fri, Jul 27, 2018 at 02:01:44PM +0200, Hans de Goede wrote:

> > Yes, it should be modified, too.

> Or we just live with the  "Volume" part missing for these 3 and don't
> break users existing setup for no good reason.

You're a few days behind the discussion on the patch series doing
this...

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/6] ASoC: rt5651: Various fixes and quirks
  2018-07-18 20:55 [PATCH 0/6] ASoC: rt5651: Various fixes and quirks Hans de Goede
                   ` (5 preceding siblings ...)
  2018-07-18 20:55 ` [PATCH 6/6] ASoC: Intel: bytcr_rt5651: Add quirk table entries for various devices Hans de Goede
@ 2018-12-24 14:15 ` Hans de Goede
  6 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2018-12-24 14:15 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Bard Liao, Oder Chiou
  Cc: Tanu Kaskinen, alsa-devel, Pierre-Louis Bossart, Carlo Caione

Hi all,

On 18-07-18 22:55, Hans de Goede wrote:
<snip>

> Note that unfortunately my previous round of cleanup patches removed
> 1 input mapping (of the 3 mappings in total it removed) which is
> actually necessary. So this series re-introduces that 1 mapping. I did
> not notice this before because UCM input profile switching does not work
> reliably for some reason, something which I still need to investigate.

While doing some bytcr_rt5651 work this weekend (the x86 ASoC work I
do is a spare time project for me) I hit this again, so this time
I've spend some time getting to the bottom of this. The cause is a
pulseaudio bug, where pulseaudio uses a strncmp without first
checking the lengths of the 2 strings match, causing it to see
selecting the "InternalMic-IN1" UCM device as selecting both the
"InternalMic-IN1" and the "InternalMic-IN12" device.

A pull-req fixing this is here:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/40

Regards,

Hans

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2018-12-24 14:15 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-18 20:55 [PATCH 0/6] ASoC: rt5651: Various fixes and quirks Hans de Goede
2018-07-18 20:55 ` [PATCH 1/6] ASoC: rt5651: Add IN3 Boost volume control Hans de Goede
2018-07-19 15:02   ` Mark Brown
2018-07-20  1:31     ` Bard Liao
2018-07-20  1:40       ` Pierre-Louis Bossart
2018-07-20  2:53         ` Bard Liao
2018-07-27 12:01           ` Hans de Goede
2018-07-30  1:58             ` Bard Liao
2018-07-30  8:28             ` Mark Brown
2018-07-19 16:57   ` Applied "ASoC: rt5651: Add IN3 Boost volume control" to the asoc tree Mark Brown
2018-07-18 20:55 ` [PATCH 2/6] ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some boards Hans de Goede
2018-07-19 16:57   ` Applied "ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some boards" to the asoc tree Mark Brown
2018-07-18 20:55 ` [PATCH 3/6] ASoC: Intel: bytcr_rt5651: Set OVCD limit for VIOS LTH17 to 2000uA Hans de Goede
2018-07-19 16:57   ` Applied "ASoC: Intel: bytcr_rt5651: Set OVCD limit for VIOS LTH17 to 2000uA" to the asoc tree Mark Brown
2018-07-18 20:55 ` [PATCH 4/6] ASoC: Intel: bytcr_rt5651: Add IN2 input mapping Hans de Goede
2018-07-18 21:20   ` Pierre-Louis Bossart
2018-07-19 11:37     ` Hans de Goede
2018-07-19 13:08       ` Pierre-Louis Bossart
2018-07-19 16:57   ` Applied "ASoC: Intel: bytcr_rt5651: Add IN2 input mapping" to the asoc tree Mark Brown
2018-07-18 20:55 ` [PATCH 5/6] ASoC: Intel: bytcr_rt5651: Add mono speaker quirk Hans de Goede
2018-07-19 16:56   ` Applied "ASoC: Intel: bytcr_rt5651: Add mono speaker quirk" to the asoc tree Mark Brown
2018-07-18 20:55 ` [PATCH 6/6] ASoC: Intel: bytcr_rt5651: Add quirk table entries for various devices Hans de Goede
2018-07-19 16:56   ` Applied "ASoC: Intel: bytcr_rt5651: Add quirk table entries for various devices" to the asoc tree Mark Brown
2018-12-24 14:15 ` [PATCH 0/6] ASoC: rt5651: Various fixes and quirks Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.