Bug 100361

Summary: Sound Card not recognized - Notion Ink Cain
Product: Drivers Reporter: Kevin (kevinjf)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: NEW ---    
Severity: normal CC: bernhard.mlecnik, jarkko.nikula, joel, pierre-louis.bossart, raziax.razia, sachinx.mokashi, szg00000, tiwai, vinod.koul, yang.jie
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: Linux NotionInk-Sonic 3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg
lspci
sys dir list
decompiled dsdt
lsmod
dmesg of 4.1 kernel
kernel config
added print log in driver file.
dmesg with patch kernel 4.2
config for kernel 4.2
output of alsa information script
kernel patch with sound drivers as modules
dmidecode output
firmware binary for baytrail board

Description Kevin 2015-06-23 10:22:16 UTC
Created attachment 180591 [details]
dmesg

Running in Ubuntu 15.04
No Sound card detected
Relevant dmesg

[    7.731468] baytrail-pcm-audio baytrail-pcm-audio: error: invalid DMA engine 0
[    7.731480] baytrail-pcm-audio baytrail-pcm-audio: sst_dma_new failed -22
[    7.957729] baytrail-pcm-audio baytrail-pcm-audio: ipc: error DSP boot timeout
[    7.958029] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
[    7.958065] platform byt-rt5640: Driver byt-rt5640 requests probe deferral


Other logs and dsdt attached.
Comment 1 Kevin 2015-06-23 10:22:39 UTC
Created attachment 180601 [details]
lspci
Comment 2 Kevin 2015-06-23 10:23:04 UTC
Created attachment 180611 [details]
sys dir list
Comment 3 Kevin 2015-06-23 10:23:31 UTC
Created attachment 180621 [details]
decompiled dsdt
Comment 4 Kevin 2015-06-23 10:23:48 UTC
Created attachment 180631 [details]
lsmod
Comment 5 Kevin 2015-06-24 04:36:48 UTC
Created attachment 180721 [details]
dmesg of 4.1 kernel

Dmesg after booting into 4.1 kernel with ubuntu patches - not rc


[    7.404271] i2c_designware 80860F41:03: i2c_dw_handle_tx_abort: lost arbitration
[    7.408430] dw_dmac INTL9C60:00: DesignWare DMA Controller, 8 channels
[    7.409119] dw_dmac INTL9C60:01: DesignWare DMA Controller, 8 channels
[    7.787505] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
[    7.809259] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
[    7.809593] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
[    8.021191] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
[    8.039259] (NULL device *): ipc: error DSP boot timeout
Comment 6 Kevin 2015-06-24 04:37:58 UTC
Created attachment 180731 [details]
kernel config

Kernel Config used for 4.1 kernel
Comment 7 razia 2015-08-11 11:04:01 UTC
As per the log messages it looks that 
resindex_dma_base is not set to -1. 

But in Baytrail it is set to -1.

check the value of resindex_dma_base in your case and update here.
Comment 8 Kevin 2015-08-12 04:14:10 UTC
Can you please describe the process by which I am able to check that value?  I don't have much experience with this; I'm sorry .
Comment 9 razia 2015-08-12 06:34:16 UTC
Created attachment 184701 [details]
added print log in driver file.
Comment 10 razia 2015-08-12 06:37:13 UTC
you can check it in 2 steps.
1. Browse through source code, in below file sound/soc/intel/common/sst-acpi.c
   here is the structure which define the values.
 
 static struct sst_acpi_desc sst_acpi_baytrail_desc = {
        .drv_name = "baytrail-pcm-audio",
        .machines = baytrail_machines,
        .resindex_lpe_base = 0,
        .resindex_pcicfg_base = 1,
        .resindex_fw_base = 2,
        .irqindex_host_ipc = 5,
        .sst_id = SST_DEV_ID_BYT,
        .resindex_dma_base = -1,
};

2. In your case if .resindex_dma_base = -1, in step 1 and then get the actual value of this variable by using attached patch file.
let me know the o/p of both the steps.
Comment 11 Kevin 2015-09-03 09:15:00 UTC
Created attachment 186621 [details]
dmesg with patch kernel 4.2

dmesg log after running with kernel 4.2
Comment 12 Vinod Koul 2015-09-03 09:15:28 UTC
Thanks for your email

I am out till 7th Seo with sporadic email access, I will get back to you after 7th Sep

Regards
--
~Vinod
Comment 13 Kevin 2015-09-03 09:15:30 UTC
Created attachment 186631 [details]
config for kernel 4.2
Comment 14 Vinod Koul 2015-09-03 09:16:03 UTC
Thanks for your email

I am out till 7th Sep with sporadic email access, I will get back to you after 7th Sep

Regards
--
~Vinod
Comment 15 Kevin 2015-09-03 09:19:03 UTC
Created attachment 186641 [details]
output of alsa information script
Comment 16 Kevin 2015-09-03 09:31:19 UTC
In 4.2 kernel, there seems to be a change. I now get the following:

[    3.373439] intel_sst_acpi 80860F28:00: LPE base: 0x90a00000 size:0x200000
[    3.373446] intel_sst_acpi 80860F28:00: IRAM base: 0x90ac0000
[    3.373467] intel_sst_acpi 80860F28:00: DRAM base: 0x90b00000
[    3.373476] intel_sst_acpi 80860F28:00: SHIM base: 0x90b40000
[    3.373490] intel_sst_acpi 80860F28:00: Mailbox base: 0x90b44000
[    3.373498] intel_sst_acpi 80860F28:00: DDR base: 0x20000000
[    3.374438] intel_sst_acpi 80860F28:00: Got drv data max stream 25
[    3.375464] intel_sst_acpi 80860F28:00: Direct firmware load for intel/fw_sst_0f28.bin failed with error -2
[    3.375472] intel_sst_acpi 80860F28:00: request fw failed
[    3.480039] bytt100_rt5640 bytt100_rt5640: snd-soc-dummy-dai <-> media-cpu-dai mapping ok
[    3.480094] compress asoc: snd-soc-dummy-dai <-> compress-cpu-dai mapping ok
[    3.480145] bytt100_rt5640 bytt100_rt5640: rt5640-aif1 <-> ssp2-port mapping ok
[    3.480239] bytt100_rt5640 bytt100_rt5640: Connecting non-supply widget to supply widget is not supported (Int Mic -> LDO2)
[    3.480418] bytt100_rt5640 bytt100_rt5640: ASoC: no dapm match for Int Mic --> (null) --> LDO2
[    3.480424] bytt100_rt5640 bytt100_rt5640: ASoC: Failed to add route Int Mic -> direct -> LDO2

...

[    3.793825] ALSA device list:
[    3.793836]   #0: baytrailcraudio

....

[    8.225177] genirq: Flags mismatch irq 8. 00000083 (volume_down) vs. 00000000 (rtc0)
[    8.225188] gpio-keys gpio-keys.0.auto: Unable to claim irq 8; error -16
[    8.225216] gpio-keys: probe of gpio-keys.0.auto failed with error -16
[    8.225412] input: gpio-keys as /devices/platform/gpio-keys.1.auto/input/input5

...

[   21.344448] intel_sst_acpi 80860F28:00: Wait timed-out condition:0x0, msg_id:0x0 fw_state 0x1
[   21.344458] intel_sst_acpi 80860F28:00: fw download failed -16
[   21.344471] intel_sst_acpi 80860F28:00: FW download fail -16
[   21.344833]  Baytrail Audio Port: ASoC: no backend DAIs enabled for Baytrail Audio Port
[   21.345188]  Baytrail Audio Port: ASoC: no backend DAIs enabled for Baytrail Audio Port
....
[   38.194082]  Baytrail Audio Port: ASoC: no backend DAIs enabled for Baytrail Audio Port

Can the IRQ conflicts causing any problem with the sound?
I got the alsa info script from alsa-project and have attached the output.
I also applied the alsa mixed settings from http://mailman.alsa-project.org/pipermail/alsa-devel/2015-June/094080.html , but still no sound.



@razia : Due to a stint with another os, i had to reinstall my old linux setup from scratch. In the new 4.2 kernel, .resindex_dma_base is still -1, and i added your patch, but no output was observed in the attached dmesg log.
Comment 17 Keyon 2015-09-06 00:26:53 UTC
Kevin, I guess you used built-in driver config. can you change to modularize to rebuild and try?
Comment 18 Kevin 2015-09-08 17:09:21 UTC
Created attachment 187081 [details]
kernel patch with sound drivers as modules
Comment 19 Vinod Koul 2015-09-08 17:09:53 UTC
Thanks for your email

I am out till 15th Sep with sporadic email access, I will get back to you after 15th Sep

Regards
--
~Vinod
Comment 20 Kevin 2015-09-08 17:11:19 UTC
Current log entries:

[    8.153054] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
...
[    8.268442] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
[    8.339067] baytrail-pcm-audio baytrail-pcm-audio: resindex_dma_base=-1
[    8.365005] SSE version of gcm_enc/dec engaged.
[    8.559759] baytrail-pcm-audio baytrail-pcm-audio: ipc: error DSP boot timeout
[    8.777668] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
Comment 21 Kevin 2015-10-08 11:20:54 UTC
Is there anything I could/must do? Is there any progress?
Comment 22 benno 2015-10-25 10:31:13 UTC
Hi, I would be also interested in a solution. Is still some body working on this?
Comment 23 Vinod Koul 2015-10-25 10:31:43 UTC
Thanks for your email

I am attending KS, so please expect delayed responses..

Regards
--
~Vinod
Comment 24 benno 2015-12-17 20:49:57 UTC
Hi Vinod, any update on this. I would be still interested in a fix, or any hints how to get sound. Would it work with a kernel 4.0+?
Thank you
Comment 25 Kevin 2016-02-24 04:43:02 UTC
Hi,
Is there any progress regarding this bug? Should I compile the new kernel and check?

Thanks
Kevin
Comment 26 Joel Holdsworth 2016-04-25 02:17:03 UTC
This issue is being handled in #117141.

Can you attach the output of dmidecode, so that the DMI system identification can be added to the quirk-table in fix patch-set attached to that bug?
Comment 27 Kevin 2016-04-26 03:39:00 UTC
Created attachment 214321 [details]
dmidecode output
Comment 28 Sachin Mokashi 2016-06-13 12:43:38 UTC
Created attachment 219741 [details]
firmware binary for baytrail board

Hi Kevin,

Looks like firmware binary is missing/invalid in /lib/firmware/intel/fw_sst_0f28.bin from the below logs:

[    3.375464] intel_sst_acpi 80860F28:00: Direct firmware load for intel/fw_sst_0f28.bin failed with error -2
[    3.375472] intel_sst_acpi 80860F28:00: request fw failed

Could you please check if the above binary is present in the directory mentioned. If not, please copy the attached firmware binary in /lib/firmware/intel/ and update the logs.
Comment 29 Pierre Bossart 2016-11-29 18:38:22 UTC
please try with more recent kernel and branch at https://github.com/plbossart/sound/commits/topic/v4.8-fixes