alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* baytrail-pcm-audio: audio broken on Lenovo Thinkpad Tablet 10
@ 2015-02-17  6:24 Sebastien Bourdeauducq
  2015-02-18 14:51 ` Jarkko Nikula
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Bourdeauducq @ 2015-02-17  6:24 UTC (permalink / raw)
  To: alsa-devel

Hi,

the Thinkpad Tablet 10 has an impressive amount of problems under Linux, 
among which the audio is completely broken.

The kernel log is:
[    7.532413] rt5640 i2c-10EC5640:00: Device with ID register 6271 is 
not rt5640/39
[    7.908208] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio 
not registered
[    7.908231] platform byt-rt5640: Driver byt-rt5640 requests probe 
deferral
[    7.931549] baytrail-pcm-audio baytrail-pcm-audio: error: invalid DMA 
engine 0
[    7.931557] baytrail-pcm-audio baytrail-pcm-audio: sst_dma_new failed -22
[    7.967040] baytrail-pcm-audio baytrail-pcm-audio: FW version: 
04.05.13.a0
[    7.967047] baytrail-pcm-audio baytrail-pcm-audio: Build type: a0
[    7.967051] baytrail-pcm-audio baytrail-pcm-audio: Build date: Apr  2 
2014 14:14:39
[    7.967212] byt-rt5640 byt-rt5640: ASoC: CODEC DAI rt5640-aif1 not 
registered
[    7.967248] platform byt-rt5640: Driver byt-rt5640 requests probe 
deferral

I'm running kernel 3.19 with the latest firmware from the linux-firmware 
repository.

Sebastien

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

* Re: baytrail-pcm-audio: audio broken on Lenovo Thinkpad Tablet 10
  2015-02-17  6:24 baytrail-pcm-audio: audio broken on Lenovo Thinkpad Tablet 10 Sebastien Bourdeauducq
@ 2015-02-18 14:51 ` Jarkko Nikula
       [not found]   ` <54E77B97.9050506@m-labs.hk>
  0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Nikula @ 2015-02-18 14:51 UTC (permalink / raw)
  To: Sebastien Bourdeauducq, alsa-devel
  Cc: oder_chiou@realtek.com >> Oder Chiou, Bard Liao

Hi

On 02/17/2015 08:24 AM, Sebastien Bourdeauducq wrote:
> Hi,
>
> the Thinkpad Tablet 10 has an impressive amount of problems under Linux,
> among which the audio is completely broken.
>
> The kernel log is:
> [    7.532413] rt5640 i2c-10EC5640:00: Device with ID register 6271 is
> not rt5640/39

Bard, Oder: Is this codec even from RT564x family? To me it looks RT567x 
based on RT5670_DEVICE_ID 0x6271 in sound/soc/codecs/rt5670.c.

At least sound/soc/codecs/rt5640.c: rt5640_i2c_probe() appears to find 
above same value 0x6271 from the register RT5640_VENDOR_ID2.

If that's the case then one might want to ask Lenovo why they are using 
completely wrong ACPI ID for the codec.

-- 
Jarkko

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

* Re: baytrail-pcm-audio: audio broken on Lenovo Thinkpad Tablet 10
       [not found]     ` <54EB240C.5020105@linux.intel.com>
@ 2015-03-30 14:19       ` Sébastien Bourdeauducq
  0 siblings, 0 replies; 3+ messages in thread
From: Sébastien Bourdeauducq @ 2015-03-30 14:19 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: alsa-devel

Hi,

On 02/23/2015 08:58 PM, Jarkko Nikula wrote:
>> Is there a way I can try sound/soc/codecs/rt5670.c instead? I edited it
>> so that it attaches to my ACPI ID (and rt5640 doesn't), but that did not
>> work. I noticed that the kernel has some Baytrail-specific modules for
>> RT564x, and I guess those would need to be changed as well - but it's
>> not straightforward.
>>
> Basically three changes are needed:
> 
> 1. Hack add "10EC5640" to rt5670.c as you have done
> 2. Add a new machine driver sound/soc/intel/sst-acpi.c/byt-rt5670
>    I guess cht_bsw_rt5672.c can be used as a starting point for audio
>    routes and byt-rt5640.c for dai link definitions.mess
> 3. Hack change sound/soc/intel/sst-acpi.c so that "10EC5640" loads
>    the new machine driver instead of byt-rt5640.

Thanks. I did that and I get the following in the kernel log:
[    6.831422] byt-rt5670 byt-rt5670: ASoC: CPU DAI baytrail-pcm-audio
not regis
tered
[    6.831443] byt-rt5670 byt-rt5670: snd_soc_register_card failed -517
[    6.831453] platform byt-rt5670: Driver byt-rt5670 requests probe
deferral

[    6.884013] baytrail-pcm-audio baytrail-pcm-audio: error: invalid DMA
engine
0
[    6.884023] baytrail-pcm-audio baytrail-pcm-audio: sst_dma_new failed -22


Note: it seems to me that all Baytrail machines will have this "error:
invalid DMA engine" message. AFAICT it is emitted from sst-firmware.c
because sst->pdata->dma_engine is 0 and in sst-acpi.c the function
sst_acpi_probe does not set it for Baytrail because resindex_dma_base is
-1 in sst_acpi_baytrail_desc.

[    6.924094] baytrail-pcm-audio baytrail-pcm-audio: FW version:
04.05.13.a0
[    6.924106] baytrail-pcm-audio baytrail-pcm-audio: Build type: a0
[    6.924109] baytrail-pcm-audio baytrail-pcm-audio: Build date: Apr  2
2014 14:14:39
[    6.931503] byt-rt5670 byt-rt5670: rt5670-aif1 <-> baytrail-pcm-audio
mapping ok
[    6.931624] byt-rt5670 byt-rt5670: ASoC: no source widget found for
ssp2 Tx
[    6.931629] byt-rt5670 byt-rt5670: ASoC: Failed to add route ssp2 Tx
-> direct -> AIF1 Playback
[    6.931636] byt-rt5670 byt-rt5670: ASoC: no source widget found for
codec_out0
[    6.931640] byt-rt5670 byt-rt5670: ASoC: Failed to add route
codec_out0 -> direct -> ssp2 Tx
[    6.931647] byt-rt5670 byt-rt5670: ASoC: no source widget found for
codec_out1
[    6.931650] byt-rt5670 byt-rt5670: ASoC: Failed to add route
codec_out1 -> direct -> ssp2 Tx
[    6.931656] byt-rt5670 byt-rt5670: ASoC: no source widget found for
ssp2 Rx
[    6.931660] byt-rt5670 byt-rt5670: ASoC: Failed to add route ssp2 Rx
-> direct -> codec_in0
[    6.931666] byt-rt5670 byt-rt5670: ASoC: no source widget found for
ssp2 Rx
[    6.931670] byt-rt5670 byt-rt5670: ASoC: Failed to add route ssp2 Rx
-> direct -> codec_in1
[    6.931677] byt-rt5670 byt-rt5670: ASoC: no sink widget found for ssp2 Rx
[    6.931680] byt-rt5670 byt-rt5670: ASoC: Failed to add route AIF1
Capture -> direct -> ssp2 Rx

My byt-rt5670 is there:
https://gist.github.com/sbourdeauducq/8c5da8ac0da13e21ee31

I have to say that I am unfamiliar with Intel SST and I'm don't quite
know what I am doing there. I wish sound devices were straightforward
DMA-to-DAC devices instead of this complicated DSP architecture which
AFAICT boils down to a glorified memcpy/resampler under Linux (this
seems to be a pattern with this SoC though; I had a look at how to get
the MIPI cameras to work on this machine and it's an even worse mess).

> However, above changes may not make audio working since there has been
> couple other new Baytrail based machines with correct codec but audio
> seems to not move between the DSP and codec chip.

Despite the error messages, the audio device is created and userspace
applications can send data into it, but no sound is coming out. I also
have to say that the settings in alsamixer are a terrible mess which
seems not to originate from my hacks.

> One assumption is if they use another SSP port than SSP2. Unfortunately
> it's difficult to test since Linux DSP FW is hard-coded for SSP2.

If only there were no DSP in the first place...

Sébastien

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

end of thread, other threads:[~2015-03-30 14:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-17  6:24 baytrail-pcm-audio: audio broken on Lenovo Thinkpad Tablet 10 Sebastien Bourdeauducq
2015-02-18 14:51 ` Jarkko Nikula
     [not found]   ` <54E77B97.9050506@m-labs.hk>
     [not found]     ` <54EB240C.5020105@linux.intel.com>
2015-03-30 14:19       ` Sébastien Bourdeauducq

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).