blob: 25b6c1a2ae34c1f6c4dffd4af3e8d656ef9ee0c4 [file] [log] [blame]
ReStranger1b85f702025-09-30 04:05:06 +03001#! /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
37build_codename=`getprop vendor.media.system.build_codename`
38
39if [ -f /sys/devices/soc0/soc_id ]; then
40 soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
41else
42 soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
43fi
44
45target=`getprop ro.board.platform`
46case "$target" in
47 "neo")
48 setprop vendor.mm.target.enable.qcom_parser 1040463
49 setprop vendor.netflix.bsp_rev ""
50 case "$soc_hwid" in
51 579)
52 setprop vendor.media.target_variant "_neo_v2"
53 ;;
54 *)
55 setprop vendor.media.target_variant "_neo_v1"
56 ;;
57 esac
58 ;;
59 "parrot")
60 setprop vendor.mm.target.enable.qcom_parser 1040463
61 case "$soc_hwid" in
62 568|602|581|582)
63 setprop vendor.media.target_variant "_ravelin"
64 if [ $build_codename -le "13" ]; then
65 setprop vendor.netflix.bsp_rev "Q4450-37037-1"
66 fi
67 ;;
68 *)
69 setprop vendor.media.target_variant "_parrot_v2"
70 sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc/sku_version` 2> /dev/null
71 if [ $sku_ver -eq 0 ]; then
72 setprop vendor.media.target_variant "_parrot_v0"
73 elif [ $sku_ver -eq 1 ]; then
74 setprop vendor.media.target_variant "_parrot_v1"
75 fi
76
77 if [ $build_codename -le "13" ]; then
78 setprop vendor.netflix.bsp_rev "Q6450-36256-1"
79 fi
80 ;;
81 esac
82 ;;
83 "taro")
84 setprop vendor.mm.target.enable.qcom_parser 1040463
85 case "$soc_hwid" in
86 506|547|564)
87 setprop vendor.media.target_variant "_diwali_v2"
88 setprop vendor.netflix.bsp_rev ""
89 sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc/sku_version` 2> /dev/null
90 if [ $sku_ver -eq 0 ]; then
91 setprop vendor.media.target_variant "_diwali_v0"
92 elif [ $sku_ver -eq 1 ]; then
93 setprop vendor.media.target_variant "_diwali_v1"
94 fi
95
96 if [ $build_codename -le "13" ]; then
97 setprop vendor.netflix.bsp_rev "Q7450-35705-1"
98 fi
99 ;;
100 591)
101 setprop vendor.media.target_variant "_ukee"
102 if [ $build_codename -le "13" ]; then
103 setprop vendor.netflix.bsp_rev "Q8450-34634-1"
104 fi
105 ;;
106 530|531|540)
107 setprop vendor.media.target_variant "_cape"
108 if [ $build_codename -le "13" ]; then
109 setprop vendor.netflix.bsp_rev "Q8450-34634-1"
110 fi
111 ;;
112 *)
113 setprop vendor.media.target_variant "_taro"
114 if [ $build_codename -le "13" ]; then
115 setprop vendor.netflix.bsp_rev "Q8450-34634-1"
116 fi
117 ;;
118 esac
119 ;;
120 "lahaina")
121 case "$soc_hwid" in
122 450)
123 setprop vendor.media.target_variant "_shima_v3"
124 setprop vendor.netflix.bsp_rev ""
125 sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc/sku_version` 2> /dev/null
126 if [ $sku_ver -eq 1 ]; then
127 setprop vendor.media.target_variant "_shima_v1"
128 elif [ $sku_ver -eq 2 ]; then
129 setprop vendor.media.target_variant "_shima_v2"
130 fi
131 ;;
132 *)
133 setprop vendor.media.target_variant "_lahaina"
134 setprop vendor.netflix.bsp_rev "Q875-32408-1"
135 ;;
136 esac
137 ;;
138 "bengal")
139 setprop vendor.mm.target.enable.qcom_parser 0
140 case "$soc_hwid" in
141 586)
142 setprop vendor.media.target_variant "_khaje_iot"
143 ;;
144 518|561|585)
145 setprop vendor.media.target_variant "_khaje_v0"
146 if [ $build_codename -le "13" ]; then
147 setprop vendor.netflix.bsp_rev "Q6115-31409-1"
148 fi
149 ;;
150 esac
151 ;;
152 "holi")
153 setprop vendor.media.target_variant "_holi"
154 ;;
155 "msmnile")
156 setprop vendor.media.target_variant "_msmnile"
157 ;;
158 "monaco")
159 setprop vendor.media.target_variant "_monaco"
160 ;;
161esac