2 /*******************************************************************************
4 * "cs4281pm.h" -- Cirrus Logic-Crystal CS4281 linux audio driver.
6 * Copyright (C) 2000,2001 Cirrus Logic Corp.
7 * -- tom woller (twoller@crystal.cirrus.com) or
8 * (audio@crystal.cirrus.com).
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 * 12/22/00 trw - new file.
26 *******************************************************************************/
27 /* general pm definitions */
28 #define CS4281_AC97_HIGHESTREGTORESTORE 0x26
29 #define CS4281_AC97_NUMBER_RESTORE_REGS (CS4281_AC97_HIGHESTREGTORESTORE/2-1)
31 /* pipeline definitions */
32 #define CS4281_NUMBER_OF_PIPELINES 4
33 #define CS4281_PIPELINE_VALID 0x0001
34 #define CS4281_PLAYBACK_PIPELINE_NUMBER 0x0000
35 #define CS4281_CAPTURE_PIPELINE_NUMBER 0x0001
37 /* PM state defintions */
38 #define CS4281_PM_NOT_REGISTERED 0x1000
39 #define CS4281_PM_IDLE 0x0001
40 #define CS4281_PM_SUSPENDING 0x0002
41 #define CS4281_PM_SUSPENDED 0x0004
42 #define CS4281_PM_RESUMING 0x0008
43 #define CS4281_PM_RESUMED 0x0010
47 u32 u32CLKCR1_SAVE,u32SSPMValue,u32PPLVCvalue,u32PPRVCvalue;
48 u32 u32FMLVCvalue,u32FMRVCvalue,u32GPIORvalue,u32JSCTLvalue,u32SSCR;
49 u32 u32SRCSA,u32DacASR,u32AdcASR,u32DacSR,u32AdcSR,u32MIDCR_Save;
51 u32 ac97[CS4281_AC97_NUMBER_RESTORE_REGS];
52 u32 u32AC97_master_volume, u32AC97_headphone_volume, u32AC97_master_volume_mono;
53 u32 u32AC97_pcm_out_volume, u32AC97_powerdown, u32AC97_general_purpose;
54 u32 u32hwptr_playback,u32hwptr_capture;
57 struct cs4281_pipeline {
60 u32 u32DBAnValue,u32DBCnValue,u32DMRnValue,u32DCRnValue;
61 u32 u32DBAnAddress,u32DCAnAddress,u32DBCnAddress,u32DCCnAddress;
62 u32 u32DMRnAddress,u32DCRnAddress,u32HDSRnAddress;
63 u32 u32DBAn_Save,u32DBCn_Save,u32DMRn_Save,u32DCRn_Save;
64 u32 u32DCCn_Save,u32DCAn_Save;
66 * technically, these are fifo variables, but just map the
67 * first fifo with the first pipeline and then use the fifo
68 * variables inside of the pipeline struct.
70 u32 u32FCRn_Save,u32FSICn_Save;
71 u32 u32FCRnValue,u32FCRnAddress,u32FSICnValue,u32FSICnAddress;
72 u32 u32FPDRnValue,u32FPDRnAddress;