18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/***************************************************************************** 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (C) 2008 Cedric Bregardis <cedric.bregardis@free.fr> and 58c2ecf20Sopenharmony_ci * Jean-Christian Hassler <jhassler@free.fr> 68c2ecf20Sopenharmony_ci * Copyright 1998 Emagic Soft- und Hardware GmbH 78c2ecf20Sopenharmony_ci * Copyright 2002 Martijn Sipkema 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * This file is part of the Audiowerk2 ALSA driver 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci *****************************************************************************/ 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#define TSL_WS0 (1UL << 31) 148c2ecf20Sopenharmony_ci#define TSL_WS1 (1UL << 30) 158c2ecf20Sopenharmony_ci#define TSL_WS2 (1UL << 29) 168c2ecf20Sopenharmony_ci#define TSL_WS3 (1UL << 28) 178c2ecf20Sopenharmony_ci#define TSL_WS4 (1UL << 27) 188c2ecf20Sopenharmony_ci#define TSL_DIS_A1 (1UL << 24) 198c2ecf20Sopenharmony_ci#define TSL_SDW_A1 (1UL << 23) 208c2ecf20Sopenharmony_ci#define TSL_SIB_A1 (1UL << 22) 218c2ecf20Sopenharmony_ci#define TSL_SF_A1 (1UL << 21) 228c2ecf20Sopenharmony_ci#define TSL_LF_A1 (1UL << 20) 238c2ecf20Sopenharmony_ci#define TSL_BSEL_A1 (1UL << 17) 248c2ecf20Sopenharmony_ci#define TSL_DOD_A1 (1UL << 15) 258c2ecf20Sopenharmony_ci#define TSL_LOW_A1 (1UL << 14) 268c2ecf20Sopenharmony_ci#define TSL_DIS_A2 (1UL << 11) 278c2ecf20Sopenharmony_ci#define TSL_SDW_A2 (1UL << 10) 288c2ecf20Sopenharmony_ci#define TSL_SIB_A2 (1UL << 9) 298c2ecf20Sopenharmony_ci#define TSL_SF_A2 (1UL << 8) 308c2ecf20Sopenharmony_ci#define TSL_LF_A2 (1UL << 7) 318c2ecf20Sopenharmony_ci#define TSL_BSEL_A2 (1UL << 4) 328c2ecf20Sopenharmony_ci#define TSL_DOD_A2 (1UL << 2) 338c2ecf20Sopenharmony_ci#define TSL_LOW_A2 (1UL << 1) 348c2ecf20Sopenharmony_ci#define TSL_EOS (1UL << 0) 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci /* Audiowerk8 hardware setup: */ 378c2ecf20Sopenharmony_ci /* WS0, SD4, TSL1 - Analog/ digital in */ 388c2ecf20Sopenharmony_ci /* WS1, SD0, TSL1 - Analog out #1, digital out */ 398c2ecf20Sopenharmony_ci /* WS2, SD2, TSL1 - Analog out #2 */ 408c2ecf20Sopenharmony_ci /* WS3, SD1, TSL2 - Analog out #3 */ 418c2ecf20Sopenharmony_ci /* WS4, SD3, TSL2 - Analog out #4 */ 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci /* Audiowerk8 timing: */ 448c2ecf20Sopenharmony_ci /* Timeslot: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ... */ 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci /* A1_INPUT: */ 478c2ecf20Sopenharmony_ci /* SD4: <_ADC-L_>-------<_ADC-R_>-------< */ 488c2ecf20Sopenharmony_ci /* WS0: _______________/---------------\_ */ 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci /* A1_OUTPUT: */ 518c2ecf20Sopenharmony_ci /* SD0: <_1-L___>-------<_1-R___>-------< */ 528c2ecf20Sopenharmony_ci /* WS1: _______________/---------------\_ */ 538c2ecf20Sopenharmony_ci /* SD2: >-------<_2-L___>-------<_2-R___> */ 548c2ecf20Sopenharmony_ci /* WS2: -------\_______________/--------- */ 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci /* A2_OUTPUT: */ 578c2ecf20Sopenharmony_ci /* SD1: <_3-L___>-------<_3-R___>-------< */ 588c2ecf20Sopenharmony_ci /* WS3: _______________/---------------\_ */ 598c2ecf20Sopenharmony_ci /* SD3: >-------<_4-L___>-------<_4-R___> */ 608c2ecf20Sopenharmony_ci /* WS4: -------\_______________/--------- */ 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_cistatic const int tsl1[8] = { 638c2ecf20Sopenharmony_ci 1 * TSL_SDW_A1 | 3 * TSL_BSEL_A1 | 648c2ecf20Sopenharmony_ci 0 * TSL_DIS_A1 | 0 * TSL_DOD_A1 | TSL_LF_A1, 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci 1 * TSL_SDW_A1 | 2 * TSL_BSEL_A1 | 678c2ecf20Sopenharmony_ci 0 * TSL_DIS_A1 | 0 * TSL_DOD_A1, 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci 0 * TSL_SDW_A1 | 3 * TSL_BSEL_A1 | 708c2ecf20Sopenharmony_ci 0 * TSL_DIS_A1 | 0 * TSL_DOD_A1, 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci 0 * TSL_SDW_A1 | 2 * TSL_BSEL_A1 | 738c2ecf20Sopenharmony_ci 0 * TSL_DIS_A1 | 0 * TSL_DOD_A1, 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci 1 * TSL_SDW_A1 | 1 * TSL_BSEL_A1 | 768c2ecf20Sopenharmony_ci 0 * TSL_DIS_A1 | 0 * TSL_DOD_A1 | TSL_WS1 | TSL_WS0, 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ci 1 * TSL_SDW_A1 | 0 * TSL_BSEL_A1 | 798c2ecf20Sopenharmony_ci 0 * TSL_DIS_A1 | 0 * TSL_DOD_A1 | TSL_WS1 | TSL_WS0, 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci 0 * TSL_SDW_A1 | 1 * TSL_BSEL_A1 | 828c2ecf20Sopenharmony_ci 0 * TSL_DIS_A1 | 0 * TSL_DOD_A1 | TSL_WS1 | TSL_WS0, 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci 0 * TSL_SDW_A1 | 0 * TSL_BSEL_A1 | 0 * TSL_DIS_A1 | 858c2ecf20Sopenharmony_ci 0 * TSL_DOD_A1 | TSL_WS1 | TSL_WS0 | TSL_SF_A1 | TSL_EOS, 868c2ecf20Sopenharmony_ci}; 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_cistatic const int tsl2[8] = { 898c2ecf20Sopenharmony_ci 0 * TSL_SDW_A2 | 3 * TSL_BSEL_A2 | 2 * TSL_DOD_A2 | TSL_LF_A2, 908c2ecf20Sopenharmony_ci 0 * TSL_SDW_A2 | 2 * TSL_BSEL_A2 | 2 * TSL_DOD_A2, 918c2ecf20Sopenharmony_ci 0 * TSL_SDW_A2 | 3 * TSL_BSEL_A2 | 2 * TSL_DOD_A2, 928c2ecf20Sopenharmony_ci 0 * TSL_SDW_A2 | 2 * TSL_BSEL_A2 | 2 * TSL_DOD_A2, 938c2ecf20Sopenharmony_ci 0 * TSL_SDW_A2 | 1 * TSL_BSEL_A2 | 2 * TSL_DOD_A2 | TSL_WS2, 948c2ecf20Sopenharmony_ci 0 * TSL_SDW_A2 | 0 * TSL_BSEL_A2 | 2 * TSL_DOD_A2 | TSL_WS2, 958c2ecf20Sopenharmony_ci 0 * TSL_SDW_A2 | 1 * TSL_BSEL_A2 | 2 * TSL_DOD_A2 | TSL_WS2, 968c2ecf20Sopenharmony_ci 0 * TSL_SDW_A2 | 0 * TSL_BSEL_A2 | 2 * TSL_DOD_A2 | TSL_WS2 | TSL_EOS 978c2ecf20Sopenharmony_ci}; 98