All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: Intel: byt-rt5640: Add quirk for Dell Venue 8 Pro tablet
@ 2014-10-02 10:29 Jarkko Nikula
  2014-10-02 10:29 ` [PATCH 2/2] ASoC: Intel: byt-rt5640: Set card as fully routed Jarkko Nikula
  2014-10-02 10:50 ` [PATCH 1/2] ASoC: Intel: byt-rt5640: Add quirk for Dell Venue 8 Pro tablet Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Jarkko Nikula @ 2014-10-02 10:29 UTC (permalink / raw)
  To: alsa-devel; +Cc: Jan-Michael Brummer, Mark Brown, Jarkko Nikula, Liam Girdwood

It was found with help of Jan-Michael Brummer <jan.brummer@tabos.org> that
Dell Venue 8 Pro tablet has a digital microphone connected to DMIC2
interface of the RT564x.

This patch adds a DAPM route to DMIC2 and a quirk using it for that tablet.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reported-by: Jan-Michael Brummer <jan.brummer@tabos.org>
---
Hi Jan. Could you give a second test to this patch? I noticed I had a few
lines missing from the version I sent you yesterday. If this still works
please reply with your Tested-by:.
Mark: I don't have this hw but Jan helped me to debug the right
configuration and sent the needed machine information for the DMI quirk.
---
 sound/soc/intel/byt-rt5640.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/sound/soc/intel/byt-rt5640.c b/sound/soc/intel/byt-rt5640.c
index 8392c160d9e2..a9619b4201f9 100644
--- a/sound/soc/intel/byt-rt5640.c
+++ b/sound/soc/intel/byt-rt5640.c
@@ -49,6 +49,10 @@ static const struct snd_soc_dapm_route byt_rt5640_intmic_dmic1_map[] = {
 	{"DMIC1", NULL, "Internal Mic"},
 };
 
+static const struct snd_soc_dapm_route byt_rt5640_intmic_dmic2_map[] = {
+	{"DMIC2", NULL, "Internal Mic"},
+};
+
 static const struct snd_soc_dapm_route byt_rt5640_intmic_in1_map[] = {
 	{"Internal Mic", NULL, "MICBIAS1"},
 	{"IN1P", NULL, "Internal Mic"},
@@ -56,6 +60,7 @@ static const struct snd_soc_dapm_route byt_rt5640_intmic_in1_map[] = {
 
 enum {
 	BYT_RT5640_DMIC1_MAP,
+	BYT_RT5640_DMIC2_MAP,
 	BYT_RT5640_IN1_MAP,
 };
 
@@ -111,6 +116,15 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
 		},
 		.driver_data = (unsigned long *)BYT_RT5640_IN1_MAP,
 	},
+	{
+		.callback = byt_rt5640_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "DellInc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Venue 8 Pro 5830"),
+		},
+		.driver_data = (unsigned long *)(BYT_RT5640_DMIC2_MAP |
+						 BYT_RT5640_DMIC_EN),
+	},
 	{}
 };
 
@@ -138,6 +152,10 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
 		custom_map = byt_rt5640_intmic_in1_map;
 		num_routes = ARRAY_SIZE(byt_rt5640_intmic_in1_map);
 		break;
+	case BYT_RT5640_DMIC2_MAP:
+		custom_map = byt_rt5640_intmic_dmic2_map;
+		num_routes = ARRAY_SIZE(byt_rt5640_intmic_dmic2_map);
+		break;
 	default:
 		custom_map = byt_rt5640_intmic_dmic1_map;
 		num_routes = ARRAY_SIZE(byt_rt5640_intmic_dmic1_map);
-- 
2.1.0

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

* [PATCH 2/2] ASoC: Intel: byt-rt5640: Set card as fully routed
  2014-10-02 10:29 [PATCH 1/2] ASoC: Intel: byt-rt5640: Add quirk for Dell Venue 8 Pro tablet Jarkko Nikula
@ 2014-10-02 10:29 ` Jarkko Nikula
  2014-10-02 10:50 ` [PATCH 1/2] ASoC: Intel: byt-rt5640: Add quirk for Dell Venue 8 Pro tablet Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Jarkko Nikula @ 2014-10-02 10:29 UTC (permalink / raw)
  To: alsa-devel; +Cc: Jan-Michael Brummer, Mark Brown, Jarkko Nikula, Liam Girdwood

Although it's not known does current version of byt-rt5640 cover all
possible variants it is better to set the fully_routed flag on in order to
disable unused codecs pins in known machines and get regression from
machines that use different routing than the default one.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
 sound/soc/intel/byt-rt5640.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/intel/byt-rt5640.c b/sound/soc/intel/byt-rt5640.c
index a9619b4201f9..88ad57fc58b2 100644
--- a/sound/soc/intel/byt-rt5640.c
+++ b/sound/soc/intel/byt-rt5640.c
@@ -209,6 +209,7 @@ static struct snd_soc_card byt_rt5640_card = {
 	.num_dapm_widgets = ARRAY_SIZE(byt_rt5640_widgets),
 	.dapm_routes = byt_rt5640_audio_map,
 	.num_dapm_routes = ARRAY_SIZE(byt_rt5640_audio_map),
+	.fully_routed = true,
 };
 
 static int byt_rt5640_probe(struct platform_device *pdev)
-- 
2.1.0

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

* Re: [PATCH 1/2] ASoC: Intel: byt-rt5640: Add quirk for Dell Venue 8 Pro tablet
  2014-10-02 10:29 [PATCH 1/2] ASoC: Intel: byt-rt5640: Add quirk for Dell Venue 8 Pro tablet Jarkko Nikula
  2014-10-02 10:29 ` [PATCH 2/2] ASoC: Intel: byt-rt5640: Set card as fully routed Jarkko Nikula
@ 2014-10-02 10:50 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2014-10-02 10:50 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: Jan-Michael Brummer, alsa-devel, Liam Girdwood


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

On Thu, Oct 02, 2014 at 01:29:08PM +0300, Jarkko Nikula wrote:
> It was found with help of Jan-Michael Brummer <jan.brummer@tabos.org> that
> Dell Venue 8 Pro tablet has a digital microphone connected to DMIC2
> interface of the RT564x.

Applied both, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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



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

end of thread, other threads:[~2014-10-02 10:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-02 10:29 [PATCH 1/2] ASoC: Intel: byt-rt5640: Add quirk for Dell Venue 8 Pro tablet Jarkko Nikula
2014-10-02 10:29 ` [PATCH 2/2] ASoC: Intel: byt-rt5640: Set card as fully routed Jarkko Nikula
2014-10-02 10:50 ` [PATCH 1/2] ASoC: Intel: byt-rt5640: Add quirk for Dell Venue 8 Pro tablet Mark Brown

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.