Skip to content

Commit c4ee606

Browse files
committed
CPU (Android): check for MTK D9X00 SOCs
1 parent 59c8082 commit c4ee606

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/detection/cpu/cpu_linux.c

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,36 @@ static void detectQualcomm(FFCPUResult* cpu)
144144
ffStrbufSetStatic(&cpu->name, "Qualcomm Snapdragon 4 Gen 1 [SM4375]");
145145
}
146146

147+
static void detectMediaTek(FFCPUResult* cpu)
148+
{
149+
// https://en.wikipedia.org/wiki/List_of_MediaTek_systems_on_chips
150+
151+
if (ffStrbufEqualS(&cpu->name, "MT6991"))
152+
ffStrbufSetStatic(&cpu->name, "MediaTek Dimensity 9400 [MT6991]");
153+
else if (ffStrbufEqualS(&cpu->name, "MT6991Z"))
154+
ffStrbufSetStatic(&cpu->name, "MediaTek Dimensity 9400 [MT6991Z]");
155+
else if (ffStrbufEqualS(&cpu->name, "MT6989Z"))
156+
ffStrbufSetStatic(&cpu->name, "MediaTek Dimensity 9300+ [MT6989Z]");
157+
else if (ffStrbufEqualS(&cpu->name, "MT8796Z"))
158+
ffStrbufSetStatic(&cpu->name, "MediaTek Dimensity 9300+ [MT8796Z]");
159+
else if (ffStrbufEqualS(&cpu->name, "MT6989"))
160+
ffStrbufSetStatic(&cpu->name, "MediaTek Dimensity 9300 [MT6989]");
161+
else if (ffStrbufEqualS(&cpu->name, "MT8796"))
162+
ffStrbufSetStatic(&cpu->name, "MediaTek Dimensity 9300 [MT8796]");
163+
else if (ffStrbufEqualS(&cpu->name, "MT6985W"))
164+
ffStrbufSetStatic(&cpu->name, "MediaTek Dimensity 9200+ [MT6985W]");
165+
else if (ffStrbufEqualS(&cpu->name, "MT6985"))
166+
ffStrbufSetStatic(&cpu->name, "MediaTek Dimensity 9200 [MT6985]");
167+
else if (ffStrbufEqualS(&cpu->name, "MT6983W"))
168+
ffStrbufSetStatic(&cpu->name, "MediaTek Dimensity 9000+ [MT6983W]");
169+
else if (ffStrbufEqualS(&cpu->name, "MT8798Z/T"))
170+
ffStrbufSetStatic(&cpu->name, "MediaTek Dimensity 9000+ [MT8798Z/T]");
171+
else if (ffStrbufEqualS(&cpu->name, "MT6983Z"))
172+
ffStrbufSetStatic(&cpu->name, "MediaTek Dimensity 9000 [MT6983Z]");
173+
else if (ffStrbufEqualS(&cpu->name, "MT8798Z/C"))
174+
ffStrbufSetStatic(&cpu->name, "MediaTek Dimensity 9000 [MT8798Z/C]");
175+
}
176+
147177
static void detectAndroid(FFCPUResult* cpu)
148178
{
149179
if (cpu->name.length == 0)
@@ -161,6 +191,8 @@ static void detectAndroid(FFCPUResult* cpu)
161191

162192
if (ffStrbufEqualS(&cpu->vendor, "QTI") && ffStrbufStartsWithS(&cpu->name, "SM"))
163193
detectQualcomm(cpu);
194+
else if (ffStrbufEqualS(&cpu->vendor, "MTK") && ffStrbufStartsWithS(&cpu->name, "MT"))
195+
detectMediaTek(cpu);
164196
}
165197
#endif
166198

0 commit comments

Comments
 (0)