* ASoC : WM5102 Audio Codec needs ACPI support and a baytrail machine driver
@ 2015-06-16 10:00 Christian Hartmann
2015-06-16 12:27 ` Christian Hartmann
0 siblings, 1 reply; 7+ messages in thread
From: Christian Hartmann @ 2015-06-16 10:00 UTC (permalink / raw)
To: alsa-devel; +Cc: linux-acpi, patches
Hi list,
I have a device "Lenovo Yoga 851 F" which have a WM510205 Audio codec
on a Baytrail System.
I have sent already one patch (spi-pxa2xx) raise num_chipselect by one, which
fixes to bind the arizona WM5102 codec as a spi slave attachted on a
pxa2xx spi master device.
I have tried several times and added the ACPI id "WM510205" to
the arizona-spi.c driver.
The ACPI ID is extracted from the DSDT.dsl of this machine.
But unfortunately it fails and I got only a NULL pointer deference error
in arizona_spi_probe().
I want to request ACPI support for this device and I cannot fix
currently the NULL pointer.
I do not know yet, if I have to add this ACPI id to the arizona-spi
driver (sure,
thats what I am trying and failing) or to the NEW baytrail machine driver.
In this case it should be the bytcr_wm5102.c and byt-wm5102.c, which
does not exists yet.
I have a branched tovalds/master and added (my first attempt) the
above mentioned machine driver on a local branch. The result is only
a dsp boot timeout error.
Any help, ideas, hints, patches to try would be appreciate
sincerely yours
Christian Hartmann
a snap of the dsdt
Device (LPEA)
{
Name (_ADR, Zero) // _ADR: Address
Name (_HID, "80860F28" /* Intel SST Audio DSP */) //
_HID: Hardware ID
Name (_CID, "80860F28" /* Intel SST Audio DSP */) //
_CID: Compatible ID
Name (_DDN, "Intel(R) Low Power Audio Controller -
80860F28") // _DDN: DOS Device Name
Name (_SUB, "17AA7004") // _SUB: Subsystem ID
Name (_UID, One) // _UID: Unique ID
Name (_DEP, Package (0x01) // _DEP: Dependencies
{
^SPI1.AUDI
})
...
...
Device (AUDI)
{
Name (_HID, "WM510205") // _HID: Hardware ID
Name (_CID, "WM510205") // _CID: Compatible ID
Name (_DDN, "Wolfson Microelectronics Audio WM5102")
// _DDN: DOS Device Name
Method (_CRS, 0, NotSerialized) // _CRS: Current
Resource Settings
{
Name (SBUF, ResourceTemplate ()
{
SpiSerialBus (0x0001, PolarityLow, FourWireMode, 0x08,
ControllerInitiated, 0x007A1200, ClockPolarityLow,
ClockPhaseFirst, "\\_SB.SPI1",
0x00, ResourceConsumer, ,
)
GpioInt (Edge, ActiveLow, ExclusiveAndWake,
PullNone, 0x0000,
"\\_SB.GPO2", 0x00, ResourceConsumer, ,
)
{ // Pin list
0x0004
}
GpioIo (Exclusive, PullDefault, 0x0000,
0x0000, IoRestrictionOutputOnly,
"\\_SB.I2C7.PMIC", 0x00, ResourceConsumer, ,
)
{ // Pin list
0x0003
}
GpioIo (Exclusive, PullDefault, 0x0000,
0x0000, IoRestrictionOutputOnly,
"\\_SB.GPO1", 0x00, ResourceConsumer, ,
)
{ // Pin list
0x0017
}
})
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: ASoC : WM5102 Audio Codec needs ACPI support and a baytrail machine driver 2015-06-16 10:00 ASoC : WM5102 Audio Codec needs ACPI support and a baytrail machine driver Christian Hartmann @ 2015-06-16 12:27 ` Christian Hartmann 2015-06-16 13:10 ` Fwd: " Christian Hartmann 0 siblings, 1 reply; 7+ messages in thread From: Christian Hartmann @ 2015-06-16 12:27 UTC (permalink / raw) To: alsa-devel Hi again, some notes to the NULL pointer dereference error I have changed the function arizona_spi_probe in arizona-spi.c and have looked into the code where the NULL is coming... in drivers/spi/spi.c the function spi_get_device_id() returns NULL, cause the called function spi_match_id() does never match an id string (there is no modalias string available I think). With the id = NULL the line type = id->driver_data; will throw the described exception. Going on further, it seems that "id" has no such structure element of "->driver_data", or I cannot find it. Can someone please explain me in some simple words where the element driver_data is coming or will be set in THIS function of arizona_spi_probe() The id->driver_data is not working for the acpi case... This tablet does not have openfirmware (OF) by the way. The code seems to be optimized for the Openfirmware API, but not for the ACPI case. this is the currently local changed code to test and find null pointer inarizona-spi.c. diff --git a/drivers/mfd/arizona-spi.c b/drivers/mfd/arizona-spi.c index 1e845f6..de48cf6 100644 --- a/drivers/mfd/arizona-spi.c +++ b/drivers/mfd/arizona-spi.c @@ -25,16 +25,26 @@ static int arizona_spi_probe(struct spi_device *spi) { - const struct spi_device_id *id = spi_get_device_id(spi); + const struct spi_device_id *id ; struct arizona *arizona; const struct regmap_config *regmap_config; unsigned long type; int ret; - if (spi->dev.of_node) - type = arizona_of_get_type(&spi->dev); - else + /* + id = spi_get_device_id(spi); + + if (!id) + return -EINVAL; + type = id->driver_data; + */ + id = WM5102; + + if (id->driver_data) type = id->driver_data; + else + type = WM5102; + switch (type) { #ifdef CONFIG_MFD_WM5102 @@ -90,11 +100,23 @@ static const struct spi_device_id arizona_spi_ids[] = { }; MODULE_DEVICE_TABLE(spi, arizona_spi_ids); +#ifdef CONFIG_ACPI +static const struct acpi_device_id wm5102_acpi_match[] = { + { "WM510205", WM5102 }, + {}, +}; + +MODULE_DEVICE_TABLE(acpi, wm5102_acpi_match); +#ifdef CONFIG_ACPI +static const struct acpi_device_id wm5102_acpi_match[] = { + { "WM510205", WM5102 }, + {}, +}; + +MODULE_DEVICE_TABLE(acpi, wm5102_acpi_match); +#endif + static struct spi_driver arizona_spi_driver = { .driver = { .name = "arizona", .owner = THIS_MODULE, .pm = &arizona_pm_ops, +#ifdef CONFIG_ACPI + .acpi_match_table = wm5102_acpi_match, +#endif .of_match_table = of_match_ptr(arizona_of_match), }, .probe = arizona_spi_probe, @@ -107,3 +129,4 @@ module_spi_driver(arizona_spi_driver); MODULE_DESCRIPTION("Arizona SPI bus interface"); MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:WM510205"); cheers chris [ 5.095808] pxa2xx-spi 80860F0E:00: no DMA channels available, using PIO [ 5.095892] pxa2xx-spi 80860F0E:00: registered master spi32766 (dynamic) [ 5.110575] spi spi-WM510205:00: 8333333 Hz actual, PIO [ 5.110585] spi spi-WM510205:00: setup mode 0, 8 bits/w, 8000000 Hz max --> 0 [ 5.110664] pxa2xx-spi 80860F0E:00: registered child spi-WM510205:00 [ 5.245307] ACPI: Battery Slot [BATC] (battery present) [ 5.246890] i2c i2c-4: Failed to register i2c client MAGN0001:00 at 0x1d (-16) [ 5.254246] i2c i2c-4: failed to add I2C device MAGN0001:00 from ACPI [ 5.320349] arizona: probe of spi-WM510205:00 failed with error -22 2015-06-16 12:00 GMT+02:00 Christian Hartmann <cornogle@googlemail.com>: > Hi list, > > I have a device "Lenovo Yoga 851 F" which have a WM510205 Audio codec > on a Baytrail System. > > I have sent already one patch (spi-pxa2xx) raise num_chipselect by one, which > fixes to bind the arizona WM5102 codec as a spi slave attachted on a > pxa2xx spi master device. > > I have tried several times and added the ACPI id "WM510205" to > the arizona-spi.c driver. > > The ACPI ID is extracted from the DSDT.dsl of this machine. > > But unfortunately it fails and I got only a NULL pointer deference error > in arizona_spi_probe(). > I want to request ACPI support for this device and I cannot fix > currently the NULL pointer. > > I do not know yet, if I have to add this ACPI id to the arizona-spi > driver (sure, > thats what I am trying and failing) or to the NEW baytrail machine driver. > > In this case it should be the bytcr_wm5102.c and byt-wm5102.c, which > does not exists yet. > > I have a branched tovalds/master and added (my first attempt) the > above mentioned machine driver on a local branch. The result is only > a dsp boot timeout error. > > Any help, ideas, hints, patches to try would be appreciate > > sincerely yours > Christian Hartmann > > a snap of the dsdt > > Device (LPEA) > { > Name (_ADR, Zero) // _ADR: Address > Name (_HID, "80860F28" /* Intel SST Audio DSP */) // > _HID: Hardware ID > Name (_CID, "80860F28" /* Intel SST Audio DSP */) // > _CID: Compatible ID > Name (_DDN, "Intel(R) Low Power Audio Controller - > 80860F28") // _DDN: DOS Device Name > Name (_SUB, "17AA7004") // _SUB: Subsystem ID > Name (_UID, One) // _UID: Unique ID > Name (_DEP, Package (0x01) // _DEP: Dependencies > { > ^SPI1.AUDI > }) > ... > ... > Device (AUDI) > { > Name (_HID, "WM510205") // _HID: Hardware ID > Name (_CID, "WM510205") // _CID: Compatible ID > Name (_DDN, "Wolfson Microelectronics Audio WM5102") > // _DDN: DOS Device Name > Method (_CRS, 0, NotSerialized) // _CRS: Current > Resource Settings > { > Name (SBUF, ResourceTemplate () > { > SpiSerialBus (0x0001, PolarityLow, FourWireMode, 0x08, > ControllerInitiated, 0x007A1200, ClockPolarityLow, > ClockPhaseFirst, "\\_SB.SPI1", > 0x00, ResourceConsumer, , > ) > GpioInt (Edge, ActiveLow, ExclusiveAndWake, > PullNone, 0x0000, > "\\_SB.GPO2", 0x00, ResourceConsumer, , > ) > { // Pin list > 0x0004 > } > GpioIo (Exclusive, PullDefault, 0x0000, > 0x0000, IoRestrictionOutputOnly, > "\\_SB.I2C7.PMIC", 0x00, ResourceConsumer, , > ) > { // Pin list > 0x0003 > } > GpioIo (Exclusive, PullDefault, 0x0000, > 0x0000, IoRestrictionOutputOnly, > "\\_SB.GPO1", 0x00, ResourceConsumer, , > ) > { // Pin list > 0x0017 > } > }) ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Fwd: ASoC : WM5102 Audio Codec needs ACPI support and a baytrail machine driver 2015-06-16 12:27 ` Christian Hartmann @ 2015-06-16 13:10 ` Christian Hartmann 2015-06-16 14:47 ` Charles Keepax 0 siblings, 1 reply; 7+ messages in thread From: Christian Hartmann @ 2015-06-16 13:10 UTC (permalink / raw) To: patches, linux-acpi ---------- Forwarded message ---------- From: Christian Hartmann <cornogle@googlemail.com> Date: 2015-06-16 14:27 GMT+02:00 Subject: Re: ASoC : WM5102 Audio Codec needs ACPI support and a baytrail machine driver To: alsa-devel@alsa-project.org Hi again, some notes to the NULL pointer dereference error I have changed the function arizona_spi_probe in arizona-spi.c and have looked into the code where the NULL is coming... in drivers/spi/spi.c the function spi_get_device_id() returns NULL, cause the called function spi_match_id() does never match an id string (there is no modalias string available I think). With the id = NULL the line type = id->driver_data; will throw the described exception. Going on further, it seems that "id" has no such structure element of "->driver_data", or I cannot find it. Can someone please explain me in some simple words where the element driver_data is coming or will be set in THIS function of arizona_spi_probe() The id->driver_data is not working for the acpi case... This tablet does not have openfirmware (OF) by the way. The code seems to be optimized for the Openfirmware API, but not for the ACPI case. this is the currently local changed code to test and find null pointer inarizona-spi.c. diff --git a/drivers/mfd/arizona-spi.c b/drivers/mfd/arizona-spi.c index 1e845f6..de48cf6 100644 --- a/drivers/mfd/arizona-spi.c +++ b/drivers/mfd/arizona-spi.c @@ -25,16 +25,26 @@ static int arizona_spi_probe(struct spi_device *spi) { - const struct spi_device_id *id = spi_get_device_id(spi); + const struct spi_device_id *id ; struct arizona *arizona; const struct regmap_config *regmap_config; unsigned long type; int ret; - if (spi->dev.of_node) - type = arizona_of_get_type(&spi->dev); - else + /* + id = spi_get_device_id(spi); + + if (!id) + return -EINVAL; + type = id->driver_data; + */ + id = WM5102; + + if (id->driver_data) type = id->driver_data; + else + type = WM5102; + switch (type) { #ifdef CONFIG_MFD_WM5102 @@ -90,11 +100,23 @@ static const struct spi_device_id arizona_spi_ids[] = { }; MODULE_DEVICE_TABLE(spi, arizona_spi_ids); +#ifdef CONFIG_ACPI +static const struct acpi_device_id wm5102_acpi_match[] = { + { "WM510205", WM5102 }, + {}, +}; + +MODULE_DEVICE_TABLE(acpi, wm5102_acpi_match); +#ifdef CONFIG_ACPI +static const struct acpi_device_id wm5102_acpi_match[] = { + { "WM510205", WM5102 }, + {}, +}; + +MODULE_DEVICE_TABLE(acpi, wm5102_acpi_match); +#endif + static struct spi_driver arizona_spi_driver = { .driver = { .name = "arizona", .owner = THIS_MODULE, .pm = &arizona_pm_ops, +#ifdef CONFIG_ACPI + .acpi_match_table = wm5102_acpi_match, +#endif .of_match_table = of_match_ptr(arizona_of_match), }, .probe = arizona_spi_probe, @@ -107,3 +129,4 @@ module_spi_driver(arizona_spi_driver); MODULE_DESCRIPTION("Arizona SPI bus interface"); MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:WM510205"); cheers chris [ 5.095808] pxa2xx-spi 80860F0E:00: no DMA channels available, using PIO [ 5.095892] pxa2xx-spi 80860F0E:00: registered master spi32766 (dynamic) [ 5.110575] spi spi-WM510205:00: 8333333 Hz actual, PIO [ 5.110585] spi spi-WM510205:00: setup mode 0, 8 bits/w, 8000000 Hz max --> 0 [ 5.110664] pxa2xx-spi 80860F0E:00: registered child spi-WM510205:00 [ 5.245307] ACPI: Battery Slot [BATC] (battery present) [ 5.246890] i2c i2c-4: Failed to register i2c client MAGN0001:00 at 0x1d (-16) [ 5.254246] i2c i2c-4: failed to add I2C device MAGN0001:00 from ACPI [ 5.320349] arizona: probe of spi-WM510205:00 failed with error -22 2015-06-16 12:00 GMT+02:00 Christian Hartmann <cornogle@googlemail.com>: > Hi list, > > I have a device "Lenovo Yoga 851 F" which have a WM510205 Audio codec > on a Baytrail System. > > I have sent already one patch (spi-pxa2xx) raise num_chipselect by one, which > fixes to bind the arizona WM5102 codec as a spi slave attachted on a > pxa2xx spi master device. > > I have tried several times and added the ACPI id "WM510205" to > the arizona-spi.c driver. > > The ACPI ID is extracted from the DSDT.dsl of this machine. > > But unfortunately it fails and I got only a NULL pointer deference error > in arizona_spi_probe(). > I want to request ACPI support for this device and I cannot fix > currently the NULL pointer. > > I do not know yet, if I have to add this ACPI id to the arizona-spi > driver (sure, > thats what I am trying and failing) or to the NEW baytrail machine driver. > > In this case it should be the bytcr_wm5102.c and byt-wm5102.c, which > does not exists yet. > > I have a branched tovalds/master and added (my first attempt) the > above mentioned machine driver on a local branch. The result is only > a dsp boot timeout error. > > Any help, ideas, hints, patches to try would be appreciate > > sincerely yours > Christian Hartmann > > a snap of the dsdt > > Device (LPEA) > { > Name (_ADR, Zero) // _ADR: Address > Name (_HID, "80860F28" /* Intel SST Audio DSP */) // > _HID: Hardware ID > Name (_CID, "80860F28" /* Intel SST Audio DSP */) // > _CID: Compatible ID > Name (_DDN, "Intel(R) Low Power Audio Controller - > 80860F28") // _DDN: DOS Device Name > Name (_SUB, "17AA7004") // _SUB: Subsystem ID > Name (_UID, One) // _UID: Unique ID > Name (_DEP, Package (0x01) // _DEP: Dependencies > { > ^SPI1.AUDI > }) > ... > ... > Device (AUDI) > { > Name (_HID, "WM510205") // _HID: Hardware ID > Name (_CID, "WM510205") // _CID: Compatible ID > Name (_DDN, "Wolfson Microelectronics Audio WM5102") > // _DDN: DOS Device Name > Method (_CRS, 0, NotSerialized) // _CRS: Current > Resource Settings > { > Name (SBUF, ResourceTemplate () > { > SpiSerialBus (0x0001, PolarityLow, FourWireMode, 0x08, > ControllerInitiated, 0x007A1200, ClockPolarityLow, > ClockPhaseFirst, "\\_SB.SPI1", > 0x00, ResourceConsumer, , > ) > GpioInt (Edge, ActiveLow, ExclusiveAndWake, > PullNone, 0x0000, > "\\_SB.GPO2", 0x00, ResourceConsumer, , > ) > { // Pin list > 0x0004 > } > GpioIo (Exclusive, PullDefault, 0x0000, > 0x0000, IoRestrictionOutputOnly, > "\\_SB.I2C7.PMIC", 0x00, ResourceConsumer, , > ) > { // Pin list > 0x0003 > } > GpioIo (Exclusive, PullDefault, 0x0000, > 0x0000, IoRestrictionOutputOnly, > "\\_SB.GPO1", 0x00, ResourceConsumer, , > ) > { // Pin list > 0x0017 > } > }) -- -- ......oooO.............. .....(....).....Oooo... ......)../.....(....).... .....(_/.......)../..... ...............(_/....... ... I WAS .............. .......... HERE...... ;) ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Fwd: ASoC : WM5102 Audio Codec needs ACPI support and a baytrail machine driver 2015-06-16 13:10 ` Fwd: " Christian Hartmann @ 2015-06-16 14:47 ` Charles Keepax 2015-06-22 9:55 ` Christian Hartmann 0 siblings, 1 reply; 7+ messages in thread From: Charles Keepax @ 2015-06-16 14:47 UTC (permalink / raw) To: Christian Hartmann; +Cc: patches, linux-acpi On Tue, Jun 16, 2015 at 03:10:42PM +0200, Christian Hartmann wrote: > ---------- Forwarded message ---------- > From: Christian Hartmann <cornogle@googlemail.com> > Date: 2015-06-16 14:27 GMT+02:00 > Subject: Re: ASoC : WM5102 Audio Codec needs ACPI support and a > baytrail machine driver > To: alsa-devel@alsa-project.org > > > Hi again, > > > some notes to the NULL pointer dereference error > I have changed the function arizona_spi_probe in arizona-spi.c and > have looked into the code where the NULL is coming... > > in drivers/spi/spi.c the function spi_get_device_id() returns NULL, > cause the called function spi_match_id() does never match an id string > (there is no modalias string available I think). > With the id = NULL the line > type = id->driver_data; will throw the described exception. > > Going on further, it seems that "id" has no such structure element of > "->driver_data", or I cannot find it. > > Can someone please explain me in some simple words where the element > driver_data is coming or will be set > in THIS function of arizona_spi_probe() > > The id->driver_data is not working for the acpi case... > This tablet does not have openfirmware (OF) by the way. The code seems > to be optimized for the Openfirmware API, but not for the ACPI case. > Alas you are correct this driver has no built in support for ACPI at the moment. So you are going to need to add that to get it working on an ACPI system. I don't really have any experience with ACPI so can't really be of much assistance here. However, most of these device match functions OF or the SPI built in system contain two fields an ID and some driver data. As you can see in the code: if (spi->dev.of_node) type = arizona_of_get_type(&spi->dev); else type = id->driver_data; We extract the type in suitable ways for the SPI built in match and for the OF match up, I presume you need to do something similar that is specific to the ACPI case. I would suggest here looking up other ACPI drivers and seeing how they handle this situation. What I would expect to see is an extra else if in this statement that does something specific to the ACPI case. > > > this is the currently local changed code to test and find null pointer > inarizona-spi.c. > > diff --git a/drivers/mfd/arizona-spi.c b/drivers/mfd/arizona-spi.c > index 1e845f6..de48cf6 100644 > --- a/drivers/mfd/arizona-spi.c > +++ b/drivers/mfd/arizona-spi.c > @@ -25,16 +25,26 @@ > > static int arizona_spi_probe(struct spi_device *spi) > { > - const struct spi_device_id *id = spi_get_device_id(spi); > + const struct spi_device_id *id ; > struct arizona *arizona; > const struct regmap_config *regmap_config; > unsigned long type; > int ret; > > - if (spi->dev.of_node) > - type = arizona_of_get_type(&spi->dev); > - else > + /* > + id = spi_get_device_id(spi); > + > + if (!id) > + return -EINVAL; > + type = id->driver_data; > + */ > + id = WM5102; > + > + if (id->driver_data) > type = id->driver_data; > + else > + type = WM5102; > + This just defaults to WM5102 whenever we arn't using the spi matching, which will probably get you running but clearly isn't going to be a suitable solution. > > switch (type) { > #ifdef CONFIG_MFD_WM5102 > @@ -90,11 +100,23 @@ static const struct spi_device_id arizona_spi_ids[] = { > }; > MODULE_DEVICE_TABLE(spi, arizona_spi_ids); > > +#ifdef CONFIG_ACPI > +static const struct acpi_device_id wm5102_acpi_match[] = { > + { "WM510205", WM5102 }, > + {}, > +}; > + > +MODULE_DEVICE_TABLE(acpi, wm5102_acpi_match); > +#ifdef CONFIG_ACPI > +static const struct acpi_device_id wm5102_acpi_match[] = { > + { "WM510205", WM5102 }, The second entry here should be the driver_data, the ACPI id does look a bit odd but I guess this is what our Windows guys are using. Thanks, Charles ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fwd: ASoC : WM5102 Audio Codec needs ACPI support and a baytrail machine driver 2015-06-16 14:47 ` Charles Keepax @ 2015-06-22 9:55 ` Christian Hartmann 2015-06-22 12:00 ` Charles Keepax 0 siblings, 1 reply; 7+ messages in thread From: Christian Hartmann @ 2015-06-22 9:55 UTC (permalink / raw) To: Charles Keepax; +Cc: patches, linux-acpi hi list, FYI - I have some local patches (currently not ready to sent && merge) but want to let you know about the new status: the init messages I have now from the arizona-spi for the audio codec WM5102 in dmesg of my local patched 4.1.0 (mainline aka torvals/master) are: [ 6.067993] pxa2xx-spi 80860F0E:00: no DMA channels available, using PIO [ 6.068072] pxa2xx-spi 80860F0E:00: registered master spi32766 (dynamic) [ 6.068216] spi spi-WM510205:00: 8333333 Hz actual, PIO [ 6.068224] spi spi-WM510205:00: setup mode 0, 8 bits/w, 8000000 Hz max --> 0 [ 6.068284] spi spi-WM510205:00: checking WM510205 with wm8310 [ 6.068290] spi spi-WM510205:00: checking WM510205 with wm8311 [ 6.068295] spi spi-WM510205:00: checking WM510205 with wm8312 [ 6.068299] spi spi-WM510205:00: checking WM510205 with wm8320 [ 6.068304] spi spi-WM510205:00: checking WM510205 with wm8321 [ 6.068308] spi spi-WM510205:00: checking WM510205 with wm8325 [ 6.068312] spi spi-WM510205:00: checking WM510205 with wm8326 [ 6.068316] spi spi-WM510205:00: modalias WM510205 in id_table not found, returns NULL [ 6.068322] spi spi-WM510205:00: checking WM510205 with bmp180 [ 6.068327] spi spi-WM510205:00: checking WM510205 with bmp181 [ 6.068331] spi spi-WM510205:00: modalias WM510205 in id_table not found, returns NULL [ 6.068337] pxa2xx-spi 80860F0E:00: registered child spi-WM510205:00 [ 6.143633] arizona spi-WM510205:00: acpi_match_device() first, than via spi_get_device_id(). [ 6.143643] arizona spi-WM510205:00: matched ACPI ID and data [ 6.143648] arizona spi-WM510205:00: using 1 as type for arizona audio codec [ 6.143652] arizona spi-WM510205:00: regmap set to wm5102_spi [ 6.144461] arizona spi-WM510205:00: arizona_spi_probe done, call and return of arizona_dev_init [ 6.144576] spi-WM510205:00 supply AVDD not found, using dummy regulator [ 6.144761] spi-WM510205:00 supply DBVDD1 not found, using dummy regulator [ 6.144784] spi-WM510205:00 supply DCVDD not found, using dummy regulator [ 6.176047] arizona spi-WM510205:00: Unknown device ID: ffff [ 6.194727] sst-acpi 80860F28:00: No matching ASoC machine driver found Note : most of the messages here are by local dev_err() added into some functions used to see whats going on there... It seems that I have to patch arizona_core again: the function arizona_dev_init() to, so it will find and use the correct device ID... So going on and will report soon again That all but not trivial... cheers Christian H. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fwd: ASoC : WM5102 Audio Codec needs ACPI support and a baytrail machine driver 2015-06-22 9:55 ` Christian Hartmann @ 2015-06-22 12:00 ` Charles Keepax 2015-06-24 8:48 ` Charles Keepax 0 siblings, 1 reply; 7+ messages in thread From: Charles Keepax @ 2015-06-22 12:00 UTC (permalink / raw) To: Christian Hartmann; +Cc: patches, linux-acpi On Mon, Jun 22, 2015 at 11:55:13AM +0200, Christian Hartmann wrote: > hi list, > > FYI - I have some local patches (currently not ready to sent && merge) but > want to let you know about the new status: > > the init messages I have now from the arizona-spi for the audio codec > WM5102 in dmesg of my local patched 4.1.0 (mainline aka > torvals/master) are: > > [ 6.067993] pxa2xx-spi 80860F0E:00: no DMA channels available, using PIO > [ 6.068072] pxa2xx-spi 80860F0E:00: registered master spi32766 (dynamic) > [ 6.068216] spi spi-WM510205:00: 8333333 Hz actual, PIO > [ 6.068224] spi spi-WM510205:00: setup mode 0, 8 bits/w, 8000000 Hz max --> 0 > [ 6.068284] spi spi-WM510205:00: checking WM510205 with wm8310 > [ 6.068290] spi spi-WM510205:00: checking WM510205 with wm8311 > [ 6.068295] spi spi-WM510205:00: checking WM510205 with wm8312 > [ 6.068299] spi spi-WM510205:00: checking WM510205 with wm8320 > [ 6.068304] spi spi-WM510205:00: checking WM510205 with wm8321 > [ 6.068308] spi spi-WM510205:00: checking WM510205 with wm8325 > [ 6.068312] spi spi-WM510205:00: checking WM510205 with wm8326 > [ 6.068316] spi spi-WM510205:00: modalias WM510205 in id_table not > found, returns NULL > [ 6.068322] spi spi-WM510205:00: checking WM510205 with bmp180 > [ 6.068327] spi spi-WM510205:00: checking WM510205 with bmp181 > [ 6.068331] spi spi-WM510205:00: modalias WM510205 in id_table not > found, returns NULL > [ 6.068337] pxa2xx-spi 80860F0E:00: registered child spi-WM510205:00 > [ 6.143633] arizona spi-WM510205:00: acpi_match_device() first, > than via spi_get_device_id(). > [ 6.143643] arizona spi-WM510205:00: matched ACPI ID and data > [ 6.143648] arizona spi-WM510205:00: using 1 as type for arizona audio codec > [ 6.143652] arizona spi-WM510205:00: regmap set to wm5102_spi > [ 6.144461] arizona spi-WM510205:00: arizona_spi_probe done, call > and return of arizona_dev_init > [ 6.144576] spi-WM510205:00 supply AVDD not found, using dummy regulator > [ 6.144761] spi-WM510205:00 supply DBVDD1 not found, using dummy regulator > [ 6.144784] spi-WM510205:00 supply DCVDD not found, using dummy regulator > [ 6.176047] arizona spi-WM510205:00: Unknown device ID: ffff My guess here is that the GPIOs for the reset and LDOENA lines are not specified. I think the Windows guys specify very little through ACPI and hard-code most of it into the driver, so you are probably going to need to find a way to define some pdata for the CODEC to get things going here. Also not finding DCVDD is a bit odd make sure you have the arizona-ldo1 driver built into your system. > [ 6.194727] sst-acpi 80860F28:00: No matching ASoC machine driver found > > Note : most of the messages here are by local dev_err() added into > some functions used to see whats going > on there... > > It seems that I have to patch arizona_core again: the function > arizona_dev_init() to, so it will find and use the correct device > ID... > So going on and will report soon again > > That all but not trivial... > > > cheers > Christian H. Thanks, Charles -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fwd: ASoC : WM5102 Audio Codec needs ACPI support and a baytrail machine driver 2015-06-22 12:00 ` Charles Keepax @ 2015-06-24 8:48 ` Charles Keepax 0 siblings, 0 replies; 7+ messages in thread From: Charles Keepax @ 2015-06-24 8:48 UTC (permalink / raw) To: Christian Hartmann; +Cc: linux-acpi, patches On Mon, Jun 22, 2015 at 01:00:20PM +0100, Charles Keepax wrote: > On Mon, Jun 22, 2015 at 11:55:13AM +0200, Christian Hartmann wrote: > > hi list, > > > > FYI - I have some local patches (currently not ready to sent && merge) but > > want to let you know about the new status: > > > > the init messages I have now from the arizona-spi for the audio codec > > WM5102 in dmesg of my local patched 4.1.0 (mainline aka > > torvals/master) are: > > > > [ 6.067993] pxa2xx-spi 80860F0E:00: no DMA channels available, using PIO > > [ 6.068072] pxa2xx-spi 80860F0E:00: registered master spi32766 (dynamic) > > [ 6.068216] spi spi-WM510205:00: 8333333 Hz actual, PIO > > [ 6.068224] spi spi-WM510205:00: setup mode 0, 8 bits/w, 8000000 Hz max --> 0 > > [ 6.068284] spi spi-WM510205:00: checking WM510205 with wm8310 > > [ 6.068290] spi spi-WM510205:00: checking WM510205 with wm8311 > > [ 6.068295] spi spi-WM510205:00: checking WM510205 with wm8312 > > [ 6.068299] spi spi-WM510205:00: checking WM510205 with wm8320 > > [ 6.068304] spi spi-WM510205:00: checking WM510205 with wm8321 > > [ 6.068308] spi spi-WM510205:00: checking WM510205 with wm8325 > > [ 6.068312] spi spi-WM510205:00: checking WM510205 with wm8326 > > [ 6.068316] spi spi-WM510205:00: modalias WM510205 in id_table not > > found, returns NULL > > [ 6.068322] spi spi-WM510205:00: checking WM510205 with bmp180 > > [ 6.068327] spi spi-WM510205:00: checking WM510205 with bmp181 > > [ 6.068331] spi spi-WM510205:00: modalias WM510205 in id_table not > > found, returns NULL > > [ 6.068337] pxa2xx-spi 80860F0E:00: registered child spi-WM510205:00 > > [ 6.143633] arizona spi-WM510205:00: acpi_match_device() first, > > than via spi_get_device_id(). > > [ 6.143643] arizona spi-WM510205:00: matched ACPI ID and data > > [ 6.143648] arizona spi-WM510205:00: using 1 as type for arizona audio codec > > [ 6.143652] arizona spi-WM510205:00: regmap set to wm5102_spi > > [ 6.144461] arizona spi-WM510205:00: arizona_spi_probe done, call > > and return of arizona_dev_init > > [ 6.144576] spi-WM510205:00 supply AVDD not found, using dummy regulator > > [ 6.144761] spi-WM510205:00 supply DBVDD1 not found, using dummy regulator > > [ 6.144784] spi-WM510205:00 supply DCVDD not found, using dummy regulator > > [ 6.176047] arizona spi-WM510205:00: Unknown device ID: ffff > > My guess here is that the GPIOs for the reset and LDOENA lines > are not specified. I think the Windows guys specify very little > through ACPI and hard-code most of it into the driver, so you are > probably going to need to find a way to define some pdata for the > CODEC to get things going here. > > Also not finding DCVDD is a bit odd make sure you have the > arizona-ldo1 driver built into your system. > I had a bit of a chat with Mark last night about this seems like the best way to handle this is going to be to hard-code a pdata structure into the driver and have that selected when we see the appropriate ID. Probably the bear minimum you want to define are the reset and ldoena GPIOs as I said before. I also have a vague memory in the back of my head that the Intel processors only support edge driven IRQs so you probably want to add the irq_flag IRQF_TRIGGER_RISING/FALLING, and irq_gpio which is the GPIO pin that corresponds to the interrupt. static struct arizona_pdata wm5102_pdata = { .reset = ????, .ldoena = ????, .irq_flags = ????, .irq_gpio = ????, }; Thanks, Charles ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-24 8:48 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-06-16 10:00 ASoC : WM5102 Audio Codec needs ACPI support and a baytrail machine driver Christian Hartmann 2015-06-16 12:27 ` Christian Hartmann 2015-06-16 13:10 ` Fwd: " Christian Hartmann 2015-06-16 14:47 ` Charles Keepax 2015-06-22 9:55 ` Christian Hartmann 2015-06-22 12:00 ` Charles Keepax 2015-06-24 8:48 ` Charles Keepax
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.