Bug 117271 - Regression: Sound lost when upgrading kernel from 4.4.x to 4.5.x on Asus T100TA
Summary: Regression: Sound lost when upgrading kernel from 4.4.x to 4.5.x on Asus T100TA
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-26 20:56 UTC by jbMacAZ
Modified: 2016-06-22 11:21 UTC (History)
6 users (show)

See Also:
Kernel Version: 4.5.x
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Alsa info for kernel 4.4.x (41.49 KB, text/plain)
2016-04-28 19:55 UTC, Lionel Dor
Details
Alsa info for 4.5.x (86.61 KB, text/plain)
2016-04-28 19:55 UTC, Lionel Dor
Details
URL for dmesg report (27 bytes, application/octet-stream)
2016-04-28 20:00 UTC, Lionel Dor
Details
Dmesg report for 4.4.x (17.59 KB, application/octet-stream)
2016-04-28 21:04 UTC, Lionel Dor
Details
URL for dmesg report 4.5.x kernel (72 bytes, application/octet-stream)
2016-04-28 22:01 UTC, Lionel Dor
Details
Dmesg report for 4.5.x (121.76 KB, application/octet-stream)
2016-05-03 04:59 UTC, Lionel Dor
Details
dmesg T100CHI (no sound - ever) with "no backend DAIs enabled" (90.19 KB, text/plain)
2016-05-04 19:56 UTC, jbMacAZ
Details

Description jbMacAZ 2016-04-26 20:56:44 UTC
I have two users on Ubuntu where sound works in 4.4.0 and 4.4.8 but doesn't work after upgrading to 4.5.2.  The obvious work around is use the older kernels.  Both users have Asus T100TA.  Ubuntu 15/16 one is 64 bit the other 32 bit.  Other workarounds (patches) to be able to use 4.5?
Comment 1 Takashi Iwai 2016-04-28 13:00:09 UTC
Could you give alsa-info.sh outputs from both working (4.4.x) and broken (4.5.x) kernels?  Run the script with --no-upload option, and attach (don't paste!) the outputs to Bugzilla.  Also, give the dmesg output from both kernels, too.
Comment 2 Lionel Dor 2016-04-28 19:55:01 UTC
Created attachment 214621 [details]
Alsa info for kernel 4.4.x
Comment 3 Lionel Dor 2016-04-28 19:55:33 UTC
Created attachment 214631 [details]
Alsa info for 4.5.x
Comment 4 Lionel Dor 2016-04-28 20:00:54 UTC
Created attachment 214641 [details]
URL for dmesg report
Comment 5 Lionel Dor 2016-04-28 20:06:45 UTC
Comment on attachment 214641 [details]
URL for dmesg report

Bad file sorry
Comment 6 Lionel Dor 2016-04-28 21:04:03 UTC
Created attachment 214651 [details]
Dmesg report for 4.4.x
Comment 7 Lionel Dor 2016-04-28 22:01:52 UTC
Created attachment 214671 [details]
URL for dmesg report 4.5.x kernel
Comment 8 Takashi Iwai 2016-04-29 09:17:25 UTC
Thanks.  It's byt-rt5640, so adding Intel people to Cc.
Keyon, could you check this or delegate to other people in charge?
Comment 9 Lionel Dor 2016-05-01 19:13:48 UTC
Hey, need you some help for fix this bug ? 
What can I do to help you ?
Comment 10 Keyon 2016-05-03 01:35:20 UTC
adding Vinod who owns the driver.

Lionel, looks like the dmesg can't be downloaded.

have a glance from the alsa-info, the sound card has been registered, isn't it?

!!Soundcards recognised by ALSA
!!-----------------------------

 0 [bytcrrt5640    ]: bytcr-rt5640 - bytcr-rt5640
                      bytcr-rt5640


!!ALSA/HDA dmesg
!!--------------

[    4.602560] input: ASUSTek COMPUTER INC. ASUS Base Station(T100) as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1/0003:0B05:17E0.0003/input/input8
[    4.625564] bytcr_rt5640 bytcr_rt5640: snd-soc-dummy-dai <-> media-cpu-dai mapping ok
[    4.625648] bytcr_rt5640 bytcr_rt5640: snd-soc-dummy-dai <-> deepbuffer-cpu-dai mapping ok
[    4.625695] compress asoc: snd-soc-dummy-dai <-> compress-cpu-dai mapping ok
[    4.629777] bytcr_rt5640 bytcr_rt5640: rt5640-aif1 <-> ssp2-port mapping ok
Comment 11 Lionel Dor 2016-05-03 04:59:25 UTC
Created attachment 215031 [details]
Dmesg report for 4.5.x

Keyon, here is the latest 4.5.2 dmesg report, can you download it now ? 
I don't have enough skills to tell you if the sound car has been registered :/
Comment 12 Vinod Koul 2016-05-03 05:04:23 UTC
(In reply to Lionel Dor from comment #11)
> Created attachment 215031 [details]
> Dmesg report for 4.5.x
> 
> Keyon, here is the latest 4.5.2 dmesg report, can you download it now ? 
> I don't have enough skills to tell you if the sound car has been registered
> :/

sound card seems to be registered
[    7.843597] bytcr_rt5640 bytcr_rt5640: snd-soc-dummy-dai <-> media-cpu-dai mapping ok
[    7.843709] bytcr_rt5640 bytcr_rt5640: snd-soc-dummy-dai <-> deepbuffer-cpu-dai mapping ok
[    7.843759] compress asoc: snd-soc-dummy-dai <-> compress-cpu-dai mapping ok
[    7.847773] bytcr_rt5640 bytcr_rt5640: rt5640-aif1 <-> ssp2-port mapping ok

[   14.303408]  Baytrail Audio Port: ASoC: no backend DAIs enabled for Baytrail Audio Port
[   14.303847]  Baytrail Audio Port: ASoC: no backend DAIs enabled for Baytrail Audio Port
[   14.304224]  Baytrail Audio Port: ASoC: no backend DAIs enabled for Baytrail Audio Port
[   14.305171]  Baytrail Audio Port: ASoC: no backend DAIs enabled for Baytrail Audio Port
[   14.305707]  Baytrail Audio Port: ASoC: no backend DAIs enabled for Baytrail Audio Port

Please configure the mixers to route to headset/speaker and try again. I think it should work
Comment 13 Lionel Dor 2016-05-03 05:05:33 UTC
(In reply to Vinod Koul from comment #12)

> Please configure the mixers to route to headset/speaker and try again. I
> think it should work

How can I do that ?
Comment 14 Lionel Dor 2016-05-04 08:27:32 UTC
(In reply to Lionel Dor from comment #13)
> (In reply to Vinod Koul from comment #12)
> 
> > Please configure the mixers to route to headset/speaker and try again. I
> > think it should work
> 
> How can I do that ?

Up ? Is there someone who can helpe me or tell me a tuto for this ?
Comment 15 Lionel Dor 2016-05-04 13:08:34 UTC
After configuring the mixers to route to headset/speaker, there is always no sound.
What can I do ? 
The kernel find the audio hardware and the audio driver, but there is no sound 

Some ideas ?
Comment 16 mirh 2016-05-04 17:26:18 UTC
I believe "mixing" means Pulseaudio or alsamixer, or whatever other thing you are using. 
Nothing more fancy.
Comment 17 jbMacAZ 2016-05-04 19:17:15 UTC
(In reply to Vinod Koul from comment #12)
> (In reply to Lionel Dor from comment #11)
> > Created attachment 215031 [details]
> > Dmesg report for 4.5.x
> > 
> > Keyon, here is the latest 4.5.2 dmesg report, can you download it now ? 
> > I don't have enough skills to tell you if the sound car has been registered
> > :/
<snip> 
> Please configure the mixers to route to headset/speaker and try again. I
> think it should work

So due to major changes between kernel 4.4 and 4.5 a different mixing "recipe" is required for each version?  What changed?  And how would I make each kernel automatically load its unique sound configuration?
Comment 18 jbMacAZ 2016-05-04 19:56:03 UTC
Created attachment 215291 [details]
dmesg T100CHI (no sound - ever) with "no backend DAIs enabled"

(In reply to Vinod Koul from comment #12)

> [   14.303408]  Baytrail Audio Port: ASoC: no backend DAIs enabled for
> Baytrail Audio Port
> [   14.303847]  Baytrail Audio Port: ASoC: no backend DAIs enabled for
> Baytrail Audio Port
> [   14.304224]  Baytrail Audio Port: ASoC: no backend DAIs enabled for
> Baytrail Audio Port
> [   14.305171]  Baytrail Audio Port: ASoC: no backend DAIs enabled for
> Baytrail Audio Port
> [   14.305707]  Baytrail Audio Port: ASoC: no backend DAIs enabled for
> Baytrail Audio Port
> 

FWIW: The T100CHI (never has had sound working in linux) but it has hundreds of these messages starting with kernel 4.5+  Another sound bug report (#117141) claims an IRQ mapping issue.  The CHI also has the uncertainty as to whether it uses SSP0 or SSP2 (dmesg thinks ssp2).  It uses bytcr_rt5640.  The sound design is probably similar to the T100TA and equally undocumented by Asus.

For the T100CHI, 4.5 represents progress.  More of the sound hardware is being recognized.  I do see the repetitive "no backend" errors as a bug.  

I hope the related model info is helpful to resolving the T100TA problem.  I'm aware that the baytrail sound code is actively under further development, so I'm not expecting sound on the CHI yet.
Comment 19 mirh 2016-05-04 20:03:33 UTC
If there's an IRQ issue.. then perhaps ACPI tables are involved.. 

Which in turn means you may want to try 4.6 to see if this is getting any further development.
Comment 20 Lionel Dor 2016-05-05 08:26:40 UTC
(In reply to mirh from comment #19)
> Which in turn means you may want to try 4.6 to see if this is getting any
> further development.

I could sooner test sound in 4.6 RC kernel on T100TA if you want ? 
It could bring us some precious informations.
Comment 21 Lionel Dor 2016-05-05 09:13:09 UTC
(In reply to Lionel Dor from comment #20)
> (In reply to mirh from comment #19)
> > Which in turn means you may want to try 4.6 to see if this is getting any
> > further development.
> 
> I could sooner test sound in 4.6 RC kernel on T100TA if you want ? 
> It could bring us some precious informations.

Here is some news from jbMacAZ member on a Google+ community : 

"I've been testing the 4.6-rc's and sound still doesn't work.  It's not released yet, so it is still possible, but I'd expect 4.7 is more realistic.

The intel developer needs info from Asus about how the audio is wired internally and Asus is not talking.  Their position is "We recommend windows."  They cancelled a nice tablet a couple years back that would dual boot android and windows.  It was rumored to be squashed by M$."

What can we do now ? 
We can expect the bug will be solved in a next future by an intel developer...
Comment 22 Vinod Koul 2016-05-05 13:25:40 UTC
Okay me and Pierre are working on this.

Can you run these commands on console and then run aplay to tell me if you ear audio or not

Commands:
Speaker
//////////////////////////////////////////////////////////////
amixer -c 0 cset  name='codec_out0 mix 0 pcm0_in Switch' 1
amixer -c 0 cset  name='media0_out mix 0 media1_in Switch' 1
amixer -c 0 cset  name='media1_in Gain 0 Volume' 0 0 
amixer -c 0 cset  name='media1_in Gain 0 Ramp Delay' 50
amixer -c 0 cset  name='media1_in Gain 0 Switch' 1
amixer -c 0 cset  name='pcm0_in Gain 0 Volume' 0 0 
amixer -c 0 cset  name='pcm0_in Gain 0 Ramp Delay' 50
amixer -c 0 cset  name='pcm0_in Gain 0 Switch' 1
amixer -c 0 cset  name='codec_out0 Gain 0 Volume' 0 0 
amixer -c 0 cset  name='codec_out0 Gain 0 Ramp Delay' 50
amixer -c 0 cset  name='codec_out0 Gain 0 Switch' 1

amixer -c 0 cset  name='Speaker L Playback Switch' 1
amixer -c 0 cset  name='Speaker R Playback Switch' 1
amixer -c 0 cset name='DAC MIXR INF1 Switch'  1              
amixer -c 0 cset name='Stereo DAC MIXL DAC L1 Switch' 1
amixer -c 0 cset name='Stereo DAC MIXR DAC R1 Switch' 1
amixer -c 0 cset name='SPK MIXL DAC L1 Switch'  1
amixer -c 0 cset name='SPK MIXR DAC R1 Switch'  1
amixer -c 0 cset name='SPOL MIX SPKVOL L Switch'  1
amixer -c 0 cset name='SPOR MIX SPKVOL R Switch'  1
amixer -c 0 cset name='Speaker Switch'  1
amixer -c 0 cset name='Headphone Switch'  0


White noise test:
aplay -Dhw:0,0 -f dat /dev/urandom
Comment 23 Lionel Dor 2016-05-08 05:33:17 UTC
I don't ear audio after runing these commands on 4.5.x kernel.
Comment 24 Lionel Dor 2016-05-10 07:47:16 UTC
Hello, some news ? 
This problem will be solve in 4.6.x kernel ?
Comment 25 Lionel Dor 2016-05-12 09:29:48 UTC
/!\ News /!\

Sound seems work on 4.5.4 generic kernel after some settings with alsamixer !
However, the integrated mike isn't detected by pulseaudio.

Somed ideas to slove the mike problem ?
Comment 26 jbMacAZ 2016-05-14 08:18:39 UTC
Sound works again in Ubuntu after kernel upgrade after reconfiguring sound.  Simplest method is ucm from Piere Luis Bossart to auto-generate a new asound.state for kernel 4.5.x.  Apparently, alsamixer can manage multiple state files allowing each kernel to have its own configuration.  Clumsy, but usable.

(This solution does not work for the T100CHI - I am awaiting resolution of bugs #115201 and #117141, perhaps others)  Thanks for the assistance.
Comment 27 Sachin Mokashi 2016-06-22 11:21:27 UTC
Hi Lionel Dor,

Maybe the alsamixer settings that you have done contains Headphone mic settings and not of Internal mic.

Anyways, Can you post the alsamixer settings?

Note You need to log in before you can comment on or make changes to this bug.