init.qti.media.sh 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. "neo")
  45. setprop vendor.mm.target.enable.qcom_parser 0
  46. case "$soc_hwid" in
  47. *)
  48. setprop vendor.media.target_variant "_neo"
  49. ;;
  50. esac
  51. ;;
  52. "taro")
  53. setprop vendor.mm.target.enable.qcom_parser 4112471
  54. case "$soc_hwid" in
  55. 506|547|564)
  56. setprop vendor.media.target_variant "_diwali_v2"
  57. setprop vendor.netflix.bsp_rev "Q7450-35705-1"
  58. sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc/sku_version` 2> /dev/null
  59. if [ $sku_ver -eq 0 ]; then
  60. setprop vendor.media.target_variant "_diwali_v0"
  61. elif [ $sku_ver -eq 1 ]; then
  62. setprop vendor.media.target_variant "_diwali_v1"
  63. fi
  64. ;;
  65. 530|531|540)
  66. setprop vendor.media.target_variant "_cape"
  67. if [ $build_codename -le "13" ]; then
  68. setprop vendor.netflix.bsp_rev "Q8450-34634-1"
  69. fi
  70. ;;
  71. *)
  72. setprop vendor.media.target_variant "_taro"
  73. if [ $build_codename -le "13" ]; then
  74. setprop vendor.netflix.bsp_rev "Q8450-34634-1"
  75. fi
  76. ;;
  77. esac
  78. ;;
  79. "lahaina")
  80. case "$soc_hwid" in
  81. 450)
  82. setprop vendor.media.target_variant "_shima_v3"
  83. setprop vendor.netflix.bsp_rev ""
  84. sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc/sku_version` 2> /dev/null
  85. if [ $sku_ver -eq 1 ]; then
  86. setprop vendor.media.target_variant "_shima_v1"
  87. elif [ $sku_ver -eq 2 ]; then
  88. setprop vendor.media.target_variant "_shima_v2"
  89. fi
  90. ;;
  91. *)
  92. setprop vendor.media.target_variant "_lahaina"
  93. setprop vendor.netflix.bsp_rev "Q875-32408-1"
  94. ;;
  95. esac
  96. ;;
  97. "holi")
  98. setprop vendor.media.target_variant "_holi"
  99. ;;
  100. "msmnile")
  101. setprop vendor.media.target_variant "_msmnile"
  102. ;;
  103. esac