alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S
@ 2016-04-19 16:00 Bastien Nocera
  2016-04-19 16:41 ` Mark Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Bastien Nocera @ 2016-04-19 16:00 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood, Bastien Nocera

The Lenovo 100S netbook has a codec controller for which there is a
driver, but doesn't know how to access the device. This adds the
necessary ACPI table for the driver to find the device.

Device (TTLV)
{
    Name (_ADR, Zero)  // _ADR: Address
    Name (_HID, "10TI3100")  // _HID: Hardware ID
    Name (_CID, "10TI3100")  // _CID: Compatible ID
    Name (_DDN, "TI TLV320AIC3100 Codec Controller ")  // _DDN: DOS Device Name
    Name (_UID, One)  // _UID: Unique ID

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Tested-by: Jan Schmidt <jan@centricular.com>
---
 sound/soc/codecs/tlv320aic31xx.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index ee4def4..3c5e1df 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -28,6 +28,7 @@
 #include <linux/i2c.h>
 #include <linux/gpio.h>
 #include <linux/regulator/consumer.h>
+#include <linux/acpi.h>
 #include <linux/of.h>
 #include <linux/of_gpio.h>
 #include <linux/slab.h>
@@ -1280,10 +1281,19 @@ static const struct i2c_device_id aic31xx_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, aic31xx_i2c_id);
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id aic31xx_acpi_match[] = {
+	{ "10TI3100", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, aic31xx_acpi_match);
+#endif
+
 static struct i2c_driver aic31xx_i2c_driver = {
 	.driver = {
 		.name	= "tlv320aic31xx-codec",
 		.of_match_table = of_match_ptr(tlv320aic31xx_of_match),
+		.acpi_match_table = ACPI_PTR(aic31xx_acpi_match),
 	},
 	.probe		= aic31xx_i2c_probe,
 	.remove		= aic31xx_i2c_remove,
-- 
2.7.3

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

* Re: [PATCH] ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S
  2016-04-19 16:00 [PATCH] ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S Bastien Nocera
@ 2016-04-19 16:41 ` Mark Brown
  2016-04-19 17:57   ` Pierre-Louis Bossart
  2016-04-19 16:41 ` Applied "ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S" to the asoc tree Mark Brown
  2016-06-01 16:16 ` Mark Brown
  2 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2016-04-19 16:41 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: alsa-devel, Liam Girdwood


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

On Tue, Apr 19, 2016 at 06:00:20PM +0200, Bastien Nocera wrote:

> +static const struct acpi_device_id aic31xx_acpi_match[] = {
> +	{ "10TI3100", 0 },

An ACPI identifier that actually bears some resemblance to the name of
the part, will wonders never cease!  :)

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

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



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

* Applied "ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S" to the asoc tree
  2016-04-19 16:00 [PATCH] ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S Bastien Nocera
  2016-04-19 16:41 ` Mark Brown
@ 2016-04-19 16:41 ` Mark Brown
  2016-06-01 16:16 ` Mark Brown
  2 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2016-04-19 16:41 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: Mark Brown, Jan Schmidt, alsa-devel, Liam Girdwood

The patch

   ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S

has been applied to the asoc tree at

   git://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 f5cc17720b61af382a053d49a4a14c3d14857a5b Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Tue, 19 Apr 2016 18:00:20 +0200
Subject: [PATCH] ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S

The Lenovo 100S netbook has a codec controller for which there is a
driver, but doesn't know how to access the device. This adds the
necessary ACPI table for the driver to find the device.

Device (TTLV)
{
    Name (_ADR, Zero)  // _ADR: Address
    Name (_HID, "10TI3100")  // _HID: Hardware ID
    Name (_CID, "10TI3100")  // _CID: Compatible ID
    Name (_DDN, "TI TLV320AIC3100 Codec Controller ")  // _DDN: DOS Device Name
    Name (_UID, One)  // _UID: Unique ID

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Tested-by: Jan Schmidt <jan@centricular.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/tlv320aic31xx.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index ee4def4f819f..3c5e1df01c19 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -28,6 +28,7 @@
 #include <linux/i2c.h>
 #include <linux/gpio.h>
 #include <linux/regulator/consumer.h>
+#include <linux/acpi.h>
 #include <linux/of.h>
 #include <linux/of_gpio.h>
 #include <linux/slab.h>
@@ -1280,10 +1281,19 @@ static const struct i2c_device_id aic31xx_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, aic31xx_i2c_id);
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id aic31xx_acpi_match[] = {
+	{ "10TI3100", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, aic31xx_acpi_match);
+#endif
+
 static struct i2c_driver aic31xx_i2c_driver = {
 	.driver = {
 		.name	= "tlv320aic31xx-codec",
 		.of_match_table = of_match_ptr(tlv320aic31xx_of_match),
+		.acpi_match_table = ACPI_PTR(aic31xx_acpi_match),
 	},
 	.probe		= aic31xx_i2c_probe,
 	.remove		= aic31xx_i2c_remove,
-- 
2.8.0.rc3

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

* Re: [PATCH] ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S
  2016-04-19 16:41 ` Mark Brown
@ 2016-04-19 17:57   ` Pierre-Louis Bossart
  2016-04-19 18:43     ` Mark Brown
  2016-04-19 22:54     ` Bastien Nocera
  0 siblings, 2 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2016-04-19 17:57 UTC (permalink / raw)
  To: Mark Brown, Bastien Nocera; +Cc: alsa-devel, Liam Girdwood



On 04/19/2016 11:41 AM, Mark Brown wrote:
> On Tue, Apr 19, 2016 at 06:00:20PM +0200, Bastien Nocera wrote:
>
>> +static const struct acpi_device_id aic31xx_acpi_match[] = {
>> +	{ "10TI3100", 0 },
> An ACPI identifier that actually bears some resemblance to the name of
> the part, will wonders never cease!  :)
It's not a legit ACPI id but at least it's consistent with other BIOS. I 
see the same in a couple of DSDT I extracted. it'd be curious to see the 
schematics if you have them to help progress with Baytrail-CR support.

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

* Re: [PATCH] ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S
  2016-04-19 17:57   ` Pierre-Louis Bossart
@ 2016-04-19 18:43     ` Mark Brown
  2016-04-19 19:25       ` Pierre-Louis Bossart
  2016-04-19 22:54     ` Bastien Nocera
  1 sibling, 1 reply; 8+ messages in thread
From: Mark Brown @ 2016-04-19 18:43 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: alsa-devel, Liam Girdwood, Bastien Nocera


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

On Tue, Apr 19, 2016 at 12:57:40PM -0500, Pierre-Louis Bossart wrote:
> On 04/19/2016 11:41 AM, Mark Brown wrote:
> >On Tue, Apr 19, 2016 at 06:00:20PM +0200, Bastien Nocera wrote:

> >>+static const struct acpi_device_id aic31xx_acpi_match[] = {
> >>+	{ "10TI3100", 0 },

> >An ACPI identifier that actually bears some resemblance to the name of
> >the part, will wonders never cease!  :)

> It's not a legit ACPI id but at least it's consistent with other BIOS. I see
> the same in a couple of DSDT I extracted. it'd be curious to see the
> schematics if you have them to help progress with Baytrail-CR support.

It's in the right form at least, dunno if TI actually registered 10TI
properly or not though.

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

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



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

* Re: [PATCH] ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S
  2016-04-19 18:43     ` Mark Brown
@ 2016-04-19 19:25       ` Pierre-Louis Bossart
  0 siblings, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2016-04-19 19:25 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Liam Girdwood, Bastien Nocera



On 04/19/2016 01:43 PM, Mark Brown wrote:
> On Tue, Apr 19, 2016 at 12:57:40PM -0500, Pierre-Louis Bossart wrote:
>> On 04/19/2016 11:41 AM, Mark Brown wrote:
>>> On Tue, Apr 19, 2016 at 06:00:20PM +0200, Bastien Nocera wrote:
>>>> +static const struct acpi_device_id aic31xx_acpi_match[] = {
>>>> +	{ "10TI3100", 0 },
>>> An ACPI identifier that actually bears some resemblance to the name of
>>> the part, will wonders never cease!  :)
>> It's not a legit ACPI id but at least it's consistent with other BIOS. I see
>> the same in a couple of DSDT I extracted. it'd be curious to see the
>> schematics if you have them to help progress with Baytrail-CR support.
> It's in the right form at least, dunno if TI actually registered 10TI
> properly or not though.
The PNP ID for TI is TXN
The ACPI ID is TXNW
TI's PCI ID is 0x104C.

so nope, none of the legit vendor IDs match 10TI, which doesn't follow 
the rules... No one seems to care in the BIOS world though, it's 
becoming a lost cause.

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

* Re: [PATCH] ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S
  2016-04-19 17:57   ` Pierre-Louis Bossart
  2016-04-19 18:43     ` Mark Brown
@ 2016-04-19 22:54     ` Bastien Nocera
  1 sibling, 0 replies; 8+ messages in thread
From: Bastien Nocera @ 2016-04-19 22:54 UTC (permalink / raw)
  To: Pierre-Louis Bossart, Mark Brown; +Cc: alsa-devel, Liam Girdwood

On Tue, 2016-04-19 at 12:57 -0500, Pierre-Louis Bossart wrote:
> 
> On 04/19/2016 11:41 AM, Mark Brown wrote:
> > 
> > On Tue, Apr 19, 2016 at 06:00:20PM +0200, Bastien Nocera wrote:
> > 
> > > 
> > > +static const struct acpi_device_id aic31xx_acpi_match[] = {
> > > +	{ "10TI3100", 0 },
> > An ACPI identifier that actually bears some resemblance to the name of
> > the part, will wonders never cease!  :)
> It's not a legit ACPI id but at least it's consistent with other BIOS. I 
> see the same in a couple of DSDT I extracted. it'd be curious to see the 
> schematics if you have them to help progress with Baytrail-CR support.

The DSDT for that device is at:
http://noraisin.net/lenovo-100s/dsdt.dsl
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Applied "ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S" to the asoc tree
  2016-04-19 16:00 [PATCH] ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S Bastien Nocera
  2016-04-19 16:41 ` Mark Brown
  2016-04-19 16:41 ` Applied "ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S" to the asoc tree Mark Brown
@ 2016-06-01 16:16 ` Mark Brown
  2 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2016-06-01 16:16 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: Mark Brown, Jan Schmidt, alsa-devel, Liam Girdwood

The patch

   ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S

has been applied to the asoc tree at

   git://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 11f9192cc16cd26f16fb0fa2b18ce4440a7a1623 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Tue, 19 Apr 2016 18:00:20 +0200
Subject: [PATCH] ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S

The Lenovo 100S netbook has a codec controller for which there is a
driver, but doesn't know how to access the device. This adds the
necessary ACPI table for the driver to find the device.

Device (TTLV)
{
    Name (_ADR, Zero)  // _ADR: Address
    Name (_HID, "10TI3100")  // _HID: Hardware ID
    Name (_CID, "10TI3100")  // _CID: Compatible ID
    Name (_DDN, "TI TLV320AIC3100 Codec Controller ")  // _DDN: DOS Device Name
    Name (_UID, One)  // _UID: Unique ID

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Tested-by: Jan Schmidt <jan@centricular.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/tlv320aic31xx.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index ee4def4f819f..3c5e1df01c19 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -28,6 +28,7 @@
 #include <linux/i2c.h>
 #include <linux/gpio.h>
 #include <linux/regulator/consumer.h>
+#include <linux/acpi.h>
 #include <linux/of.h>
 #include <linux/of_gpio.h>
 #include <linux/slab.h>
@@ -1280,10 +1281,19 @@ static const struct i2c_device_id aic31xx_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, aic31xx_i2c_id);
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id aic31xx_acpi_match[] = {
+	{ "10TI3100", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, aic31xx_acpi_match);
+#endif
+
 static struct i2c_driver aic31xx_i2c_driver = {
 	.driver = {
 		.name	= "tlv320aic31xx-codec",
 		.of_match_table = of_match_ptr(tlv320aic31xx_of_match),
+		.acpi_match_table = ACPI_PTR(aic31xx_acpi_match),
 	},
 	.probe		= aic31xx_i2c_probe,
 	.remove		= aic31xx_i2c_remove,
-- 
2.8.1

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

end of thread, other threads:[~2016-06-01 16:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-19 16:00 [PATCH] ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S Bastien Nocera
2016-04-19 16:41 ` Mark Brown
2016-04-19 17:57   ` Pierre-Louis Bossart
2016-04-19 18:43     ` Mark Brown
2016-04-19 19:25       ` Pierre-Louis Bossart
2016-04-19 22:54     ` Bastien Nocera
2016-04-19 16:41 ` Applied "ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S" to the asoc tree Mark Brown
2016-06-01 16:16 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).