18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk> 48c2ecf20Sopenharmony_ci * Driver p16v chips 58c2ecf20Sopenharmony_ci * Version: 0.21 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * FEATURES currently supported: 88c2ecf20Sopenharmony_ci * Output fixed at S32_LE, 2 channel to hw:0,0 98c2ecf20Sopenharmony_ci * Rates: 44.1, 48, 96, 192. 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * Changelog: 128c2ecf20Sopenharmony_ci * 0.8 138c2ecf20Sopenharmony_ci * Use separate card based buffer for periods table. 148c2ecf20Sopenharmony_ci * 0.9 158c2ecf20Sopenharmony_ci * Use 2 channel output streams instead of 8 channel. 168c2ecf20Sopenharmony_ci * (8 channel output streams might be good for ASIO type output) 178c2ecf20Sopenharmony_ci * Corrected speaker output, so Front -> Front etc. 188c2ecf20Sopenharmony_ci * 0.10 198c2ecf20Sopenharmony_ci * Fixed missed interrupts. 208c2ecf20Sopenharmony_ci * 0.11 218c2ecf20Sopenharmony_ci * Add Sound card model number and names. 228c2ecf20Sopenharmony_ci * Add Analog volume controls. 238c2ecf20Sopenharmony_ci * 0.12 248c2ecf20Sopenharmony_ci * Corrected playback interrupts. Now interrupt per period, instead of half period. 258c2ecf20Sopenharmony_ci * 0.13 268c2ecf20Sopenharmony_ci * Use single trigger for multichannel. 278c2ecf20Sopenharmony_ci * 0.14 288c2ecf20Sopenharmony_ci * Mic capture now works at fixed: S32_LE, 96000Hz, Stereo. 298c2ecf20Sopenharmony_ci * 0.15 308c2ecf20Sopenharmony_ci * Force buffer_size / period_size == INTEGER. 318c2ecf20Sopenharmony_ci * 0.16 328c2ecf20Sopenharmony_ci * Update p16v.c to work with changed alsa api. 338c2ecf20Sopenharmony_ci * 0.17 348c2ecf20Sopenharmony_ci * Update p16v.c to work with changed alsa api. Removed boot_devs. 358c2ecf20Sopenharmony_ci * 0.18 368c2ecf20Sopenharmony_ci * Merging with snd-emu10k1 driver. 378c2ecf20Sopenharmony_ci * 0.19 388c2ecf20Sopenharmony_ci * One stereo channel at 24bit now works. 398c2ecf20Sopenharmony_ci * 0.20 408c2ecf20Sopenharmony_ci * Added better register defines. 418c2ecf20Sopenharmony_ci * 0.21 428c2ecf20Sopenharmony_ci * Split from p16v.c 438c2ecf20Sopenharmony_ci * 448c2ecf20Sopenharmony_ci * BUGS: 458c2ecf20Sopenharmony_ci * Some stability problems when unloading the snd-p16v kernel module. 468c2ecf20Sopenharmony_ci * -- 478c2ecf20Sopenharmony_ci * 488c2ecf20Sopenharmony_ci * TODO: 498c2ecf20Sopenharmony_ci * SPDIF out. 508c2ecf20Sopenharmony_ci * Find out how to change capture sample rates. E.g. To record SPDIF at 48000Hz. 518c2ecf20Sopenharmony_ci * Currently capture fixed at 48000Hz. 528c2ecf20Sopenharmony_ci * 538c2ecf20Sopenharmony_ci * -- 548c2ecf20Sopenharmony_ci * GENERAL INFO: 558c2ecf20Sopenharmony_ci * Model: SB0240 568c2ecf20Sopenharmony_ci * P16V Chip: CA0151-DBS 578c2ecf20Sopenharmony_ci * Audigy 2 Chip: CA0102-IAT 588c2ecf20Sopenharmony_ci * AC97 Codec: STAC 9721 598c2ecf20Sopenharmony_ci * ADC: Philips 1361T (Stereo 24bit) 608c2ecf20Sopenharmony_ci * DAC: CS4382-K (8-channel, 24bit, 192Khz) 618c2ecf20Sopenharmony_ci * 628c2ecf20Sopenharmony_ci * This code was initially based on code from ALSA's emu10k1x.c which is: 638c2ecf20Sopenharmony_ci * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> 648c2ecf20Sopenharmony_ci */ 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci/********************************************************************************************************/ 678c2ecf20Sopenharmony_ci/* Audigy2 P16V pointer-offset register set, accessed through the PTR2 and DATA2 registers */ 688c2ecf20Sopenharmony_ci/********************************************************************************************************/ 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci/* The sample rate of the SPDIF outputs is set by modifying a register in the EMU10K2 PTR register A_SPDIF_SAMPLERATE. 718c2ecf20Sopenharmony_ci * The sample rate is also controlled by the same registers that control the rate of the EMU10K2 sample rate converters. 728c2ecf20Sopenharmony_ci */ 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci/* Initially all registers from 0x00 to 0x3f have zero contents. */ 758c2ecf20Sopenharmony_ci#define PLAYBACK_LIST_ADDR 0x00 /* Base DMA address of a list of pointers to each period/size */ 768c2ecf20Sopenharmony_ci /* One list entry: 4 bytes for DMA address, 778c2ecf20Sopenharmony_ci * 4 bytes for period_size << 16. 788c2ecf20Sopenharmony_ci * One list entry is 8 bytes long. 798c2ecf20Sopenharmony_ci * One list entry for each period in the buffer. 808c2ecf20Sopenharmony_ci */ 818c2ecf20Sopenharmony_ci#define PLAYBACK_LIST_SIZE 0x01 /* Size of list in bytes << 16. E.g. 8 periods -> 0x00380000 */ 828c2ecf20Sopenharmony_ci#define PLAYBACK_LIST_PTR 0x02 /* Pointer to the current period being played */ 838c2ecf20Sopenharmony_ci#define PLAYBACK_UNKNOWN3 0x03 /* Not used */ 848c2ecf20Sopenharmony_ci#define PLAYBACK_DMA_ADDR 0x04 /* Playback DMA address */ 858c2ecf20Sopenharmony_ci#define PLAYBACK_PERIOD_SIZE 0x05 /* Playback period size. win2000 uses 0x04000000 */ 868c2ecf20Sopenharmony_ci#define PLAYBACK_POINTER 0x06 /* Playback period pointer. Used with PLAYBACK_LIST_PTR to determine buffer position currently in DAC */ 878c2ecf20Sopenharmony_ci#define PLAYBACK_FIFO_END_ADDRESS 0x07 /* Playback FIFO end address */ 888c2ecf20Sopenharmony_ci#define PLAYBACK_FIFO_POINTER 0x08 /* Playback FIFO pointer and number of valid sound samples in cache */ 898c2ecf20Sopenharmony_ci#define PLAYBACK_UNKNOWN9 0x09 /* Not used */ 908c2ecf20Sopenharmony_ci#define CAPTURE_DMA_ADDR 0x10 /* Capture DMA address */ 918c2ecf20Sopenharmony_ci#define CAPTURE_BUFFER_SIZE 0x11 /* Capture buffer size */ 928c2ecf20Sopenharmony_ci#define CAPTURE_POINTER 0x12 /* Capture buffer pointer. Sample currently in ADC */ 938c2ecf20Sopenharmony_ci#define CAPTURE_FIFO_POINTER 0x13 /* Capture FIFO pointer and number of valid sound samples in cache */ 948c2ecf20Sopenharmony_ci#define CAPTURE_P16V_VOLUME1 0x14 /* Low: Capture volume 0xXXXX3030 */ 958c2ecf20Sopenharmony_ci#define CAPTURE_P16V_VOLUME2 0x15 /* High:Has no effect on capture volume */ 968c2ecf20Sopenharmony_ci#define CAPTURE_P16V_SOURCE 0x16 /* P16V source select. Set to 0x0700E4E5 for AC97 CAPTURE */ 978c2ecf20Sopenharmony_ci /* [0:1] Capture input 0 channel select. 0 = Capture output 0. 988c2ecf20Sopenharmony_ci * 1 = Capture output 1. 998c2ecf20Sopenharmony_ci * 2 = Capture output 2. 1008c2ecf20Sopenharmony_ci * 3 = Capture output 3. 1018c2ecf20Sopenharmony_ci * [3:2] Capture input 1 channel select. 0 = Capture output 0. 1028c2ecf20Sopenharmony_ci * 1 = Capture output 1. 1038c2ecf20Sopenharmony_ci * 2 = Capture output 2. 1048c2ecf20Sopenharmony_ci * 3 = Capture output 3. 1058c2ecf20Sopenharmony_ci * [5:4] Capture input 2 channel select. 0 = Capture output 0. 1068c2ecf20Sopenharmony_ci * 1 = Capture output 1. 1078c2ecf20Sopenharmony_ci * 2 = Capture output 2. 1088c2ecf20Sopenharmony_ci * 3 = Capture output 3. 1098c2ecf20Sopenharmony_ci * [7:6] Capture input 3 channel select. 0 = Capture output 0. 1108c2ecf20Sopenharmony_ci * 1 = Capture output 1. 1118c2ecf20Sopenharmony_ci * 2 = Capture output 2. 1128c2ecf20Sopenharmony_ci * 3 = Capture output 3. 1138c2ecf20Sopenharmony_ci * [9:8] Playback input 0 channel select. 0 = Play output 0. 1148c2ecf20Sopenharmony_ci * 1 = Play output 1. 1158c2ecf20Sopenharmony_ci * 2 = Play output 2. 1168c2ecf20Sopenharmony_ci * 3 = Play output 3. 1178c2ecf20Sopenharmony_ci * [11:10] Playback input 1 channel select. 0 = Play output 0. 1188c2ecf20Sopenharmony_ci * 1 = Play output 1. 1198c2ecf20Sopenharmony_ci * 2 = Play output 2. 1208c2ecf20Sopenharmony_ci * 3 = Play output 3. 1218c2ecf20Sopenharmony_ci * [13:12] Playback input 2 channel select. 0 = Play output 0. 1228c2ecf20Sopenharmony_ci * 1 = Play output 1. 1238c2ecf20Sopenharmony_ci * 2 = Play output 2. 1248c2ecf20Sopenharmony_ci * 3 = Play output 3. 1258c2ecf20Sopenharmony_ci * [15:14] Playback input 3 channel select. 0 = Play output 0. 1268c2ecf20Sopenharmony_ci * 1 = Play output 1. 1278c2ecf20Sopenharmony_ci * 2 = Play output 2. 1288c2ecf20Sopenharmony_ci * 3 = Play output 3. 1298c2ecf20Sopenharmony_ci * [19:16] Playback mixer output enable. 1 bit per channel. 1308c2ecf20Sopenharmony_ci * [23:20] Capture mixer output enable. 1 bit per channel. 1318c2ecf20Sopenharmony_ci * [26:24] FX engine channel capture 0 = 0x60-0x67. 1328c2ecf20Sopenharmony_ci * 1 = 0x68-0x6f. 1338c2ecf20Sopenharmony_ci * 2 = 0x70-0x77. 1348c2ecf20Sopenharmony_ci * 3 = 0x78-0x7f. 1358c2ecf20Sopenharmony_ci * 4 = 0x80-0x87. 1368c2ecf20Sopenharmony_ci * 5 = 0x88-0x8f. 1378c2ecf20Sopenharmony_ci * 6 = 0x90-0x97. 1388c2ecf20Sopenharmony_ci * 7 = 0x98-0x9f. 1398c2ecf20Sopenharmony_ci * [31:27] Not used. 1408c2ecf20Sopenharmony_ci */ 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci /* 0x1 = capture on. 1438c2ecf20Sopenharmony_ci * 0x100 = capture off. 1448c2ecf20Sopenharmony_ci * 0x200 = capture off. 1458c2ecf20Sopenharmony_ci * 0x1000 = capture off. 1468c2ecf20Sopenharmony_ci */ 1478c2ecf20Sopenharmony_ci#define CAPTURE_RATE_STATUS 0x17 /* Capture sample rate. Read only */ 1488c2ecf20Sopenharmony_ci /* [15:0] Not used. 1498c2ecf20Sopenharmony_ci * [18:16] Channel 0 Detected sample rate. 0 - 44.1khz 1508c2ecf20Sopenharmony_ci * 1 - 48 khz 1518c2ecf20Sopenharmony_ci * 2 - 96 khz 1528c2ecf20Sopenharmony_ci * 3 - 192 khz 1538c2ecf20Sopenharmony_ci * 7 - undefined rate. 1548c2ecf20Sopenharmony_ci * [19] Channel 0. 1 - Valid, 0 - Not Valid. 1558c2ecf20Sopenharmony_ci * [22:20] Channel 1 Detected sample rate. 1568c2ecf20Sopenharmony_ci * [23] Channel 1. 1 - Valid, 0 - Not Valid. 1578c2ecf20Sopenharmony_ci * [26:24] Channel 2 Detected sample rate. 1588c2ecf20Sopenharmony_ci * [27] Channel 2. 1 - Valid, 0 - Not Valid. 1598c2ecf20Sopenharmony_ci * [30:28] Channel 3 Detected sample rate. 1608c2ecf20Sopenharmony_ci * [31] Channel 3. 1 - Valid, 0 - Not Valid. 1618c2ecf20Sopenharmony_ci */ 1628c2ecf20Sopenharmony_ci/* 0x18 - 0x1f unused */ 1638c2ecf20Sopenharmony_ci#define PLAYBACK_LAST_SAMPLE 0x20 /* The sample currently being played. Read only */ 1648c2ecf20Sopenharmony_ci/* 0x21 - 0x3f unused */ 1658c2ecf20Sopenharmony_ci#define BASIC_INTERRUPT 0x40 /* Used by both playback and capture interrupt handler */ 1668c2ecf20Sopenharmony_ci /* Playback (0x1<<channel_id) Don't touch high 16bits. */ 1678c2ecf20Sopenharmony_ci /* Capture (0x100<<channel_id). not tested */ 1688c2ecf20Sopenharmony_ci /* Start Playback [3:0] (one bit per channel) 1698c2ecf20Sopenharmony_ci * Start Capture [11:8] (one bit per channel) 1708c2ecf20Sopenharmony_ci * Record source select for channel 0 [18:16] 1718c2ecf20Sopenharmony_ci * Record source select for channel 1 [22:20] 1728c2ecf20Sopenharmony_ci * Record source select for channel 2 [26:24] 1738c2ecf20Sopenharmony_ci * Record source select for channel 3 [30:28] 1748c2ecf20Sopenharmony_ci * 0 - SPDIF channel. 1758c2ecf20Sopenharmony_ci * 1 - I2S channel. 1768c2ecf20Sopenharmony_ci * 2 - SRC48 channel. 1778c2ecf20Sopenharmony_ci * 3 - SRCMulti_SPDIF channel. 1788c2ecf20Sopenharmony_ci * 4 - SRCMulti_I2S channel. 1798c2ecf20Sopenharmony_ci * 5 - SPDIF channel. 1808c2ecf20Sopenharmony_ci * 6 - fxengine capture. 1818c2ecf20Sopenharmony_ci * 7 - AC97 capture. 1828c2ecf20Sopenharmony_ci */ 1838c2ecf20Sopenharmony_ci /* Default 41110000. 1848c2ecf20Sopenharmony_ci * Writing 0xffffffff hangs the PC. 1858c2ecf20Sopenharmony_ci * Writing 0xffff0000 -> 77770000 so it must be some sort of route. 1868c2ecf20Sopenharmony_ci * bit 0x1 starts DMA playback on channel_id 0 1878c2ecf20Sopenharmony_ci */ 1888c2ecf20Sopenharmony_ci/* 0x41,42 take values from 0 - 0xffffffff, but have no effect on playback */ 1898c2ecf20Sopenharmony_ci/* 0x43,0x48 do not remember settings */ 1908c2ecf20Sopenharmony_ci/* 0x41-45 unused */ 1918c2ecf20Sopenharmony_ci#define WATERMARK 0x46 /* Test bit to indicate cache level usage */ 1928c2ecf20Sopenharmony_ci /* Values it can have while playing on channel 0. 1938c2ecf20Sopenharmony_ci * 0000f000, 0000f004, 0000f008, 0000f00c. 1948c2ecf20Sopenharmony_ci * Readonly. 1958c2ecf20Sopenharmony_ci */ 1968c2ecf20Sopenharmony_ci/* 0x47-0x4f unused */ 1978c2ecf20Sopenharmony_ci/* 0x50-0x5f Capture cache data */ 1988c2ecf20Sopenharmony_ci#define SRCSel 0x60 /* SRCSel. Default 0x4. Bypass P16V 0x14 */ 1998c2ecf20Sopenharmony_ci /* [0] 0 = 10K2 audio, 1 = SRC48 mixer output. 2008c2ecf20Sopenharmony_ci * [2] 0 = 10K2 audio, 1 = SRCMulti SPDIF mixer output. 2018c2ecf20Sopenharmony_ci * [4] 0 = 10K2 audio, 1 = SRCMulti I2S mixer output. 2028c2ecf20Sopenharmony_ci */ 2038c2ecf20Sopenharmony_ci /* SRC48 converts samples rates 44.1, 48, 96, 192 to 48 khz. */ 2048c2ecf20Sopenharmony_ci /* SRCMulti converts 48khz samples rates to 44.1, 48, 96, 192 to 48. */ 2058c2ecf20Sopenharmony_ci /* SRC48 and SRCMULTI sample rate select and output select. */ 2068c2ecf20Sopenharmony_ci /* 0xffffffff -> 0xC0000015 2078c2ecf20Sopenharmony_ci * 0xXXXXXXX4 = Enable Front Left/Right 2088c2ecf20Sopenharmony_ci * Enable PCMs 2098c2ecf20Sopenharmony_ci */ 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_ci/* 0x61 -> 0x6c are Volume controls */ 2128c2ecf20Sopenharmony_ci#define PLAYBACK_VOLUME_MIXER1 0x61 /* SRC48 Low to mixer input volume control. */ 2138c2ecf20Sopenharmony_ci#define PLAYBACK_VOLUME_MIXER2 0x62 /* SRC48 High to mixer input volume control. */ 2148c2ecf20Sopenharmony_ci#define PLAYBACK_VOLUME_MIXER3 0x63 /* SRCMULTI SPDIF Low to mixer input volume control. */ 2158c2ecf20Sopenharmony_ci#define PLAYBACK_VOLUME_MIXER4 0x64 /* SRCMULTI SPDIF High to mixer input volume control. */ 2168c2ecf20Sopenharmony_ci#define PLAYBACK_VOLUME_MIXER5 0x65 /* SRCMULTI I2S Low to mixer input volume control. */ 2178c2ecf20Sopenharmony_ci#define PLAYBACK_VOLUME_MIXER6 0x66 /* SRCMULTI I2S High to mixer input volume control. */ 2188c2ecf20Sopenharmony_ci#define PLAYBACK_VOLUME_MIXER7 0x67 /* P16V Low to SRCMULTI SPDIF mixer input volume control. */ 2198c2ecf20Sopenharmony_ci#define PLAYBACK_VOLUME_MIXER8 0x68 /* P16V High to SRCMULTI SPDIF mixer input volume control. */ 2208c2ecf20Sopenharmony_ci#define PLAYBACK_VOLUME_MIXER9 0x69 /* P16V Low to SRCMULTI I2S mixer input volume control. */ 2218c2ecf20Sopenharmony_ci /* 0xXXXX3030 = PCM0 Volume (Front). 2228c2ecf20Sopenharmony_ci * 0x3030XXXX = PCM1 Volume (Center) 2238c2ecf20Sopenharmony_ci */ 2248c2ecf20Sopenharmony_ci#define PLAYBACK_VOLUME_MIXER10 0x6a /* P16V High to SRCMULTI I2S mixer input volume control. */ 2258c2ecf20Sopenharmony_ci /* 0x3030XXXX = PCM3 Volume (Rear). */ 2268c2ecf20Sopenharmony_ci#define PLAYBACK_VOLUME_MIXER11 0x6b /* E10K2 Low to SRC48 mixer input volume control. */ 2278c2ecf20Sopenharmony_ci#define PLAYBACK_VOLUME_MIXER12 0x6c /* E10K2 High to SRC48 mixer input volume control. */ 2288c2ecf20Sopenharmony_ci 2298c2ecf20Sopenharmony_ci#define SRC48_ENABLE 0x6d /* SRC48 input audio enable */ 2308c2ecf20Sopenharmony_ci /* SRC48 converts samples rates 44.1, 48, 96, 192 to 48 khz. */ 2318c2ecf20Sopenharmony_ci /* [23:16] The corresponding P16V channel to SRC48 enabled if == 1. 2328c2ecf20Sopenharmony_ci * [31:24] The corresponding E10K2 channel to SRC48 enabled. 2338c2ecf20Sopenharmony_ci */ 2348c2ecf20Sopenharmony_ci#define SRCMULTI_ENABLE 0x6e /* SRCMulti input audio enable. Default 0xffffffff */ 2358c2ecf20Sopenharmony_ci /* SRCMulti converts 48khz samples rates to 44.1, 48, 96, 192 to 48. */ 2368c2ecf20Sopenharmony_ci /* [7:0] The corresponding P16V channel to SRCMulti_I2S enabled if == 1. 2378c2ecf20Sopenharmony_ci * [15:8] The corresponding E10K2 channel to SRCMulti I2S enabled. 2388c2ecf20Sopenharmony_ci * [23:16] The corresponding P16V channel to SRCMulti SPDIF enabled. 2398c2ecf20Sopenharmony_ci * [31:24] The corresponding E10K2 channel to SRCMulti SPDIF enabled. 2408c2ecf20Sopenharmony_ci */ 2418c2ecf20Sopenharmony_ci /* Bypass P16V 0xff00ff00 2428c2ecf20Sopenharmony_ci * Bitmap. 0 = Off, 1 = On. 2438c2ecf20Sopenharmony_ci * P16V playback outputs: 2448c2ecf20Sopenharmony_ci * 0xXXXXXXX1 = PCM0 Left. (Front) 2458c2ecf20Sopenharmony_ci * 0xXXXXXXX2 = PCM0 Right. 2468c2ecf20Sopenharmony_ci * 0xXXXXXXX4 = PCM1 Left. (Center/LFE) 2478c2ecf20Sopenharmony_ci * 0xXXXXXXX8 = PCM1 Right. 2488c2ecf20Sopenharmony_ci * 0xXXXXXX1X = PCM2 Left. (Unknown) 2498c2ecf20Sopenharmony_ci * 0xXXXXXX2X = PCM2 Right. 2508c2ecf20Sopenharmony_ci * 0xXXXXXX4X = PCM3 Left. (Rear) 2518c2ecf20Sopenharmony_ci * 0xXXXXXX8X = PCM3 Right. 2528c2ecf20Sopenharmony_ci */ 2538c2ecf20Sopenharmony_ci#define AUDIO_OUT_ENABLE 0x6f /* Default: 000100FF */ 2548c2ecf20Sopenharmony_ci /* [3:0] Does something, but not documented. Probably capture enable. 2558c2ecf20Sopenharmony_ci * [7:4] Playback channels enable. not documented. 2568c2ecf20Sopenharmony_ci * [16] AC97 output enable if == 1 2578c2ecf20Sopenharmony_ci * [30] 0 = SRCMulti_I2S input from fxengine 0x68-0x6f. 2588c2ecf20Sopenharmony_ci * 1 = SRCMulti_I2S input from SRC48 output. 2598c2ecf20Sopenharmony_ci * [31] 0 = SRCMulti_SPDIF input from fxengine 0x60-0x67. 2608c2ecf20Sopenharmony_ci * 1 = SRCMulti_SPDIF input from SRC48 output. 2618c2ecf20Sopenharmony_ci */ 2628c2ecf20Sopenharmony_ci /* 0xffffffff -> C00100FF */ 2638c2ecf20Sopenharmony_ci /* 0 -> Not playback sound, irq still running */ 2648c2ecf20Sopenharmony_ci /* 0xXXXXXX10 = PCM0 Left/Right On. (Front) 2658c2ecf20Sopenharmony_ci * 0xXXXXXX20 = PCM1 Left/Right On. (Center/LFE) 2668c2ecf20Sopenharmony_ci * 0xXXXXXX40 = PCM2 Left/Right On. (Unknown) 2678c2ecf20Sopenharmony_ci * 0xXXXXXX80 = PCM3 Left/Right On. (Rear) 2688c2ecf20Sopenharmony_ci */ 2698c2ecf20Sopenharmony_ci#define PLAYBACK_SPDIF_SELECT 0x70 /* Default: 12030F00 */ 2708c2ecf20Sopenharmony_ci /* 0xffffffff -> 3FF30FFF */ 2718c2ecf20Sopenharmony_ci /* 0x00000001 pauses stream/irq fail. */ 2728c2ecf20Sopenharmony_ci /* All other bits do not effect playback */ 2738c2ecf20Sopenharmony_ci#define PLAYBACK_SPDIF_SRC_SELECT 0x71 /* Default: 0000E4E4 */ 2748c2ecf20Sopenharmony_ci /* 0xffffffff -> F33FFFFF */ 2758c2ecf20Sopenharmony_ci /* All bits do not effect playback */ 2768c2ecf20Sopenharmony_ci#define PLAYBACK_SPDIF_USER_DATA0 0x72 /* SPDIF out user data 0 */ 2778c2ecf20Sopenharmony_ci#define PLAYBACK_SPDIF_USER_DATA1 0x73 /* SPDIF out user data 1 */ 2788c2ecf20Sopenharmony_ci/* 0x74-0x75 unknown */ 2798c2ecf20Sopenharmony_ci#define CAPTURE_SPDIF_CONTROL 0x76 /* SPDIF in control setting */ 2808c2ecf20Sopenharmony_ci#define CAPTURE_SPDIF_STATUS 0x77 /* SPDIF in status */ 2818c2ecf20Sopenharmony_ci#define CAPURE_SPDIF_USER_DATA0 0x78 /* SPDIF in user data 0 */ 2828c2ecf20Sopenharmony_ci#define CAPURE_SPDIF_USER_DATA1 0x79 /* SPDIF in user data 1 */ 2838c2ecf20Sopenharmony_ci#define CAPURE_SPDIF_USER_DATA2 0x7a /* SPDIF in user data 2 */ 2848c2ecf20Sopenharmony_ci 285