init.qti.media.sh 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. #! /vendor/bin/sh
  2. #==============================================================================
  3. # init.qti.media.sh
  4. #
  5. # Copyright (c) 2020-2023, 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. "neo")
  45. setprop vendor.mm.target.enable.qcom_parser 1040463
  46. setprop vendor.netflix.bsp_rev ""
  47. case "$soc_hwid" in
  48. 579)
  49. setprop vendor.media.target_variant "_neo_v2"
  50. ;;
  51. *)
  52. setprop vendor.media.target_variant "_neo_v1"
  53. ;;
  54. esac
  55. ;;
  56. "parrot")
  57. setprop vendor.mm.target.enable.qcom_parser 1040451
  58. case "$soc_hwid" in
  59. 568|602|581|582)
  60. setprop vendor.media.target_variant "_ravelin"
  61. if [ $build_codename -le "13" ]; then
  62. setprop vendor.netflix.bsp_rev "Q4450-37037-1"
  63. fi
  64. ;;
  65. *)
  66. setprop vendor.media.target_variant "_parrot_v2"
  67. sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc/sku_version` 2> /dev/null
  68. if [ $sku_ver -eq 0 ]; then
  69. setprop vendor.media.target_variant "_parrot_v0"
  70. elif [ $sku_ver -eq 1 ]; then
  71. setprop vendor.media.target_variant "_parrot_v1"
  72. fi
  73. if [ $build_codename -le "14" ]; then
  74. setprop vendor.netflix.bsp_rev "Q6450-36256-1"
  75. fi
  76. ;;
  77. esac
  78. ;;
  79. "taro")
  80. setprop vendor.mm.target.enable.qcom_parser 4112471
  81. case "$soc_hwid" in
  82. 506|547|564)
  83. setprop vendor.media.target_variant "_diwali_v2"
  84. setprop vendor.netflix.bsp_rev "Q7450-35705-1"
  85. sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc/sku_version` 2> /dev/null
  86. if [ $sku_ver -eq 0 ]; then
  87. setprop vendor.media.target_variant "_diwali_v0"
  88. elif [ $sku_ver -eq 1 ]; then
  89. setprop vendor.media.target_variant "_diwali_v1"
  90. fi
  91. if [ $build_codename -le "14" ]; then
  92. setprop vendor.netflix.bsp_rev "Q7450-35705-1"
  93. fi
  94. ;;
  95. 591)
  96. setprop vendor.media.target_variant "_ukee"
  97. if [ $build_codename -le "14" ]; then
  98. setprop vendor.netflix.bsp_rev "Q8450-34634-1"
  99. fi
  100. ;;
  101. 530|531|540)
  102. setprop vendor.media.target_variant "_cape"
  103. if [ $build_codename -le "14" ]; then
  104. setprop vendor.netflix.bsp_rev "Q8450-34634-1"
  105. fi
  106. ;;
  107. *)
  108. setprop vendor.media.target_variant "_taro"
  109. if [ $build_codename -le "14" ]; then
  110. setprop vendor.netflix.bsp_rev "Q8450-34634-1"
  111. fi
  112. ;;
  113. esac
  114. ;;
  115. "lahaina")
  116. case "$soc_hwid" in
  117. 450)
  118. setprop vendor.media.target_variant "_shima_v3"
  119. setprop vendor.netflix.bsp_rev ""
  120. sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc/sku_version` 2> /dev/null
  121. if [ $sku_ver -eq 1 ]; then
  122. setprop vendor.media.target_variant "_shima_v1"
  123. elif [ $sku_ver -eq 2 ]; then
  124. setprop vendor.media.target_variant "_shima_v2"
  125. fi
  126. ;;
  127. *)
  128. setprop vendor.media.target_variant "_lahaina"
  129. setprop vendor.netflix.bsp_rev "Q875-32408-1"
  130. ;;
  131. esac
  132. ;;
  133. "bengal")
  134. setprop vendor.mm.target.enable.qcom_parser 0
  135. case "$soc_hwid" in
  136. 518|561|585|586)
  137. setprop vendor.media.target_variant "_khaje_v0"
  138. if [ $build_codename -le "13" ]; then
  139. setprop vendor.netflix.bsp_rev "Q6115-31409-1"
  140. fi
  141. ;;
  142. esac
  143. ;;
  144. "holi")
  145. setprop vendor.media.target_variant "_holi"
  146. ;;
  147. "msmnile")
  148. setprop vendor.media.target_variant "_msmnile"
  149. ;;
  150. "monaco")
  151. setprop vendor.media.target_variant "_monaco"
  152. ;;
  153. esac