nE0sIghT / android_kernel_xiaomi_msm8953

Xiaomi Redmi Note 4 (mido) LineageOS updated kernel
Other
23 stars 7 forks source link

name: TimeCheckThread >>> /system/bin/audioserver <<< signal 6 (SIGABRT), code -6 (SI_TKILL) #4

Closed nE0sIghT closed 4 years ago

nE0sIghT commented 4 years ago

https://gist.github.com/nE0sIghT/564a113ede63a4a9981a3e1811733543

offset1313 commented 4 years ago

While audio is broken. Fingerprint is working fine on android 10. [Haven't rebased to android 10 caf tag]

nE0sIghT commented 4 years ago

dmesg with debug messages from techpack and audio/soc: [1] grep -i -E 'adsp|sound|audio|apr_' dmesg: [2]

At least I don't think this is iommu issue for now:

[    7.568821] msm-audio-ion soc:qcom,msm-audio-ion: msm_audio_ion_probe: SMMU version is (2)
[    7.568828] msm-audio-ion soc:qcom,msm-audio-ion: msm_audio_ion_probe: adsp is ready
[    7.568830] msm-audio-ion soc:qcom,msm-audio-ion: msm_audio_ion_probe: SMMU is Enabled

Looks more like dts issue. Main error code is -517 (EPROBE_DEFER).

[1] https://gist.github.com/nE0sIghT/083a458fc7bcc48148ca7f0ebe40e6b9 [2] https://gist.github.com/nE0sIghT/69a01a23a6c1c01bcd9ccdc98b2fa280

Nicklas373 commented 4 years ago

adsp seems like firmware issue, techpack use latest adsp firmware if we're following tissot changes.

offset1313 commented 4 years ago

We can force enable older firmware version !! For reference : https://github.com/nichcream/audio-kernel/commit/a77183fef3280c984d5e60561c6f480211b1aa61

Nicklas373 commented 4 years ago

We can force enable older firmware version !! For reference : nichcream/audio-kernel@a77183f

Good, any other commit needed?

offset1313 commented 4 years ago

looks interesting : https://github.com/nichcream/audio-kernel/commit/a77183fef3280c984d5e60561c6f480211b1aa61

offset1313 commented 4 years ago

Some more interesting stuff : @nE0sIghT

https://github.com/nichcream/audio-kernel/commit/64b08c0d160c83c157a2e03174d0c9edc2f8e3f0

https://github.com/nichcream/audio-kernel/commit/1676346c4a841bf74be423c40dbfe2f72dcc722a

nE0sIghT commented 4 years ago

Anyone knows where is original repository of techpack audio?

Nicklas373 commented 4 years ago

Anyone knows where is original repository of techpack audio?

this one sir

https://source.codeaurora.org/quic/la/platform/vendor/opensource/audio-kernel/

Nicklas373 commented 4 years ago

https://source.codeaurora.org/quic/la/platform/vendor/opensource/audio-kernel/log/?h=audio-drivers.lnx.2.0.r13-rel

This one for msm8953 for LA.UM.8.6.2.r1-06900-89xx.0 tag

Not there

https://source.codeaurora.org/quic/la/platform/vendor/opensource/audio-kernel/tag/?h=LA.UM.8.6.2.r1-06900-89xx.0

offset1313 commented 4 years ago

This tag is LA.UM.8.6.2.r1-06900-89xx.0 merged In audio-drivers.lnx.2.0.r13-rel branch

You can confirm it here:

https://source.codeaurora.org/quic/la/platform/vendor/opensource/audio-kernel/commit/?h=LA.UM.8.6.2.r1-06900-89xx.0&id=79301d21b96a87867ee8f0794e91a66fd63dc2c8

offset1313 commented 4 years ago

Kernel audio drivers can be categorised into below folders. asoc - ALSA based drivers,

asoc/codecs - codec drivers,

ipc - APR IPC communication drivers,

dsp - DSP low level drivers/Audio ION/ADSP Loader,

dsp/codecs - Native encoders and decoders,

soc - SoC based drivers(pinctrl/regmap/soundwire)

Nicklas373 commented 4 years ago

Kernel audio drivers can be categorised into below folders. asoc - ALSA based drivers,

asoc/codecs - codec drivers,

ipc - APR IPC communication drivers,

dsp - DSP low level drivers/Audio ION/ADSP Loader,

dsp/codecs - Native encoders and decoders,

soc - SoC based drivers(pinctrl/regmap/soundwire)

So it could be probably error on dsp for our issue, isn't?

Nicklas373 commented 4 years ago

@nE0sIghT Audio already worked sir, after clean pick mido changes from sound/soc to asoc then revert adsp to use latest version

https://github.com/Nicklas373/android_kernel_xiaomi_mido-4.9/commit/1df55ad532872fc9d651f7eaddcd76d497863094#diff-a8477754c10960b37baa83a6c34df327

https://github.com/Nicklas373/android_kernel_xiaomi_mido-4.9/commit/c6c2336b8174681871b40c8bc7de9c2b04316f43#diff-a8477754c10960b37baa83a6c34df327

https://github.com/Nicklas373/android_kernel_xiaomi_mido-4.9/commit/4e5cc580f0e681df07de9cb19ffcbcccab4ef051#diff-a8477754c10960b37baa83a6c34df327

So far it's worked, but video issue still persist. I already tried to pick camera stack from 3.18 then compiled, but camera still can't connect

nE0sIghT commented 4 years ago

@Nicklas373

I see that changes guards CONFIG_MACH_XIAOMI_C6. Does it should be changed to CONFIG_MACH_XIAOMI_MIDO?

offset1313 commented 4 years ago

Great work dude @Nicklas373
But you should change it to CONFIG_MACH_XIAOMI_MIDO Because that's what we are using to refer to mido treewide

Nicklas373 commented 4 years ago

@Nicklas373

I see that changes guards CONFIG_MACH_XIAOMI_C6. Does it should be changed to CONFIG_MACH_XIAOMI_MIDO?

yes that's mido, sorry, i was using @krascgq changes for platform changes, that's actually same

nE0sIghT commented 4 years ago

Thanks for solution. I will check original commit by TheScarastic and @AryanKedare: https://github.com/nE0sIghT/android_kernel_xiaomi_msm8953/commit/9a06935c14502974dc4392b3aa9dbaf97d214475, compare it with @krasCGQ work and cherry-pick changes.

Nicklas373 commented 4 years ago

@Nicklas373

I see that changes guards CONFIG_MACH_XIAOMI_C6. Does it should be changed to CONFIG_MACH_XIAOMI_MIDO?

And i need to revert changes for this function

ifdef CONFIG_MACH_XIAOMI_C6

if (jack->jack->type & WCD_MBHC_JACK_MASK) {
    if (!status)
        switch_set_state(&accdet_data, 0);
    else
        switch_set_state(&accdet_data, status);
}

endif

due <linux/switch.h> doesn't exist on 4.9 header, so i partially revert that changes to bypass compilation issue for now

https://github.com/Nicklas373/android_kernel_xiaomi_mido-4.9/commit/bab571afb538363d9dddc4811c0895fc49f7e886

offset1313 commented 4 years ago

Finally I could hear mido speaking

nE0sIghT commented 4 years ago

@Nicklas373

  1. 1st commit [1] already merged as 2f046a3a excluding switch stuff which is superseeded by extcon. Flex1911 commented that switch stuff is not used. I will check it.

  2. 2nd commit should be partial revert of 49714a41

  3. 3rd commit should be partial revert of 8cb95fea

[1] https://github.com/Nicklas373/android_kernel_xiaomi_mido-4.9/commit/1df55ad532872fc9d651f7eaddcd76d497863094

offset1313 commented 4 years ago

https://github.com/nE0sIghT/android_kernel_xiaomi_msm8953/commit/49714a418981d7a0867f64555907d0c0ab74c3ed https://github.com/nE0sIghT/android_kernel_xiaomi_msm8953/commit/8cb95feaec6db2e3714271cb65215dc87b28fedf These reverts were performed due to the fact the Tissot got a new firmware update! But we are not so lucky!!

nE0sIghT commented 4 years ago

These reverts were performed due to the fact the Tissot got a new firmware update!

Yep. I will revert reverts making them mido specific.

nE0sIghT commented 4 years ago

Something is missing here as sound still not works for me. WIP branch is here: https://github.com/nE0sIghT/android_kernel_xiaomi_msm8953/tree/lineage-16.0-mido-4.9-audio

nE0sIghT commented 4 years ago

I beleave the problem is in CONFIG_SND_SOC_MAX98927 that was added for tissot.

nE0sIghT commented 4 years ago

Ok, this was CONFIG_SND_SOC_MAX98927 issue. Almost everything works except:

AryanKedare commented 4 years ago

3rd one issue confirmed

nE0sIghT commented 4 years ago

Closing fixed in 670b6074e716bacc17018a552f62892a6e2058ac, ed6a1d2ed555b5ac7e8db8ee515c8e0b696bd590, 249749a08f82b29de4d387b1ca66aff26787e8a0.

Choppy crack is still issue: https://github.com/nE0sIghT/android_kernel_xiaomi_msm8953/issues/11

Nicklas373 commented 4 years ago

@nE0sIghT Tissot use that codec, but mido doesn't use it