handler: enter to pm gate only when it is active

We should decrease the ref_cnt only when the DSP is active (dsp_d0_sref
> 0), otherwise, consective PM_GATE IPC asking for enter PM GATE with
different flags will lead to minus ref_cnt and the DSP won't be abled to
activate from the PM_GATE with SOF_PM_PPG flag.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
1 file changed
tree: 14f87c6d93ae6726f68b923d7dc388fc0d475375
  1. .github/
  2. doc/
  3. keys/
  4. scripts/
  5. smex/
  6. src/
  7. test/
  8. tools/
  9. zephyr/
  10. .gitignore
  11. .gitmodules
  12. .travis.yml
  13. CMakeLists.txt
  14. CODEOWNERS
  15. Kconfig
  16. LICENCE
  17. README.md
README.md

Sound Open Firmware

Status

Build Status Gitter chat IRC chat

Documentation

See docs

Prerequisites

  • Docker
  • CMake (version >= 3.10)

Build Instructions

  1. Create directory in checked out repo for build files:
mkdir build && cd build
  1. Run configuration for your toolchain:

Baytrail / Cherrytrail:

cmake -DTOOLCHAIN=xtensa-byt-elf -DROOT_DIR=`pwd`/../../xtensa-root/xtensa-byt-elf ..

Haswell / Broadwell:

cmake -DTOOLCHAIN=xtensa-hsw-elf -DROOT_DIR=`pwd`/../../xtensa-root/xtensa-hsw-elf ..

Apollolake:

cmake -DTOOLCHAIN=xtensa-apl-elf -DROOT_DIR=`pwd`/../../xtensa-root/xtensa-apl-elf ..

Cannonlake:

cmake -DTOOLCHAIN=xtensa-cnl-elf -DROOT_DIR=`pwd`/../../xtensa-root/xtensa-cnl-elf ..
  1. Apply default config for your platform.

Baytrail:

make baytrail_defconfig

Cherrytrail:

make cherrytrail_defconfig

Haswell:

make haswell_defconfig

Broadwell:

make broadwell_defconfig

Apollolake:

make apollolake_defconfig

Cannonlake:

make cannonlake_defconfig
  1. (Optional) Customize your configuration
make menuconfig
  1. Build firmware
make bin
# or `make bin -j<jobs>` for parallel build

Running the tests

See unit testing documentation

Deployment

TODO: Add additional notes about how to deploy this on a live system

Contributing

See Contributing to the Project

License

This project is licensed under the BSD Clause 3 - see the LICENCE file for details