init.qti.media.sh 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #! /vendor/bin/sh
  2. #==============================================================================
  3. # init.qti.media.sh
  4. #
  5. # Copyright (c) 2020-2022, Qualcomm Technologies, Inc.
  6. # All Rights Reserved.
  7. # Confidential and Proprietary - Qualcomm Technologies, Inc.
  8. #
  9. # Copyright (c) 2020, The Linux Foundation. All rights reserved.
  10. #
  11. # Redistribution and use in source and binary forms, with or without
  12. # modification, are permitted provided that the following conditions are
  13. # met:
  14. # * Redistributions of source code must retain the above copyright
  15. # notice, this list of conditions and the following disclaimer.
  16. # * Redistributions in binary form must reproduce the above
  17. # copyright notice, this list of conditions and the following
  18. # disclaimer in the documentation and/or other materials provided
  19. # with the distribution.
  20. # * Neither the name of The Linux Foundation nor the names of its
  21. # contributors may be used to endorse or promote products derived
  22. # from this software without specific prior written permission.
  23. #
  24. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
  25. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  26. # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
  27. # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
  28. # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  29. # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  30. # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  31. # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  32. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  33. # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  34. # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. #===============================================================================
  36. build_codename=`getprop vendor.media.system.build_codename`
  37. if [ -f /sys/devices/soc0/soc_id ]; then
  38. soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
  39. else
  40. soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
  41. fi
  42. target=`getprop ro.board.platform`
  43. case "$target" in
  44. "anorak")
  45. setprop vendor.mm.target.enable.qcom_parser 0
  46. setprop vendor.media.target_variant "_anorak"
  47. ;;
  48. "kalama")
  49. setprop vendor.mm.target.enable.qcom_parser 0
  50. setprop vendor.media.target_variant "_kalama"
  51. ;;
  52. "pineapple")
  53. setprop vendor.mm.target.enable.qcom_parser 0
  54. case "$soc_hwid" in
  55. 614|632)
  56. setprop vendor.media.target_variant "_cliffs_v0"
  57. sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc/sku_version` 2> /dev/null
  58. if [ $sku_ver -eq 1 ]; then
  59. setprop vendor.media.target_variant "_cliffs_v1"
  60. fi
  61. ;;
  62. *)
  63. setprop vendor.media.target_variant "_pineapple"
  64. if [ $build_codename -le "15" ]; then
  65. setprop vendor.netflix.bsp_rev "Q8650-37577-1"
  66. fi
  67. ;;
  68. esac
  69. ;;
  70. "taro")
  71. setprop vendor.mm.target.enable.qcom_parser 1040479
  72. case "$soc_hwid" in
  73. 530|531|540)
  74. setprop vendor.media.target_variant "_cape"
  75. ;;
  76. *)
  77. setprop vendor.media.target_variant "_taro"
  78. ;;
  79. esac
  80. ;;
  81. "lahaina")
  82. case "$soc_hwid" in
  83. 450)
  84. setprop vendor.media.target_variant "_shima_v3"
  85. setprop vendor.netflix.bsp_rev ""
  86. sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc/sku_version` 2> /dev/null
  87. if [ $sku_ver -eq 1 ]; then
  88. setprop vendor.media.target_variant "_shima_v1"
  89. elif [ $sku_ver -eq 2 ]; then
  90. setprop vendor.media.target_variant "_shima_v2"
  91. fi
  92. ;;
  93. *)
  94. setprop vendor.media.target_variant "_lahaina"
  95. setprop vendor.netflix.bsp_rev "Q875-32408-1"
  96. ;;
  97. esac
  98. ;;
  99. "holi")
  100. setprop vendor.media.target_variant "_holi"
  101. ;;
  102. "msmnile")
  103. setprop vendor.media.target_variant "_msmnile"
  104. ;;
  105. esac