18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci cx231xx-pcb-config.c - driver for Conexant 48c2ecf20Sopenharmony_ci Cx23100/101/102 USB video capture devices 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci Copyright (C) 2008 <srinivasa.deevi at conexant dot com> 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include "cx231xx.h" 118c2ecf20Sopenharmony_ci#include "cx231xx-conf-reg.h" 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_cistatic unsigned int pcb_debug; 148c2ecf20Sopenharmony_cimodule_param(pcb_debug, int, 0644); 158c2ecf20Sopenharmony_ciMODULE_PARM_DESC(pcb_debug, "enable pcb config debug messages [video]"); 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci/******************************************************************************/ 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_cistatic struct pcb_config cx231xx_Scenario[] = { 208c2ecf20Sopenharmony_ci { 218c2ecf20Sopenharmony_ci INDEX_SELFPOWER_DIGITAL_ONLY, /* index */ 228c2ecf20Sopenharmony_ci USB_SELF_POWER, /* power_type */ 238c2ecf20Sopenharmony_ci 0, /* speed , not decide yet */ 248c2ecf20Sopenharmony_ci MOD_DIGITAL, /* mode */ 258c2ecf20Sopenharmony_ci SOURCE_TS_BDA, /* ts1_source, digital tv only */ 268c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts2_source */ 278c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* analog source */ 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci 0, /* digital_index */ 308c2ecf20Sopenharmony_ci 0, /* analog index */ 318c2ecf20Sopenharmony_ci 0, /* dif_index */ 328c2ecf20Sopenharmony_ci 0, /* external_index */ 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci 1, /* only one configuration */ 358c2ecf20Sopenharmony_ci { 368c2ecf20Sopenharmony_ci { 378c2ecf20Sopenharmony_ci 0, /* config index */ 388c2ecf20Sopenharmony_ci { 398c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 408c2ecf20Sopenharmony_ci 1, /* ts1 index */ 418c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* TS2 index */ 428c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* AUDIO */ 438c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VIDEO */ 448c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VANC */ 458c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* HANC */ 468c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 478c2ecf20Sopenharmony_ci } 488c2ecf20Sopenharmony_ci , 498c2ecf20Sopenharmony_ci } 508c2ecf20Sopenharmony_ci , 518c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 528c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 538c2ecf20Sopenharmony_ci NOT_SUPPORTED} 548c2ecf20Sopenharmony_ci } 558c2ecf20Sopenharmony_ci , 568c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 578c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 588c2ecf20Sopenharmony_ci NOT_SUPPORTED} 598c2ecf20Sopenharmony_ci } 608c2ecf20Sopenharmony_ci } 618c2ecf20Sopenharmony_ci , 628c2ecf20Sopenharmony_ci /* full-speed config */ 638c2ecf20Sopenharmony_ci { 648c2ecf20Sopenharmony_ci { 658c2ecf20Sopenharmony_ci 0, /* config index */ 668c2ecf20Sopenharmony_ci { 678c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 688c2ecf20Sopenharmony_ci 1, /* ts1 index */ 698c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* TS2 index */ 708c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* AUDIO */ 718c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VIDEO */ 728c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VANC */ 738c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* HANC */ 748c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 758c2ecf20Sopenharmony_ci } 768c2ecf20Sopenharmony_ci } 778c2ecf20Sopenharmony_ci , 788c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 798c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 808c2ecf20Sopenharmony_ci NOT_SUPPORTED} 818c2ecf20Sopenharmony_ci } 828c2ecf20Sopenharmony_ci , 838c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 848c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 858c2ecf20Sopenharmony_ci NOT_SUPPORTED} 868c2ecf20Sopenharmony_ci } 878c2ecf20Sopenharmony_ci } 888c2ecf20Sopenharmony_ci } 898c2ecf20Sopenharmony_ci , 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci { 928c2ecf20Sopenharmony_ci INDEX_SELFPOWER_DUAL_DIGITAL, /* index */ 938c2ecf20Sopenharmony_ci USB_SELF_POWER, /* power_type */ 948c2ecf20Sopenharmony_ci 0, /* speed , not decide yet */ 958c2ecf20Sopenharmony_ci MOD_DIGITAL, /* mode */ 968c2ecf20Sopenharmony_ci SOURCE_TS_BDA, /* ts1_source, digital tv only */ 978c2ecf20Sopenharmony_ci 0, /* ts2_source,need update from register */ 988c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* analog source */ 998c2ecf20Sopenharmony_ci 0, /* digital_index */ 1008c2ecf20Sopenharmony_ci 0, /* analog index */ 1018c2ecf20Sopenharmony_ci 0, /* dif_index */ 1028c2ecf20Sopenharmony_ci 0, /* external_index */ 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ci 1, /* only one configuration */ 1058c2ecf20Sopenharmony_ci { 1068c2ecf20Sopenharmony_ci { 1078c2ecf20Sopenharmony_ci 0, /* config index */ 1088c2ecf20Sopenharmony_ci { 1098c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 1108c2ecf20Sopenharmony_ci 1, /* ts1 index */ 1118c2ecf20Sopenharmony_ci 2, /* TS2 index */ 1128c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* AUDIO */ 1138c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VIDEO */ 1148c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VANC */ 1158c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* HANC */ 1168c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 1178c2ecf20Sopenharmony_ci } 1188c2ecf20Sopenharmony_ci } 1198c2ecf20Sopenharmony_ci , 1208c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 1218c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 1228c2ecf20Sopenharmony_ci NOT_SUPPORTED} 1238c2ecf20Sopenharmony_ci } 1248c2ecf20Sopenharmony_ci , 1258c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 1268c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 1278c2ecf20Sopenharmony_ci NOT_SUPPORTED} 1288c2ecf20Sopenharmony_ci } 1298c2ecf20Sopenharmony_ci } 1308c2ecf20Sopenharmony_ci , 1318c2ecf20Sopenharmony_ci /* full-speed */ 1328c2ecf20Sopenharmony_ci { 1338c2ecf20Sopenharmony_ci { 1348c2ecf20Sopenharmony_ci 0, /* config index */ 1358c2ecf20Sopenharmony_ci { 1368c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 1378c2ecf20Sopenharmony_ci 1, /* ts1 index */ 1388c2ecf20Sopenharmony_ci 2, /* TS2 index */ 1398c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* AUDIO */ 1408c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VIDEO */ 1418c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VANC */ 1428c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* HANC */ 1438c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 1448c2ecf20Sopenharmony_ci } 1458c2ecf20Sopenharmony_ci } 1468c2ecf20Sopenharmony_ci , 1478c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 1488c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 1498c2ecf20Sopenharmony_ci NOT_SUPPORTED} 1508c2ecf20Sopenharmony_ci } 1518c2ecf20Sopenharmony_ci , 1528c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 1538c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 1548c2ecf20Sopenharmony_ci NOT_SUPPORTED} 1558c2ecf20Sopenharmony_ci } 1568c2ecf20Sopenharmony_ci } 1578c2ecf20Sopenharmony_ci } 1588c2ecf20Sopenharmony_ci , 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_ci { 1618c2ecf20Sopenharmony_ci INDEX_SELFPOWER_ANALOG_ONLY, /* index */ 1628c2ecf20Sopenharmony_ci USB_SELF_POWER, /* power_type */ 1638c2ecf20Sopenharmony_ci 0, /* speed , not decide yet */ 1648c2ecf20Sopenharmony_ci MOD_ANALOG | MOD_DIF | MOD_EXTERNAL, /* mode ,analog tv only */ 1658c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts1_source, NOT SUPPORT */ 1668c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts2_source,NOT SUPPORT */ 1678c2ecf20Sopenharmony_ci 0, /* analog source, need update */ 1688c2ecf20Sopenharmony_ci 1698c2ecf20Sopenharmony_ci 0, /* digital_index */ 1708c2ecf20Sopenharmony_ci 0, /* analog index */ 1718c2ecf20Sopenharmony_ci 0, /* dif_index */ 1728c2ecf20Sopenharmony_ci 0, /* external_index */ 1738c2ecf20Sopenharmony_ci 1748c2ecf20Sopenharmony_ci 1, /* only one configuration */ 1758c2ecf20Sopenharmony_ci { 1768c2ecf20Sopenharmony_ci { 1778c2ecf20Sopenharmony_ci 0, /* config index */ 1788c2ecf20Sopenharmony_ci { 1798c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 1808c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts1 index */ 1818c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* TS2 index */ 1828c2ecf20Sopenharmony_ci 1, /* AUDIO */ 1838c2ecf20Sopenharmony_ci 2, /* VIDEO */ 1848c2ecf20Sopenharmony_ci 3, /* VANC */ 1858c2ecf20Sopenharmony_ci 4, /* HANC */ 1868c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 1878c2ecf20Sopenharmony_ci } 1888c2ecf20Sopenharmony_ci } 1898c2ecf20Sopenharmony_ci , 1908c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 1918c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 1928c2ecf20Sopenharmony_ci NOT_SUPPORTED} 1938c2ecf20Sopenharmony_ci } 1948c2ecf20Sopenharmony_ci , 1958c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 1968c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 1978c2ecf20Sopenharmony_ci NOT_SUPPORTED} 1988c2ecf20Sopenharmony_ci } 1998c2ecf20Sopenharmony_ci } 2008c2ecf20Sopenharmony_ci , 2018c2ecf20Sopenharmony_ci /* full-speed */ 2028c2ecf20Sopenharmony_ci { 2038c2ecf20Sopenharmony_ci { 2048c2ecf20Sopenharmony_ci 0, /* config index */ 2058c2ecf20Sopenharmony_ci { 2068c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 2078c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts1 index */ 2088c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* TS2 index */ 2098c2ecf20Sopenharmony_ci 1, /* AUDIO */ 2108c2ecf20Sopenharmony_ci 2, /* VIDEO */ 2118c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VANC */ 2128c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* HANC */ 2138c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 2148c2ecf20Sopenharmony_ci } 2158c2ecf20Sopenharmony_ci } 2168c2ecf20Sopenharmony_ci , 2178c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 2188c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 2198c2ecf20Sopenharmony_ci NOT_SUPPORTED} 2208c2ecf20Sopenharmony_ci } 2218c2ecf20Sopenharmony_ci , 2228c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 2238c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 2248c2ecf20Sopenharmony_ci NOT_SUPPORTED} 2258c2ecf20Sopenharmony_ci } 2268c2ecf20Sopenharmony_ci } 2278c2ecf20Sopenharmony_ci } 2288c2ecf20Sopenharmony_ci , 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci { 2318c2ecf20Sopenharmony_ci INDEX_SELFPOWER_DUAL, /* index */ 2328c2ecf20Sopenharmony_ci USB_SELF_POWER, /* power_type */ 2338c2ecf20Sopenharmony_ci 0, /* speed , not decide yet */ 2348c2ecf20Sopenharmony_ci /* mode ,analog tv and digital path */ 2358c2ecf20Sopenharmony_ci MOD_ANALOG | MOD_DIF | MOD_DIGITAL | MOD_EXTERNAL, 2368c2ecf20Sopenharmony_ci 0, /* ts1_source,will update in register */ 2378c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts2_source,NOT SUPPORT */ 2388c2ecf20Sopenharmony_ci 0, /* analog source need update */ 2398c2ecf20Sopenharmony_ci 0, /* digital_index */ 2408c2ecf20Sopenharmony_ci 0, /* analog index */ 2418c2ecf20Sopenharmony_ci 0, /* dif_index */ 2428c2ecf20Sopenharmony_ci 0, /* external_index */ 2438c2ecf20Sopenharmony_ci 1, /* only one configuration */ 2448c2ecf20Sopenharmony_ci { 2458c2ecf20Sopenharmony_ci { 2468c2ecf20Sopenharmony_ci 0, /* config index */ 2478c2ecf20Sopenharmony_ci { 2488c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 2498c2ecf20Sopenharmony_ci 1, /* ts1 index */ 2508c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* TS2 index */ 2518c2ecf20Sopenharmony_ci 2, /* AUDIO */ 2528c2ecf20Sopenharmony_ci 3, /* VIDEO */ 2538c2ecf20Sopenharmony_ci 4, /* VANC */ 2548c2ecf20Sopenharmony_ci 5, /* HANC */ 2558c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 2568c2ecf20Sopenharmony_ci } 2578c2ecf20Sopenharmony_ci } 2588c2ecf20Sopenharmony_ci , 2598c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 2608c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 2618c2ecf20Sopenharmony_ci NOT_SUPPORTED} 2628c2ecf20Sopenharmony_ci } 2638c2ecf20Sopenharmony_ci , 2648c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 2658c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 2668c2ecf20Sopenharmony_ci NOT_SUPPORTED} 2678c2ecf20Sopenharmony_ci } 2688c2ecf20Sopenharmony_ci } 2698c2ecf20Sopenharmony_ci , 2708c2ecf20Sopenharmony_ci /* full-speed */ 2718c2ecf20Sopenharmony_ci { 2728c2ecf20Sopenharmony_ci { 2738c2ecf20Sopenharmony_ci 0, /* config index */ 2748c2ecf20Sopenharmony_ci { 2758c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 2768c2ecf20Sopenharmony_ci 1, /* ts1 index */ 2778c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* TS2 index */ 2788c2ecf20Sopenharmony_ci 2, /* AUDIO */ 2798c2ecf20Sopenharmony_ci 3, /* VIDEO */ 2808c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VANC */ 2818c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* HANC */ 2828c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 2838c2ecf20Sopenharmony_ci } 2848c2ecf20Sopenharmony_ci } 2858c2ecf20Sopenharmony_ci , 2868c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 2878c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 2888c2ecf20Sopenharmony_ci NOT_SUPPORTED} 2898c2ecf20Sopenharmony_ci } 2908c2ecf20Sopenharmony_ci , 2918c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 2928c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 2938c2ecf20Sopenharmony_ci NOT_SUPPORTED} 2948c2ecf20Sopenharmony_ci } 2958c2ecf20Sopenharmony_ci } 2968c2ecf20Sopenharmony_ci } 2978c2ecf20Sopenharmony_ci , 2988c2ecf20Sopenharmony_ci 2998c2ecf20Sopenharmony_ci { 3008c2ecf20Sopenharmony_ci INDEX_SELFPOWER_TRIPLE, /* index */ 3018c2ecf20Sopenharmony_ci USB_SELF_POWER, /* power_type */ 3028c2ecf20Sopenharmony_ci 0, /* speed , not decide yet */ 3038c2ecf20Sopenharmony_ci /* mode ,analog tv and digital path */ 3048c2ecf20Sopenharmony_ci MOD_ANALOG | MOD_DIF | MOD_DIGITAL | MOD_EXTERNAL, 3058c2ecf20Sopenharmony_ci 0, /* ts1_source, update in register */ 3068c2ecf20Sopenharmony_ci 0, /* ts2_source,update in register */ 3078c2ecf20Sopenharmony_ci 0, /* analog source, need update */ 3088c2ecf20Sopenharmony_ci 3098c2ecf20Sopenharmony_ci 0, /* digital_index */ 3108c2ecf20Sopenharmony_ci 0, /* analog index */ 3118c2ecf20Sopenharmony_ci 0, /* dif_index */ 3128c2ecf20Sopenharmony_ci 0, /* external_index */ 3138c2ecf20Sopenharmony_ci 1, /* only one configuration */ 3148c2ecf20Sopenharmony_ci { 3158c2ecf20Sopenharmony_ci { 3168c2ecf20Sopenharmony_ci 0, /* config index */ 3178c2ecf20Sopenharmony_ci { 3188c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 3198c2ecf20Sopenharmony_ci 1, /* ts1 index */ 3208c2ecf20Sopenharmony_ci 2, /* TS2 index */ 3218c2ecf20Sopenharmony_ci 3, /* AUDIO */ 3228c2ecf20Sopenharmony_ci 4, /* VIDEO */ 3238c2ecf20Sopenharmony_ci 5, /* VANC */ 3248c2ecf20Sopenharmony_ci 6, /* HANC */ 3258c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 3268c2ecf20Sopenharmony_ci } 3278c2ecf20Sopenharmony_ci } 3288c2ecf20Sopenharmony_ci , 3298c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 3308c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 3318c2ecf20Sopenharmony_ci NOT_SUPPORTED} 3328c2ecf20Sopenharmony_ci } 3338c2ecf20Sopenharmony_ci , 3348c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 3358c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 3368c2ecf20Sopenharmony_ci NOT_SUPPORTED} 3378c2ecf20Sopenharmony_ci } 3388c2ecf20Sopenharmony_ci } 3398c2ecf20Sopenharmony_ci , 3408c2ecf20Sopenharmony_ci /* full-speed */ 3418c2ecf20Sopenharmony_ci { 3428c2ecf20Sopenharmony_ci { 3438c2ecf20Sopenharmony_ci 0, /* config index */ 3448c2ecf20Sopenharmony_ci { 3458c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 3468c2ecf20Sopenharmony_ci 1, /* ts1 index */ 3478c2ecf20Sopenharmony_ci 2, /* TS2 index */ 3488c2ecf20Sopenharmony_ci 3, /* AUDIO */ 3498c2ecf20Sopenharmony_ci 4, /* VIDEO */ 3508c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VANC */ 3518c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* HANC */ 3528c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 3538c2ecf20Sopenharmony_ci } 3548c2ecf20Sopenharmony_ci } 3558c2ecf20Sopenharmony_ci , 3568c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 3578c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 3588c2ecf20Sopenharmony_ci NOT_SUPPORTED} 3598c2ecf20Sopenharmony_ci } 3608c2ecf20Sopenharmony_ci , 3618c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 3628c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 3638c2ecf20Sopenharmony_ci NOT_SUPPORTED} 3648c2ecf20Sopenharmony_ci } 3658c2ecf20Sopenharmony_ci } 3668c2ecf20Sopenharmony_ci } 3678c2ecf20Sopenharmony_ci , 3688c2ecf20Sopenharmony_ci 3698c2ecf20Sopenharmony_ci { 3708c2ecf20Sopenharmony_ci INDEX_SELFPOWER_COMPRESSOR, /* index */ 3718c2ecf20Sopenharmony_ci USB_SELF_POWER, /* power_type */ 3728c2ecf20Sopenharmony_ci 0, /* speed , not decide yet */ 3738c2ecf20Sopenharmony_ci /* mode ,analog tv AND DIGITAL path */ 3748c2ecf20Sopenharmony_ci MOD_ANALOG | MOD_DIF | MOD_DIGITAL | MOD_EXTERNAL, 3758c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts1_source, disable */ 3768c2ecf20Sopenharmony_ci SOURCE_TS_BDA, /* ts2_source */ 3778c2ecf20Sopenharmony_ci 0, /* analog source,need update */ 3788c2ecf20Sopenharmony_ci 0, /* digital_index */ 3798c2ecf20Sopenharmony_ci 0, /* analog index */ 3808c2ecf20Sopenharmony_ci 0, /* dif_index */ 3818c2ecf20Sopenharmony_ci 0, /* external_index */ 3828c2ecf20Sopenharmony_ci 1, /* only one configuration */ 3838c2ecf20Sopenharmony_ci { 3848c2ecf20Sopenharmony_ci { 3858c2ecf20Sopenharmony_ci 0, /* config index */ 3868c2ecf20Sopenharmony_ci { 3878c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 3888c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts1 index */ 3898c2ecf20Sopenharmony_ci 1, /* TS2 index */ 3908c2ecf20Sopenharmony_ci 2, /* AUDIO */ 3918c2ecf20Sopenharmony_ci 3, /* VIDEO */ 3928c2ecf20Sopenharmony_ci 4, /* VANC */ 3938c2ecf20Sopenharmony_ci 5, /* HANC */ 3948c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 3958c2ecf20Sopenharmony_ci } 3968c2ecf20Sopenharmony_ci } 3978c2ecf20Sopenharmony_ci , 3988c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 3998c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 4008c2ecf20Sopenharmony_ci NOT_SUPPORTED} 4018c2ecf20Sopenharmony_ci } 4028c2ecf20Sopenharmony_ci , 4038c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 4048c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 4058c2ecf20Sopenharmony_ci NOT_SUPPORTED} 4068c2ecf20Sopenharmony_ci } 4078c2ecf20Sopenharmony_ci } 4088c2ecf20Sopenharmony_ci , 4098c2ecf20Sopenharmony_ci /* full-speed */ 4108c2ecf20Sopenharmony_ci { 4118c2ecf20Sopenharmony_ci { 4128c2ecf20Sopenharmony_ci 0, /* config index */ 4138c2ecf20Sopenharmony_ci { 4148c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 4158c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts1 index */ 4168c2ecf20Sopenharmony_ci 1, /* TS2 index */ 4178c2ecf20Sopenharmony_ci 2, /* AUDIO */ 4188c2ecf20Sopenharmony_ci 3, /* VIDEO */ 4198c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VANC */ 4208c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* HANC */ 4218c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 4228c2ecf20Sopenharmony_ci } 4238c2ecf20Sopenharmony_ci } 4248c2ecf20Sopenharmony_ci , 4258c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 4268c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 4278c2ecf20Sopenharmony_ci NOT_SUPPORTED} 4288c2ecf20Sopenharmony_ci } 4298c2ecf20Sopenharmony_ci , 4308c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 4318c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 4328c2ecf20Sopenharmony_ci NOT_SUPPORTED} 4338c2ecf20Sopenharmony_ci } 4348c2ecf20Sopenharmony_ci } 4358c2ecf20Sopenharmony_ci } 4368c2ecf20Sopenharmony_ci , 4378c2ecf20Sopenharmony_ci 4388c2ecf20Sopenharmony_ci { 4398c2ecf20Sopenharmony_ci INDEX_BUSPOWER_DIGITAL_ONLY, /* index */ 4408c2ecf20Sopenharmony_ci USB_BUS_POWER, /* power_type */ 4418c2ecf20Sopenharmony_ci 0, /* speed , not decide yet */ 4428c2ecf20Sopenharmony_ci MOD_DIGITAL, /* mode ,analog tv AND DIGITAL path */ 4438c2ecf20Sopenharmony_ci SOURCE_TS_BDA, /* ts1_source, disable */ 4448c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts2_source */ 4458c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* analog source */ 4468c2ecf20Sopenharmony_ci 4478c2ecf20Sopenharmony_ci 0, /* digital_index */ 4488c2ecf20Sopenharmony_ci 0, /* analog index */ 4498c2ecf20Sopenharmony_ci 0, /* dif_index */ 4508c2ecf20Sopenharmony_ci 0, /* external_index */ 4518c2ecf20Sopenharmony_ci 4528c2ecf20Sopenharmony_ci 1, /* only one configuration */ 4538c2ecf20Sopenharmony_ci { 4548c2ecf20Sopenharmony_ci { 4558c2ecf20Sopenharmony_ci 0, /* config index */ 4568c2ecf20Sopenharmony_ci { 4578c2ecf20Sopenharmony_ci 0, /* interrupt ep index = 2 */ 4588c2ecf20Sopenharmony_ci 1, /* ts1 index */ 4598c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* TS2 index */ 4608c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* AUDIO */ 4618c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VIDEO */ 4628c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VANC */ 4638c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* HANC */ 4648c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 4658c2ecf20Sopenharmony_ci } 4668c2ecf20Sopenharmony_ci } 4678c2ecf20Sopenharmony_ci , 4688c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 4698c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 4708c2ecf20Sopenharmony_ci NOT_SUPPORTED} 4718c2ecf20Sopenharmony_ci } 4728c2ecf20Sopenharmony_ci , 4738c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 4748c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 4758c2ecf20Sopenharmony_ci NOT_SUPPORTED} 4768c2ecf20Sopenharmony_ci } 4778c2ecf20Sopenharmony_ci } 4788c2ecf20Sopenharmony_ci , 4798c2ecf20Sopenharmony_ci /* full-speed */ 4808c2ecf20Sopenharmony_ci { 4818c2ecf20Sopenharmony_ci { 4828c2ecf20Sopenharmony_ci 0, /* config index */ 4838c2ecf20Sopenharmony_ci { 4848c2ecf20Sopenharmony_ci 0, /* interrupt ep index = 2 */ 4858c2ecf20Sopenharmony_ci 1, /* ts1 index */ 4868c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* TS2 index */ 4878c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* AUDIO */ 4888c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VIDEO */ 4898c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VANC */ 4908c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* HANC */ 4918c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 4928c2ecf20Sopenharmony_ci } 4938c2ecf20Sopenharmony_ci } 4948c2ecf20Sopenharmony_ci , 4958c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 4968c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 4978c2ecf20Sopenharmony_ci NOT_SUPPORTED} 4988c2ecf20Sopenharmony_ci } 4998c2ecf20Sopenharmony_ci , 5008c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 5018c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 5028c2ecf20Sopenharmony_ci NOT_SUPPORTED} 5038c2ecf20Sopenharmony_ci } 5048c2ecf20Sopenharmony_ci } 5058c2ecf20Sopenharmony_ci } 5068c2ecf20Sopenharmony_ci , 5078c2ecf20Sopenharmony_ci { 5088c2ecf20Sopenharmony_ci INDEX_BUSPOWER_ANALOG_ONLY, /* index */ 5098c2ecf20Sopenharmony_ci USB_BUS_POWER, /* power_type */ 5108c2ecf20Sopenharmony_ci 0, /* speed , not decide yet */ 5118c2ecf20Sopenharmony_ci MOD_ANALOG, /* mode ,analog tv AND DIGITAL path */ 5128c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts1_source, disable */ 5138c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts2_source */ 5148c2ecf20Sopenharmony_ci SOURCE_ANALOG, /* analog source--analog */ 5158c2ecf20Sopenharmony_ci 0, /* digital_index */ 5168c2ecf20Sopenharmony_ci 0, /* analog index */ 5178c2ecf20Sopenharmony_ci 0, /* dif_index */ 5188c2ecf20Sopenharmony_ci 0, /* external_index */ 5198c2ecf20Sopenharmony_ci 1, /* only one configuration */ 5208c2ecf20Sopenharmony_ci { 5218c2ecf20Sopenharmony_ci { 5228c2ecf20Sopenharmony_ci 0, /* config index */ 5238c2ecf20Sopenharmony_ci { 5248c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 5258c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts1 index */ 5268c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* TS2 index */ 5278c2ecf20Sopenharmony_ci 1, /* AUDIO */ 5288c2ecf20Sopenharmony_ci 2, /* VIDEO */ 5298c2ecf20Sopenharmony_ci 3, /* VANC */ 5308c2ecf20Sopenharmony_ci 4, /* HANC */ 5318c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 5328c2ecf20Sopenharmony_ci } 5338c2ecf20Sopenharmony_ci } 5348c2ecf20Sopenharmony_ci , 5358c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 5368c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 5378c2ecf20Sopenharmony_ci NOT_SUPPORTED} 5388c2ecf20Sopenharmony_ci } 5398c2ecf20Sopenharmony_ci , 5408c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 5418c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 5428c2ecf20Sopenharmony_ci NOT_SUPPORTED} 5438c2ecf20Sopenharmony_ci } 5448c2ecf20Sopenharmony_ci } 5458c2ecf20Sopenharmony_ci , 5468c2ecf20Sopenharmony_ci { /* full-speed */ 5478c2ecf20Sopenharmony_ci { 5488c2ecf20Sopenharmony_ci 0, /* config index */ 5498c2ecf20Sopenharmony_ci { 5508c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 5518c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts1 index */ 5528c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* TS2 index */ 5538c2ecf20Sopenharmony_ci 1, /* AUDIO */ 5548c2ecf20Sopenharmony_ci 2, /* VIDEO */ 5558c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VANC */ 5568c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* HANC */ 5578c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 5588c2ecf20Sopenharmony_ci } 5598c2ecf20Sopenharmony_ci } 5608c2ecf20Sopenharmony_ci , 5618c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 5628c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 5638c2ecf20Sopenharmony_ci NOT_SUPPORTED} 5648c2ecf20Sopenharmony_ci } 5658c2ecf20Sopenharmony_ci , 5668c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 5678c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 5688c2ecf20Sopenharmony_ci NOT_SUPPORTED} 5698c2ecf20Sopenharmony_ci } 5708c2ecf20Sopenharmony_ci } 5718c2ecf20Sopenharmony_ci } 5728c2ecf20Sopenharmony_ci , 5738c2ecf20Sopenharmony_ci { 5748c2ecf20Sopenharmony_ci INDEX_BUSPOWER_DIF_ONLY, /* index */ 5758c2ecf20Sopenharmony_ci USB_BUS_POWER, /* power_type */ 5768c2ecf20Sopenharmony_ci 0, /* speed , not decide yet */ 5778c2ecf20Sopenharmony_ci /* mode ,analog tv AND DIGITAL path */ 5788c2ecf20Sopenharmony_ci MOD_DIF | MOD_ANALOG | MOD_DIGITAL | MOD_EXTERNAL, 5798c2ecf20Sopenharmony_ci SOURCE_TS_BDA, /* ts1_source, disable */ 5808c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* ts2_source */ 5818c2ecf20Sopenharmony_ci SOURCE_DIF | SOURCE_ANALOG | SOURCE_EXTERNAL, /* analog source, dif */ 5828c2ecf20Sopenharmony_ci 0, /* digital_index */ 5838c2ecf20Sopenharmony_ci 0, /* analog index */ 5848c2ecf20Sopenharmony_ci 0, /* dif_index */ 5858c2ecf20Sopenharmony_ci 0, /* external_index */ 5868c2ecf20Sopenharmony_ci 1, /* only one configuration */ 5878c2ecf20Sopenharmony_ci { 5888c2ecf20Sopenharmony_ci { 5898c2ecf20Sopenharmony_ci 0, /* config index */ 5908c2ecf20Sopenharmony_ci { 5918c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 5928c2ecf20Sopenharmony_ci 1, /* ts1 index */ 5938c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* TS2 index */ 5948c2ecf20Sopenharmony_ci 2, /* AUDIO */ 5958c2ecf20Sopenharmony_ci 3, /* VIDEO */ 5968c2ecf20Sopenharmony_ci 4, /* VANC */ 5978c2ecf20Sopenharmony_ci 5, /* HANC */ 5988c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 5998c2ecf20Sopenharmony_ci } 6008c2ecf20Sopenharmony_ci } 6018c2ecf20Sopenharmony_ci , 6028c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 6038c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 6048c2ecf20Sopenharmony_ci NOT_SUPPORTED} 6058c2ecf20Sopenharmony_ci } 6068c2ecf20Sopenharmony_ci , 6078c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 6088c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 6098c2ecf20Sopenharmony_ci NOT_SUPPORTED} 6108c2ecf20Sopenharmony_ci } 6118c2ecf20Sopenharmony_ci } 6128c2ecf20Sopenharmony_ci , 6138c2ecf20Sopenharmony_ci { /* full speed */ 6148c2ecf20Sopenharmony_ci { 6158c2ecf20Sopenharmony_ci 0, /* config index */ 6168c2ecf20Sopenharmony_ci { 6178c2ecf20Sopenharmony_ci 0, /* interrupt ep index */ 6188c2ecf20Sopenharmony_ci 1, /* ts1 index */ 6198c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* TS2 index */ 6208c2ecf20Sopenharmony_ci 2, /* AUDIO */ 6218c2ecf20Sopenharmony_ci 3, /* VIDEO */ 6228c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* VANC */ 6238c2ecf20Sopenharmony_ci NOT_SUPPORTED, /* HANC */ 6248c2ecf20Sopenharmony_ci NOT_SUPPORTED /* ir_index */ 6258c2ecf20Sopenharmony_ci } 6268c2ecf20Sopenharmony_ci } 6278c2ecf20Sopenharmony_ci , 6288c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 6298c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 6308c2ecf20Sopenharmony_ci NOT_SUPPORTED} 6318c2ecf20Sopenharmony_ci } 6328c2ecf20Sopenharmony_ci , 6338c2ecf20Sopenharmony_ci {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 6348c2ecf20Sopenharmony_ci NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED, 6358c2ecf20Sopenharmony_ci NOT_SUPPORTED} 6368c2ecf20Sopenharmony_ci } 6378c2ecf20Sopenharmony_ci } 6388c2ecf20Sopenharmony_ci } 6398c2ecf20Sopenharmony_ci , 6408c2ecf20Sopenharmony_ci 6418c2ecf20Sopenharmony_ci}; 6428c2ecf20Sopenharmony_ci 6438c2ecf20Sopenharmony_ci/*****************************************************************/ 6448c2ecf20Sopenharmony_ci 6458c2ecf20Sopenharmony_ciint initialize_cx231xx(struct cx231xx *dev) 6468c2ecf20Sopenharmony_ci{ 6478c2ecf20Sopenharmony_ci int retval; 6488c2ecf20Sopenharmony_ci u32 config_info = 0; 6498c2ecf20Sopenharmony_ci struct pcb_config *p_pcb_info; 6508c2ecf20Sopenharmony_ci u8 usb_speed = 1; /* from register,1--HS, 0--FS */ 6518c2ecf20Sopenharmony_ci u8 data[4] = { 0, 0, 0, 0 }; 6528c2ecf20Sopenharmony_ci u32 ts1_source = 0; 6538c2ecf20Sopenharmony_ci u32 ts2_source = 0; 6548c2ecf20Sopenharmony_ci u32 analog_source = 0; 6558c2ecf20Sopenharmony_ci u8 _current_scenario_idx = 0xff; 6568c2ecf20Sopenharmony_ci 6578c2ecf20Sopenharmony_ci ts1_source = SOURCE_TS_BDA; 6588c2ecf20Sopenharmony_ci ts2_source = SOURCE_TS_BDA; 6598c2ecf20Sopenharmony_ci 6608c2ecf20Sopenharmony_ci /* read board config register to find out which 6618c2ecf20Sopenharmony_ci pcb config it is related to */ 6628c2ecf20Sopenharmony_ci retval = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, BOARD_CFG_STAT, 6638c2ecf20Sopenharmony_ci data, 4); 6648c2ecf20Sopenharmony_ci if (retval < 0) 6658c2ecf20Sopenharmony_ci return retval; 6668c2ecf20Sopenharmony_ci 6678c2ecf20Sopenharmony_ci config_info = le32_to_cpu(*((__le32 *)data)); 6688c2ecf20Sopenharmony_ci usb_speed = (u8) (config_info & 0x1); 6698c2ecf20Sopenharmony_ci 6708c2ecf20Sopenharmony_ci /* Verify this device belongs to Bus power or Self power device */ 6718c2ecf20Sopenharmony_ci if (config_info & BUS_POWER) { /* bus-power */ 6728c2ecf20Sopenharmony_ci switch (config_info & BUSPOWER_MASK) { 6738c2ecf20Sopenharmony_ci case TS1_PORT | BUS_POWER: 6748c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_BUSPOWER_DIGITAL_ONLY].speed = 6758c2ecf20Sopenharmony_ci usb_speed; 6768c2ecf20Sopenharmony_ci p_pcb_info = 6778c2ecf20Sopenharmony_ci &cx231xx_Scenario[INDEX_BUSPOWER_DIGITAL_ONLY]; 6788c2ecf20Sopenharmony_ci _current_scenario_idx = INDEX_BUSPOWER_DIGITAL_ONLY; 6798c2ecf20Sopenharmony_ci break; 6808c2ecf20Sopenharmony_ci case AVDEC_ENABLE | BUS_POWER: 6818c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_BUSPOWER_ANALOG_ONLY].speed = 6828c2ecf20Sopenharmony_ci usb_speed; 6838c2ecf20Sopenharmony_ci p_pcb_info = 6848c2ecf20Sopenharmony_ci &cx231xx_Scenario[INDEX_BUSPOWER_ANALOG_ONLY]; 6858c2ecf20Sopenharmony_ci _current_scenario_idx = INDEX_BUSPOWER_ANALOG_ONLY; 6868c2ecf20Sopenharmony_ci break; 6878c2ecf20Sopenharmony_ci case AVDEC_ENABLE | BUS_POWER | TS1_PORT: 6888c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_BUSPOWER_DIF_ONLY].speed = 6898c2ecf20Sopenharmony_ci usb_speed; 6908c2ecf20Sopenharmony_ci p_pcb_info = &cx231xx_Scenario[INDEX_BUSPOWER_DIF_ONLY]; 6918c2ecf20Sopenharmony_ci _current_scenario_idx = INDEX_BUSPOWER_DIF_ONLY; 6928c2ecf20Sopenharmony_ci break; 6938c2ecf20Sopenharmony_ci default: 6948c2ecf20Sopenharmony_ci dev_err(dev->dev, 6958c2ecf20Sopenharmony_ci "bad config in buspower!!!!\nconfig_info=%x\n", 6968c2ecf20Sopenharmony_ci config_info & BUSPOWER_MASK); 6978c2ecf20Sopenharmony_ci return 1; 6988c2ecf20Sopenharmony_ci } 6998c2ecf20Sopenharmony_ci } else { /* self-power */ 7008c2ecf20Sopenharmony_ci 7018c2ecf20Sopenharmony_ci switch (config_info & SELFPOWER_MASK) { 7028c2ecf20Sopenharmony_ci case TS1_PORT | SELF_POWER: 7038c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_DIGITAL_ONLY].speed = 7048c2ecf20Sopenharmony_ci usb_speed; 7058c2ecf20Sopenharmony_ci p_pcb_info = 7068c2ecf20Sopenharmony_ci &cx231xx_Scenario[INDEX_SELFPOWER_DIGITAL_ONLY]; 7078c2ecf20Sopenharmony_ci _current_scenario_idx = INDEX_SELFPOWER_DIGITAL_ONLY; 7088c2ecf20Sopenharmony_ci break; 7098c2ecf20Sopenharmony_ci case TS1_TS2_PORT | SELF_POWER: 7108c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_DUAL_DIGITAL].speed = 7118c2ecf20Sopenharmony_ci usb_speed; 7128c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_DUAL_DIGITAL]. 7138c2ecf20Sopenharmony_ci ts2_source = ts2_source; 7148c2ecf20Sopenharmony_ci p_pcb_info = 7158c2ecf20Sopenharmony_ci &cx231xx_Scenario[INDEX_SELFPOWER_DUAL_DIGITAL]; 7168c2ecf20Sopenharmony_ci _current_scenario_idx = INDEX_SELFPOWER_DUAL_DIGITAL; 7178c2ecf20Sopenharmony_ci break; 7188c2ecf20Sopenharmony_ci case AVDEC_ENABLE | SELF_POWER: 7198c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_ANALOG_ONLY].speed = 7208c2ecf20Sopenharmony_ci usb_speed; 7218c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_ANALOG_ONLY]. 7228c2ecf20Sopenharmony_ci analog_source = analog_source; 7238c2ecf20Sopenharmony_ci p_pcb_info = 7248c2ecf20Sopenharmony_ci &cx231xx_Scenario[INDEX_SELFPOWER_ANALOG_ONLY]; 7258c2ecf20Sopenharmony_ci _current_scenario_idx = INDEX_SELFPOWER_ANALOG_ONLY; 7268c2ecf20Sopenharmony_ci break; 7278c2ecf20Sopenharmony_ci case AVDEC_ENABLE | TS1_PORT | SELF_POWER: 7288c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_DUAL].speed = 7298c2ecf20Sopenharmony_ci usb_speed; 7308c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_DUAL].ts1_source = 7318c2ecf20Sopenharmony_ci ts1_source; 7328c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_DUAL].analog_source = 7338c2ecf20Sopenharmony_ci analog_source; 7348c2ecf20Sopenharmony_ci p_pcb_info = &cx231xx_Scenario[INDEX_SELFPOWER_DUAL]; 7358c2ecf20Sopenharmony_ci _current_scenario_idx = INDEX_SELFPOWER_DUAL; 7368c2ecf20Sopenharmony_ci break; 7378c2ecf20Sopenharmony_ci case AVDEC_ENABLE | TS1_TS2_PORT | SELF_POWER: 7388c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_TRIPLE].speed = 7398c2ecf20Sopenharmony_ci usb_speed; 7408c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_TRIPLE].ts1_source = 7418c2ecf20Sopenharmony_ci ts1_source; 7428c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_TRIPLE].ts2_source = 7438c2ecf20Sopenharmony_ci ts2_source; 7448c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_TRIPLE].analog_source = 7458c2ecf20Sopenharmony_ci analog_source; 7468c2ecf20Sopenharmony_ci p_pcb_info = &cx231xx_Scenario[INDEX_SELFPOWER_TRIPLE]; 7478c2ecf20Sopenharmony_ci _current_scenario_idx = INDEX_SELFPOWER_TRIPLE; 7488c2ecf20Sopenharmony_ci break; 7498c2ecf20Sopenharmony_ci case AVDEC_ENABLE | TS1VIP_TS2_PORT | SELF_POWER: 7508c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_COMPRESSOR].speed = 7518c2ecf20Sopenharmony_ci usb_speed; 7528c2ecf20Sopenharmony_ci cx231xx_Scenario[INDEX_SELFPOWER_COMPRESSOR]. 7538c2ecf20Sopenharmony_ci analog_source = analog_source; 7548c2ecf20Sopenharmony_ci p_pcb_info = 7558c2ecf20Sopenharmony_ci &cx231xx_Scenario[INDEX_SELFPOWER_COMPRESSOR]; 7568c2ecf20Sopenharmony_ci _current_scenario_idx = INDEX_SELFPOWER_COMPRESSOR; 7578c2ecf20Sopenharmony_ci break; 7588c2ecf20Sopenharmony_ci default: 7598c2ecf20Sopenharmony_ci dev_err(dev->dev, 7608c2ecf20Sopenharmony_ci "bad scenario!!!!!\nconfig_info=%x\n", 7618c2ecf20Sopenharmony_ci config_info & SELFPOWER_MASK); 7628c2ecf20Sopenharmony_ci return -ENODEV; 7638c2ecf20Sopenharmony_ci } 7648c2ecf20Sopenharmony_ci } 7658c2ecf20Sopenharmony_ci 7668c2ecf20Sopenharmony_ci dev->current_scenario_idx = _current_scenario_idx; 7678c2ecf20Sopenharmony_ci 7688c2ecf20Sopenharmony_ci memcpy(&dev->current_pcb_config, p_pcb_info, 7698c2ecf20Sopenharmony_ci sizeof(struct pcb_config)); 7708c2ecf20Sopenharmony_ci 7718c2ecf20Sopenharmony_ci if (pcb_debug) { 7728c2ecf20Sopenharmony_ci dev_info(dev->dev, 7738c2ecf20Sopenharmony_ci "SC(0x00) register = 0x%x\n", config_info); 7748c2ecf20Sopenharmony_ci dev_info(dev->dev, 7758c2ecf20Sopenharmony_ci "scenario %d\n", 7768c2ecf20Sopenharmony_ci (dev->current_pcb_config.index) + 1); 7778c2ecf20Sopenharmony_ci dev_info(dev->dev, 7788c2ecf20Sopenharmony_ci "type=%x\n", 7798c2ecf20Sopenharmony_ci dev->current_pcb_config.type); 7808c2ecf20Sopenharmony_ci dev_info(dev->dev, 7818c2ecf20Sopenharmony_ci "mode=%x\n", 7828c2ecf20Sopenharmony_ci dev->current_pcb_config.mode); 7838c2ecf20Sopenharmony_ci dev_info(dev->dev, 7848c2ecf20Sopenharmony_ci "speed=%x\n", 7858c2ecf20Sopenharmony_ci dev->current_pcb_config.speed); 7868c2ecf20Sopenharmony_ci dev_info(dev->dev, 7878c2ecf20Sopenharmony_ci "ts1_source=%x\n", 7888c2ecf20Sopenharmony_ci dev->current_pcb_config.ts1_source); 7898c2ecf20Sopenharmony_ci dev_info(dev->dev, 7908c2ecf20Sopenharmony_ci "ts2_source=%x\n", 7918c2ecf20Sopenharmony_ci dev->current_pcb_config.ts2_source); 7928c2ecf20Sopenharmony_ci dev_info(dev->dev, 7938c2ecf20Sopenharmony_ci "analog_source=%x\n", 7948c2ecf20Sopenharmony_ci dev->current_pcb_config.analog_source); 7958c2ecf20Sopenharmony_ci } 7968c2ecf20Sopenharmony_ci 7978c2ecf20Sopenharmony_ci return 0; 7988c2ecf20Sopenharmony_ci} 799