diff mbox

Intel SST and HP ElitePad 1000 G2

Message ID 6A230045C5A9854B97A1D40971AC8BE1023ACE601C@NTMBOX.central.cirsa.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jorge Fernandez Monteagudo Nov. 23, 2015, 3:13 p.m. UTC
Hi,

I've been able to get the audio working in the HP ElitePad 1000G2 tablet.
Attached the patch I've used in a 4.2.5 to get it working.

Basically in this tablet the rt5640 realtek audio codec is identified with
INTCCFFD. I don't know how to share 'byt-rt5640.c' with two identifiers
because I had to change:

@@ -186,7 +194,7 @@
 		.stream_name = "Audio",
 		.cpu_dai_name = "baytrail-pcm-audio",
 		.codec_dai_name = "rt5640-aif1",
-		.codec_name = "i2c-10EC5640:00",
+		.codec_name = "i2c-INTCCFFD:00",
 		.platform_name = "baytrail-pcm-audio",
 		.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
 			   SND_SOC_DAIFMT_CBS_CFS,

but the correct will be to two both of them.

Regards

Comments

Pierre-Louis Bossart Nov. 23, 2015, 5:02 p.m. UTC | #1
On 11/23/15 9:13 AM, Jorge Fernandez Monteagudo wrote:
> Hi,
>
> I've been able to get the audio working in the HP ElitePad 1000G2 tablet.
> Attached the patch I've used in a 4.2.5 to get it working.

Thanks for sharing and good to hear that you have audio working. I have 
no idea why BIOS folks keep inventing new (and illegal) ACPI _HID values...

We may need to use the same tricks as in sst-acpi to find out which 
string to use for .codec_name based on which _HID is handled by the ACPI 
subsystem instead of a hard-coded value.

Note that we are trying to move away from this older driver to a newer 
one based on DPCM that would also support BYT-CR devices and MinnowMax 
Board. It's not ready yet for upstream but if you want to add those 
changes to the newer version and test it'd be great. See 
https://github.com/plbossart/sound.git t100-v4.3-24bit and matching UCM 
files at https://github.com/plbossart/UCM

>
> Basically in this tablet the rt5640 realtek audio codec is identified with
> INTCCFFD. I don't know how to share 'byt-rt5640.c' with two identifiers
> because I had to change:
>
> @@ -186,7 +194,7 @@
>   		.stream_name = "Audio",
>   		.cpu_dai_name = "baytrail-pcm-audio",
>   		.codec_dai_name = "rt5640-aif1",
> -		.codec_name = "i2c-10EC5640:00",
> +		.codec_name = "i2c-INTCCFFD:00",
>   		.platform_name = "baytrail-pcm-audio",
>   		.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
>   			   SND_SOC_DAIFMT_CBS_CFS,
>
> but the correct will be to two both of them.
>
> Regards
>
> ________________________________________
> From: alsa-devel-bounces@alsa-project.org [alsa-devel-bounces@alsa-project.org] On Behalf Of Jorge Fernandez Monteagudo [jorgefm@cirsa.com]
> Sent: Friday, November 20, 2015 4:27 PM
> To: alsa-devel@alsa-project.org
> Subject: [alsa-devel] Intel SST and HP ElitePad 1000 G2
>
> Hi,
>
> This is my first email in this list, and my last chance to make my tablet
> audio system work
>
> I'm trying to get my tablet audio system working but I'm run out of ideas.
> The HP ElitePad 1000 G2 it's an Atom Z3795 1.60GHz Bay Trail-T tablet.
>
> I'm using a kernel 4.2.5 with all the SST configs enabled:
>
> CONFIG_SND_SST_MFLD_PLATFORM=m
> CONFIG_SND_SST_IPC=m
> CONFIG_SND_SST_IPC_ACPI=m
> CONFIG_SND_SOC_INTEL_SST=m
> CONFIG_SND_SOC_INTEL_SST_ACPI=m
> CONFIG_SND_SOC_INTEL_HASWELL=m
> CONFIG_SND_SOC_INTEL_BAYTRAIL=m
> CONFIG_SND_SOC_INTEL_HASWELL_MACH=m
> CONFIG_SND_SOC_INTEL_BYT_RT5640_MACH=m
> CONFIG_SND_SOC_INTEL_BYT_MAX98090_MACH=m
> CONFIG_SND_SOC_INTEL_BROADWELL_MACH=m
> CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m
> CONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH=m
> CONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH=m
> CONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH=m
> # CONFIG_SND_SOC_QCOM is not set
> # CONFIG_SND_SOC_XTFPGA_I2S is not set
> CONFIG_SND_SOC_I2C_AND_SPI=m
>
> I've follow the same steps as the installation for Asus T100TA
> https://wiki.debian.org/InstallingDebianOn/Asus/T100TA
>
> and finally I only get the dmesg traces:
>
> sst-acpi 80860F28:00: No matching ASoC machine driver found
> intel-sst-acpi 80860F28:00: No matching machine driver found
>
>  From the 'dsdt.dsl' I can see:
>
>          Device (I2C2)
>          {
>              Name (_ADR, Zero)  // _ADR: Address
>              Name (_HID, "80860F41" /* Intel Baytrail I2C Host Controller */)  // _HID: Hardware ID
>              Name (_CID, "80860F41" /* Intel Baytrail I2C Host Controller */)  // _CID: Compatible ID
>              Name (_DEP, Package (0x01)  // _DEP: Dependencies
>              {
>                  PEPD
>              })
>              Name (_DDN, "Intel(R) I2C Controller #2 - 80860F42")  // _DDN: DOS Device Name
>              Name (_UID, 0x02)  // _UID: Unique ID
>              Name (RBUF, ResourceTemplate ()
>              {
>                  Memory32Fixed (ReadWrite,
>                      0x00000000,         // Address Base
>                      0x00001000,         // Address Length
>                      _Y12)
>                  Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
>                  {
>                      0x00000021,
>                  }
>                  FixedDMA (0x0012, 0x0002, Width32bit, )
>                  FixedDMA (0x0013, 0x0003, Width32bit, )
>              })
>              Method (_HRV, 0, NotSerialized)  // _HRV: Hardware Revision
>              {
>                  Return (SOCS) /* \SOCS */
>              }
>
>              Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
>              {
>                  CreateDWordField (RBUF, \_SB.I2C2._Y12._BAS, B0BA)  // _BAS: Base Address
>                  CreateDWordField (RBUF, \_SB.I2C2._Y12._LEN, B0LN)  // _LEN: Length
>                  Store (I20A, B0BA) /* \_SB_.I2C2._CRS.B0BA */
>                  Store (I20L, B0LN) /* \_SB_.I2C2._CRS.B0LN */
>                  Return (RBUF) /* \_SB_.I2C2.RBUF */
>              }
>
>              Method (_STA, 0, NotSerialized)  // _STA: Status
>              {
>                  If (LOr (LEqual (I20A, Zero), LEqual (L22D, One)))
>                  {
>                      Return (Zero)
>                  }
>
>                  Return (0x0F)
>              }
>
>              Method (_PS3, 0, NotSerialized)  // _PS3: Power State 3
>              {
>                  Or (PSAT, 0x03, PSAT) /* \_SB_.I2C2.PSAT */
>                  Or (PSAT, Zero, PSAT) /* \_SB_.I2C2.PSAT */
>              }
>
>              Method (_PS0, 0, NotSerialized)  // _PS0: Power State 0
>              {
>                  And (PSAT, 0xFFFFFFFC, PSAT) /* \_SB_.I2C2.PSAT */
>                  Or (PSAT, Zero, PSAT) /* \_SB_.I2C2.PSAT */
>              }
>
>              OperationRegion (KEYS, SystemMemory, I21A, 0x0100)
>              Field (KEYS, DWordAcc, NoLock, WriteAsZeros)
>              {
>                  Offset (0x84),
>                  PSAT,   32
>              }
>
>              Device (RTEK)
>              {
>                  Name (_ADR, Zero)  // _ADR: Address
>                  Name (_HID, "INTCCFFD")  // _HID: Hardware ID
>                  Name (_CID, "INTCCFFD")  // _CID: Compatible ID
>                  Name (_DDN, "RTEK Codec Controller ")  // _DDN: DOS Device Name
>                  Name (_UID, 0x02)  // _UID: Unique ID
>                  Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
>                  {
>                      Name (SBUF, ResourceTemplate ()
>                      {
>                          I2cSerialBus (0x001C, ControllerInitiated, 0x00061A80,
>                              AddressingMode7Bit, "\\_SB.I2C2",
>                              0x00, ResourceConsumer, ,
>                              )
>                          GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 0x0000,
>                              "\\_SB.GPO2", 0x00, ResourceConsumer, ,
>                              )
>                              {   // Pin list
>                                  0x000E
>                              }
>                          GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 0x0000,
>                              "\\_SB.GPO0", 0x00, ResourceConsumer, ,
>                              )
>                              {   // Pin list
>                                  0x0003
>                              }
>                          GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 0x0000,
>                              "\\_SB.GPO0", 0x00, ResourceConsumer, ,
>                              )
>                              {   // Pin list
>                                  0x0000
>                              }
>                          GpioIo (Shared, PullDefault, 0x0000, 0x0000, IoRestrictionInputOnly,
>                              "\\_SB.GPO2", 0x00, ResourceConsumer, ,
>                              )
>                              {   // Pin list
>                                  0x000E
>                              }
>                          GpioIo (Shared, PullDefault, 0x0000, 0x0000, IoRestrictionInputOnly,
>                              "\\_SB.GPO0", 0x00, ResourceConsumer, ,
>                              )
>                              {   // Pin list
>                                  0x0003,
>                                  0x0000
>                              }
>                      })
>                      Return (SBUF) /* \_SB_.I2C2.RTEK._CRS.SBUF */
>                  }
>
> What am I missing? I suppose I need some changes in the kernel sources but I don't know
> where to start. Any help is welcome
>
> Regards,
> Jorge
>
> Este mensaje se dirige exclusivamente a su destinatario y puede contener información privilegiada o CONFIDENCIAL. Si no es vd. el destinatario indicado, queda notificado de que la utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.
>
> This message is intended exclusively for its addressee and may contain information that is CONFIDENTIAL and protected by professional privilege.
> If you are not the intended recipient you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited by law. If this message has been received in error, please immediately notify us via e-mail and delete it.
> _______________________________________________
> 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
>
Jorge Fernandez Monteagudo Nov. 24, 2015, 9:49 a.m. UTC | #2
Hi Pierre-Louis,

I've download your t100-v4.3-24bit branch, then I've patched it with my changes
and I've deployed it in the tablet. I've copied the bytcr-rt5640 from UCM master
branch in the /usr/share/alsa/ucm tablet directory, but after rebooting I have no
sound.

Attached you can find the dmesg log and the .config used to generate the kernel,
maybe any option has to be enabled...

Regards,
Jorge
Pierre-Louis Bossart Nov. 24, 2015, 3:19 p.m. UTC | #3
> I've download your t100-v4.3-24bit branch, then I've patched it with my changes
> and I've deployed it in the tablet. I've copied the bytcr-rt5640 from UCM master
> branch in the /usr/share/alsa/ucm tablet directory, but after rebooting I have no
> sound.
>
> Attached you can find the dmesg log and the .config used to generate the kernel,
> maybe any option has to be enabled...

the .config looks problematic, you can't have both haswell/broadwell 
enabled at the same time. I only have these options defined:

CONFIG_SND_SST_MFLD_PLATFORM=m
CONFIG_SND_SST_IPC=m
CONFIG_SND_SST_IPC_ACPI=m
CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m

Also make sure you have a 'recent' /lib/firmware.

>
> Regards,
> Jorge
> ________________________________________
> From: Pierre-Louis Bossart [pierre-louis.bossart@linux.intel.com]
> Sent: Monday, November 23, 2015 6:02 PM
> To: Jorge Fernandez Monteagudo; alsa-devel@alsa-project.org
> Subject: Re: [alsa-devel] Intel SST and HP ElitePad 1000 G2
>
> On 11/23/15 9:13 AM, Jorge Fernandez Monteagudo wrote:
>> Hi,
>>
>> I've been able to get the audio working in the HP ElitePad 1000G2 tablet.
>> Attached the patch I've used in a 4.2.5 to get it working.
>
> Thanks for sharing and good to hear that you have audio working. I have
> no idea why BIOS folks keep inventing new (and illegal) ACPI _HID values...
>
> We may need to use the same tricks as in sst-acpi to find out which
> string to use for .codec_name based on which _HID is handled by the ACPI
> subsystem instead of a hard-coded value.
>
> Note that we are trying to move away from this older driver to a newer
> one based on DPCM that would also support BYT-CR devices and MinnowMax
> Board. It's not ready yet for upstream but if you want to add those
> changes to the newer version and test it'd be great. See
> https://github.com/plbossart/sound.git t100-v4.3-24bit and matching UCM
> files at https://github.com/plbossart/UCM
>
>>
>> Basically in this tablet the rt5640 realtek audio codec is identified with
>> INTCCFFD. I don't know how to share 'byt-rt5640.c' with two identifiers
>> because I had to change:
>>
>> @@ -186,7 +194,7 @@
>>                .stream_name = "Audio",
>>                .cpu_dai_name = "baytrail-pcm-audio",
>>                .codec_dai_name = "rt5640-aif1",
>> -             .codec_name = "i2c-10EC5640:00",
>> +             .codec_name = "i2c-INTCCFFD:00",
>>                .platform_name = "baytrail-pcm-audio",
>>                .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
>>                           SND_SOC_DAIFMT_CBS_CFS,
>>
>> but the correct will be to two both of them.
>>
>> Regards
>>
>> ________________________________________
>> From: alsa-devel-bounces@alsa-project.org [alsa-devel-bounces@alsa-project.org] On Behalf Of Jorge Fernandez Monteagudo [jorgefm@cirsa.com]
>> Sent: Friday, November 20, 2015 4:27 PM
>> To: alsa-devel@alsa-project.org
>> Subject: [alsa-devel] Intel SST and HP ElitePad 1000 G2
>>
>> Hi,
>>
>> This is my first email in this list, and my last chance to make my tablet
>> audio system work
>>
>> I'm trying to get my tablet audio system working but I'm run out of ideas.
>> The HP ElitePad 1000 G2 it's an Atom Z3795 1.60GHz Bay Trail-T tablet.
>>
>> I'm using a kernel 4.2.5 with all the SST configs enabled:
>>
>> CONFIG_SND_SST_MFLD_PLATFORM=m
>> CONFIG_SND_SST_IPC=m
>> CONFIG_SND_SST_IPC_ACPI=m
>> CONFIG_SND_SOC_INTEL_SST=m
>> CONFIG_SND_SOC_INTEL_SST_ACPI=m
>> CONFIG_SND_SOC_INTEL_HASWELL=m
>> CONFIG_SND_SOC_INTEL_BAYTRAIL=m
>> CONFIG_SND_SOC_INTEL_HASWELL_MACH=m
>> CONFIG_SND_SOC_INTEL_BYT_RT5640_MACH=m
>> CONFIG_SND_SOC_INTEL_BYT_MAX98090_MACH=m
>> CONFIG_SND_SOC_INTEL_BROADWELL_MACH=m
>> CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m
>> CONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH=m
>> CONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH=m
>> CONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH=m
>> # CONFIG_SND_SOC_QCOM is not set
>> # CONFIG_SND_SOC_XTFPGA_I2S is not set
>> CONFIG_SND_SOC_I2C_AND_SPI=m
>>
>> I've follow the same steps as the installation for Asus T100TA
>> https://wiki.debian.org/InstallingDebianOn/Asus/T100TA
>>
>> and finally I only get the dmesg traces:
>>
>> sst-acpi 80860F28:00: No matching ASoC machine driver found
>> intel-sst-acpi 80860F28:00: No matching machine driver found
>>
>>   From the 'dsdt.dsl' I can see:
>>
>>           Device (I2C2)
>>           {
>>               Name (_ADR, Zero)  // _ADR: Address
>>               Name (_HID, "80860F41" /* Intel Baytrail I2C Host Controller */)  // _HID: Hardware ID
>>               Name (_CID, "80860F41" /* Intel Baytrail I2C Host Controller */)  // _CID: Compatible ID
>>               Name (_DEP, Package (0x01)  // _DEP: Dependencies
>>               {
>>                   PEPD
>>               })
>>               Name (_DDN, "Intel(R) I2C Controller #2 - 80860F42")  // _DDN: DOS Device Name
>>               Name (_UID, 0x02)  // _UID: Unique ID
>>               Name (RBUF, ResourceTemplate ()
>>               {
>>                   Memory32Fixed (ReadWrite,
>>                       0x00000000,         // Address Base
>>                       0x00001000,         // Address Length
>>                       _Y12)
>>                   Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
>>                   {
>>                       0x00000021,
>>                   }
>>                   FixedDMA (0x0012, 0x0002, Width32bit, )
>>                   FixedDMA (0x0013, 0x0003, Width32bit, )
>>               })
>>               Method (_HRV, 0, NotSerialized)  // _HRV: Hardware Revision
>>               {
>>                   Return (SOCS) /* \SOCS */
>>               }
>>
>>               Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
>>               {
>>                   CreateDWordField (RBUF, \_SB.I2C2._Y12._BAS, B0BA)  // _BAS: Base Address
>>                   CreateDWordField (RBUF, \_SB.I2C2._Y12._LEN, B0LN)  // _LEN: Length
>>                   Store (I20A, B0BA) /* \_SB_.I2C2._CRS.B0BA */
>>                   Store (I20L, B0LN) /* \_SB_.I2C2._CRS.B0LN */
>>                   Return (RBUF) /* \_SB_.I2C2.RBUF */
>>               }
>>
>>               Method (_STA, 0, NotSerialized)  // _STA: Status
>>               {
>>                   If (LOr (LEqual (I20A, Zero), LEqual (L22D, One)))
>>                   {
>>                       Return (Zero)
>>                   }
>>
>>                   Return (0x0F)
>>               }
>>
>>               Method (_PS3, 0, NotSerialized)  // _PS3: Power State 3
>>               {
>>                   Or (PSAT, 0x03, PSAT) /* \_SB_.I2C2.PSAT */
>>                   Or (PSAT, Zero, PSAT) /* \_SB_.I2C2.PSAT */
>>               }
>>
>>               Method (_PS0, 0, NotSerialized)  // _PS0: Power State 0
>>               {
>>                   And (PSAT, 0xFFFFFFFC, PSAT) /* \_SB_.I2C2.PSAT */
>>                   Or (PSAT, Zero, PSAT) /* \_SB_.I2C2.PSAT */
>>               }
>>
>>               OperationRegion (KEYS, SystemMemory, I21A, 0x0100)
>>               Field (KEYS, DWordAcc, NoLock, WriteAsZeros)
>>               {
>>                   Offset (0x84),
>>                   PSAT,   32
>>               }
>>
>>               Device (RTEK)
>>               {
>>                   Name (_ADR, Zero)  // _ADR: Address
>>                   Name (_HID, "INTCCFFD")  // _HID: Hardware ID
>>                   Name (_CID, "INTCCFFD")  // _CID: Compatible ID
>>                   Name (_DDN, "RTEK Codec Controller ")  // _DDN: DOS Device Name
>>                   Name (_UID, 0x02)  // _UID: Unique ID
>>                   Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
>>                   {
>>                       Name (SBUF, ResourceTemplate ()
>>                       {
>>                           I2cSerialBus (0x001C, ControllerInitiated, 0x00061A80,
>>                               AddressingMode7Bit, "\\_SB.I2C2",
>>                               0x00, ResourceConsumer, ,
>>                               )
>>                           GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 0x0000,
>>                               "\\_SB.GPO2", 0x00, ResourceConsumer, ,
>>                               )
>>                               {   // Pin list
>>                                   0x000E
>>                               }
>>                           GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 0x0000,
>>                               "\\_SB.GPO0", 0x00, ResourceConsumer, ,
>>                               )
>>                               {   // Pin list
>>                                   0x0003
>>                               }
>>                           GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 0x0000,
>>                               "\\_SB.GPO0", 0x00, ResourceConsumer, ,
>>                               )
>>                               {   // Pin list
>>                                   0x0000
>>                               }
>>                           GpioIo (Shared, PullDefault, 0x0000, 0x0000, IoRestrictionInputOnly,
>>                               "\\_SB.GPO2", 0x00, ResourceConsumer, ,
>>                               )
>>                               {   // Pin list
>>                                   0x000E
>>                               }
>>                           GpioIo (Shared, PullDefault, 0x0000, 0x0000, IoRestrictionInputOnly,
>>                               "\\_SB.GPO0", 0x00, ResourceConsumer, ,
>>                               )
>>                               {   // Pin list
>>                                   0x0003,
>>                                   0x0000
>>                               }
>>                       })
>>                       Return (SBUF) /* \_SB_.I2C2.RTEK._CRS.SBUF */
>>                   }
>>
>> What am I missing? I suppose I need some changes in the kernel sources but I don't know
>> where to start. Any help is welcome
>>
>> Regards,
>> Jorge
>>
>> Este mensaje se dirige exclusivamente a su destinatario y puede contener información privilegiada o CONFIDENCIAL. Si no es vd. el destinatario indicado, queda notificado de que la utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.
>>
>> This message is intended exclusively for its addressee and may contain information that is CONFIDENTIAL and protected by professional privilege.
>> If you are not the intended recipient you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited by law. If this message has been received in error, please immediately notify us via e-mail and delete it.
>> _______________________________________________
>> 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
>>
>
ZH Tu Nov. 25, 2015, 12:45 a.m. UTC | #4
The Braswell/CherryTrail SST firmware from  http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git -b BSW   is for SSP2.

Can anyone make an variant of SST firmware for SSP0? 

Thanks


ZH Tu
Jorge Fernandez Monteagudo Nov. 25, 2015, 8:49 a.m. UTC | #5
Hi,

I've generated a new kernel, a 4.3.0, only with 

CONFIG_SND_SST_MFLD_PLATFORM=m
CONFIG_SND_SST_IPC=m
CONFIG_SND_SST_IPC_ACPI=m
CONFIG_SND_SOC_INTEL_SST=m
CONFIG_SND_SOC_INTEL_SST_ACPI=m
CONFIG_SND_SOC_INTEL_BAYTRAIL=m
CONFIG_SND_SOC_INTEL_BYT_MAX98090_MACH=m
CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m
CONFIG_SND_SOC_I2C_AND_SPI=m

and I've downloaded the firmware this repository (I don't know this git is the official one)
from http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git

But I have no audio. The firmware is loaded, I see this traces

[    4.013712] baytrail-pcm-audio baytrail-pcm-audio: FW version: 04.05.13.a0
[    4.013714] baytrail-pcm-audio baytrail-pcm-audio: Build type: a0
[    4.013716] baytrail-pcm-audio baytrail-pcm-audio: Build date: Apr  2 2014 14:14:39

but the mapping is not done. In the 4.2.5 kernel I see

[    4.256939] byt-rt5640 byt-rt5640: rt5640-aif1 <-> baytrail-pcm-audio mapping ok

Both attached.

Another problem. In the working 4.2.5 kernel, when I run my application, a game which
plays sounds, in a few minutes the system is totally frozen, in some cases, with a sound
looping endlessly. I'm trying to get a kernel trace to debug this situation... Any hint is welcome!

Regards
Pierre-Louis Bossart Nov. 25, 2015, 2:40 p.m. UTC | #6
On 11/25/15 2:49 AM, Jorge Fernandez Monteagudo wrote:
> Hi,
>
> I've generated a new kernel, a 4.3.0, only with
>
> CONFIG_SND_SST_MFLD_PLATFORM=m
> CONFIG_SND_SST_IPC=m
> CONFIG_SND_SST_IPC_ACPI=m
> CONFIG_SND_SOC_INTEL_SST=m
> CONFIG_SND_SOC_INTEL_SST_ACPI=m
> CONFIG_SND_SOC_INTEL_BAYTRAIL=m
> CONFIG_SND_SOC_INTEL_BYT_MAX98090_MACH=m
> CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m
> CONFIG_SND_SOC_I2C_AND_SPI=m
>
> and I've downloaded the firmware this repository (I don't know this git is the official one)
> from http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git
>
> But I have no audio. The firmware is loaded, I see this traces
>
> [    4.013712] baytrail-pcm-audio baytrail-pcm-audio: FW version: 04.05.13.a0
> [    4.013714] baytrail-pcm-audio baytrail-pcm-audio: Build type: a0
> [    4.013716] baytrail-pcm-audio baytrail-pcm-audio: Build date: Apr  2 2014 14:14:39
>
> but the mapping is not done. In the 4.2.5 kernel I see
>
> [    4.256939] byt-rt5640 byt-rt5640: rt5640-aif1 <-> baytrail-pcm-audio mapping ok

You are mixing two incompatible options that result in a broken 
configuration. this message is for the 'old' machine driver. Use only

CONFIG_SND_SST_MFLD_PLATFORM=m
CONFIG_SND_SST_IPC=m
CONFIG_SND_SST_IPC_ACPI=m
CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m

as I mentioned.

I tried to add a mutually exclusive choice but menuconfig complains 
about circular dependencies, need to find a better way of handling these 
two drivers so that they can't be enabled at the same time
Jorge Fernandez Monteagudo Nov. 26, 2015, 7:43 a.m. UTC | #7
Hi,

I've regenerated from clean state the 4.3.0 but still no sound. Attached
dmesg, lsmod and .config used.

From dmesg I can see

[    4.357803] intel_sst_acpi 80860F28:00: No matching machine driver found

I think this kernel branch it's not well suited for the i915 graphic driver. I get
some kernel warning that I don't see in 4.2.5. The freeze I'm seeing it's
related to the graphic driver not the audio.

________________________________________
From: Pierre-Louis Bossart [pierre-louis.bossart@linux.intel.com]

Sent: Wednesday, November 25, 2015 3:40 PM
To: Jorge Fernandez Monteagudo; alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] Intel SST and HP ElitePad 1000 G2

On 11/25/15 2:49 AM, Jorge Fernandez Monteagudo wrote:
> Hi,

>

> I've generated a new kernel, a 4.3.0, only with

>

> CONFIG_SND_SST_MFLD_PLATFORM=m

> CONFIG_SND_SST_IPC=m

> CONFIG_SND_SST_IPC_ACPI=m

> CONFIG_SND_SOC_INTEL_SST=m

> CONFIG_SND_SOC_INTEL_SST_ACPI=m

> CONFIG_SND_SOC_INTEL_BAYTRAIL=m

> CONFIG_SND_SOC_INTEL_BYT_MAX98090_MACH=m

> CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m

> CONFIG_SND_SOC_I2C_AND_SPI=m

>

> and I've downloaded the firmware this repository (I don't know this git is the official one)

> from http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git

>

> But I have no audio. The firmware is loaded, I see this traces

>

> [    4.013712] baytrail-pcm-audio baytrail-pcm-audio: FW version: 04.05.13.a0

> [    4.013714] baytrail-pcm-audio baytrail-pcm-audio: Build type: a0

> [    4.013716] baytrail-pcm-audio baytrail-pcm-audio: Build date: Apr  2 2014 14:14:39

>

> but the mapping is not done. In the 4.2.5 kernel I see

>

> [    4.256939] byt-rt5640 byt-rt5640: rt5640-aif1 <-> baytrail-pcm-audio mapping ok


You are mixing two incompatible options that result in a broken
configuration. this message is for the 'old' machine driver. Use only

CONFIG_SND_SST_MFLD_PLATFORM=m
CONFIG_SND_SST_IPC=m
CONFIG_SND_SST_IPC_ACPI=m
CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m

as I mentioned.

I tried to add a mutually exclusive choice but menuconfig complains
about circular dependencies, need to find a better way of handling these
two drivers so that they can't be enabled at the same time

Este mensaje se dirige exclusivamente a su destinatario y puede contener información privilegiada o CONFIDENCIAL. Si no es vd. el destinatario indicado, queda notificado de que la utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.

This message is intended exclusively for its addressee and may contain information that is CONFIDENTIAL and protected by professional privilege.
If you are not the intended recipient you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited by law. If this message has been received in error, please immediately notify us via e-mail and delete it.
Pierre-Louis Bossart Nov. 26, 2015, 4:35 p.m. UTC | #8
On 11/26/2015 01:43 AM, Jorge Fernandez Monteagudo wrote:
> Hi,
> 
> I've regenerated from clean state the 4.3.0 but still no sound. Attached
> dmesg, lsmod and .config used.
> 
> From dmesg I can see
> 
> [    4.357803] intel_sst_acpi 80860F28:00: No matching machine driver found

It's probably that you didn't re-add the weird HID in the sst_acpi.c file as you did previously.
If you want to send me your patches (offlist) i can take a look and merge them
with my soon-to-be-submitted ones.

> I think this kernel branch it's not well suited for the i915 graphic driver. I get
> some kernel warning that I don't see in 4.2.5. The freeze I'm seeing it's
> related to the graphic driver not the audio.

4.3 works fine for me, and all this code can be back-ported to 4.2 if need be.
Pierre-Louis Bossart Nov. 26, 2015, 5:15 p.m. UTC | #9
On 11/26/2015 10:35 AM, Pierre-Louis Bossart wrote:
> On 11/26/2015 01:43 AM, Jorge Fernandez Monteagudo wrote:
>> Hi,
>>
>> I've regenerated from clean state the 4.3.0 but still no sound. Attached
>> dmesg, lsmod and .config used.
>>
>> From dmesg I can see
>>
>> [    4.357803] intel_sst_acpi 80860F28:00: No matching machine driver found

Ironically I just came across the same problem on the Asus TOOTAF which uses 10EC5642 as the _HID, Asus T100TA used 10EC5640. This HID was listed in the codec driver but not in the sst_acpi table so no machine driver loaded. Sounds like we will fix two platforms at once..
diff mbox

Patch

diff -uNr orig/sound/soc/codecs/rt5640.c linux-4.2.5/sound/soc/codecs/rt5640.c
--- orig/sound/soc/codecs/rt5640.c	2015-10-27 01:53:59.000000000 +0100
+++ linux-4.2.5/sound/soc/codecs/rt5640.c	2015-11-23 12:07:01.555969187 +0100
@@ -2159,6 +2159,7 @@ 
 	{ "INT33CA", 0 },
 	{ "10EC5640", 0 },
 	{ "10EC5642", 0 },
+	{ "INTCCFFD", 0 },
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, rt5640_acpi_match);
diff -uNr orig/sound/soc/intel/boards/byt-rt5640.c linux-4.2.5/sound/soc/intel/boards/byt-rt5640.c
--- orig/sound/soc/intel/boards/byt-rt5640.c	2015-10-27 01:53:59.000000000 +0100
+++ linux-4.2.5/sound/soc/intel/boards/byt-rt5640.c	2015-11-23 15:26:44.507653835 +0100
@@ -125,6 +125,14 @@ 
 		.driver_data = (unsigned long *)(BYT_RT5640_DMIC2_MAP |
 						 BYT_RT5640_DMIC_EN),
 	},
+	{
+		.callback = byt_rt5640_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "HP ElitePad 1000 G2"),
+		},
+		.driver_data = (unsigned long *)BYT_RT5640_IN1_MAP,
+	},
 	{}
 };
 
@@ -186,7 +194,7 @@ 
 		.stream_name = "Audio",
 		.cpu_dai_name = "baytrail-pcm-audio",
 		.codec_dai_name = "rt5640-aif1",
-		.codec_name = "i2c-10EC5640:00",
+		.codec_name = "i2c-INTCCFFD:00",
 		.platform_name = "baytrail-pcm-audio",
 		.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
 			   SND_SOC_DAIFMT_CBS_CFS,
diff -uNr orig/sound/soc/intel/common/sst-acpi.c linux-4.2.5/sound/soc/intel/common/sst-acpi.c
--- orig/sound/soc/intel/common/sst-acpi.c	2015-10-27 01:53:59.000000000 +0100
+++ linux-4.2.5/sound/soc/intel/common/sst-acpi.c	2015-11-23 12:09:37.735001979 +0100
@@ -249,6 +249,7 @@ 
 static struct sst_acpi_mach baytrail_machines[] = {
 	{ "10EC5640", "byt-rt5640", "intel/fw_sst_0f28.bin-48kHz_i2s_master" },
 	{ "193C9890", "byt-max98090", "intel/fw_sst_0f28.bin-48kHz_i2s_master" },
+	{ "INTCCFFD", "byt-rt5640", "intel/fw_sst_0f28.bin-48kHz_i2s_master" },
 	{}
 };