Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef NOT_CS4281_PM |
| 2 | /******************************************************************************* |
| 3 | * |
| 4 | * "cs4281pm.h" -- Cirrus Logic-Crystal CS4281 linux audio driver. |
| 5 | * |
| 6 | * Copyright (C) 2000,2001 Cirrus Logic Corp. |
| 7 | * -- tom woller (twoller@crystal.cirrus.com) or |
| 8 | * (audio@crystal.cirrus.com). |
| 9 | * |
| 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. |
| 14 | * |
| 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. |
| 19 | * |
| 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. |
| 23 | * |
| 24 | * 12/22/00 trw - new file. |
| 25 | * |
| 26 | *******************************************************************************/ |
| 27 | /* general pm definitions */ |
| 28 | #define CS4281_AC97_HIGHESTREGTORESTORE 0x26 |
| 29 | #define CS4281_AC97_NUMBER_RESTORE_REGS (CS4281_AC97_HIGHESTREGTORESTORE/2-1) |
| 30 | |
| 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 |
| 36 | |
| 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 |
| 44 | |
| 45 | struct cs4281_pm { |
| 46 | unsigned long flags; |
| 47 | u32 u32CLKCR1_SAVE,u32SSPMValue,u32PPLVCvalue,u32PPRVCvalue; |
| 48 | u32 u32FMLVCvalue,u32FMRVCvalue,u32GPIORvalue,u32JSCTLvalue,u32SSCR; |
| 49 | u32 u32SRCSA,u32DacASR,u32AdcASR,u32DacSR,u32AdcSR,u32MIDCR_Save; |
| 50 | u32 u32SSPM_BITS; |
| 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; |
| 55 | }; |
| 56 | |
| 57 | struct cs4281_pipeline { |
| 58 | unsigned flags; |
| 59 | unsigned number; |
| 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; |
| 65 | /* |
| 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. |
| 69 | */ |
| 70 | u32 u32FCRn_Save,u32FSICn_Save; |
| 71 | u32 u32FCRnValue,u32FCRnAddress,u32FSICnValue,u32FSICnAddress; |
| 72 | u32 u32FPDRnValue,u32FPDRnAddress; |
| 73 | }; |
| 74 | #endif |