Skip to content

init: Boot DSP before SLPI again#598

Merged
jerpelea merged 1 commit intosonyxperiadev:masterfrom
ix5:devstart-adsp-cdsp
May 22, 2019
Merged

init: Boot DSP before SLPI again#598
jerpelea merged 1 commit intosonyxperiadev:masterfrom
ix5:devstart-adsp-cdsp

Conversation

@ix5
Copy link
Contributor

@ix5 ix5 commented Apr 21, 2019

init: Boot DSP before SLPI again

Before 8792c97, adsp and cdsp were booted before slpi:

init.qcom.devstart.sh
echo 1 > /sys/kernel/boot_adsp/boot
echo 1 > /sys/kernel/boot_cdsp/boot
echo 1 > /sys/kernel/boot_slpi/boot

8792c97 changed that behaviour to first booting SLPI via init.qcom.devstart.sh, setting vendor.qcom.devup=1 and only then booting ADSP/CSDP via init.qcom.(adsp|cdsp)start.sh.

That and later commits caused race conditions that meant audio was gone on tone devices every other boot.

This commit restores the old behaviour of first booting ADSP/CDSP and then SLPI.

@ix5 ix5 force-pushed the devstart-adsp-cdsp branch 2 times, most recently from 7f0d242 to d7286e3 Compare April 27, 2019 07:59
@ix5
Copy link
Contributor Author

ix5 commented Apr 27, 2019

Updated PR with the following changes:

rootdir/vendor/bin/init.qcom.adspstart.sh and cdspstart.sh:
Add 2s sleep delay after booting before setting vendor.qcom.adspup (or cdspup)

rootdir/vendor/etc/init/adsprpcd.rc:
Changed class late_start to class main for vendor.adsprpcd
Start the service immediately, don't just enable it:

 on property:vendor.qcom.devup=1
+    start vendor.adsprpcd
     enable vendor.adsprpcd

rootdir/vendor/etc/init/sensors.rc:
Start vendor.sensors on property:vendor.qcom.devup=1 and not on adspup. This means sensors will only be started after SLPI is up.

@ix5
Copy link
Contributor Author

ix5 commented Apr 27, 2019

Tested successfully on kagura, but needs testing on other platforms.

@ix5 ix5 force-pushed the devstart-adsp-cdsp branch from d7286e3 to a5a6c51 Compare April 27, 2019 11:48
@ix5
Copy link
Contributor Author

ix5 commented Apr 27, 2019

Updated again to remove the start vendor.adsprpcd line, no need since class_start main is triggered before devup is set.

@ix5
Copy link
Contributor Author

ix5 commented May 11, 2019

With further results rolling in it appears that this PR isn't needed after all.
Still leaving open for visibility since we should start the services in the correct order.

@ix5 ix5 force-pushed the devstart-adsp-cdsp branch from a5a6c51 to 4d949e7 Compare May 16, 2019 07:18
@ix5
Copy link
Contributor Author

ix5 commented May 16, 2019

Updated to remove the 2s sleep delay. Tested for weeks on kagura with no regressions.

@ix5 ix5 changed the title [WIP] init: Boot DSP before SLPI again init: Boot DSP before SLPI again May 16, 2019
@ix5 ix5 force-pushed the devstart-adsp-cdsp branch from 4d949e7 to fdedc87 Compare May 16, 2019 21:12
@ix5
Copy link
Contributor Author

ix5 commented May 21, 2019

Tested exhaustively, also on tama. Fixes urgent adsp race on tone.
MERGEME

Before 8792c97, adsp and cdsp were booted before slpi:

    init.qcom.devstart.sh
    echo 1 > /sys/kernel/boot_adsp/boot
    echo 1 > /sys/kernel/boot_cdsp/boot
    echo 1 > /sys/kernel/boot_slpi/boot

8792c97 changed that behaviour to first booting SLPI via
init.qcom.devstart.sh, setting vendor.qcom.devup=1 and only then booting
ADSP/CSDP via init.qcom.(adsp|cdsp)start.sh.
That and later commits caused race conditions that meant audio was gone
on tone devices every other boot.

This commit restores the old behaviour of first booting ADSP/CDSP and
then SLPI.
@ix5 ix5 force-pushed the devstart-adsp-cdsp branch from 3c90c1f to c7b0275 Compare May 22, 2019 13:47
@jerpelea jerpelea merged commit f011ade into sonyxperiadev:master May 22, 2019
@ix5 ix5 deleted the devstart-adsp-cdsp branch May 22, 2019 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants