diff options
author | Andreas Mohr <andi@lisas.de> | 2006-05-17 05:02:24 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-06-22 15:33:38 -0400 |
commit | ca54bde3634360afecd0dada9c59399bbe88bd32 (patch) | |
tree | 217d8c5f617da88191552433be734831edb6e6ed /sound/pci/azt3328.h | |
parent | 746df94898554b3d8e91d855e934852e626c701c (diff) |
[ALSA] azt3328.c: add suspend/resume support
- add suspend/resume handlers
- fix problem (private_data members not set)
Playing a file while suspending will resume correctly with this patch,
so I assume the hardware to get fully correctly reinitialized with
this patch.
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/azt3328.h')
-rw-r--r-- | sound/pci/azt3328.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/sound/pci/azt3328.h b/sound/pci/azt3328.h index f489bdaf6d40..560a4653c0b2 100644 --- a/sound/pci/azt3328.h +++ b/sound/pci/azt3328.h | |||
@@ -5,6 +5,9 @@ | |||
5 | 5 | ||
6 | /*** main I/O area port indices ***/ | 6 | /*** main I/O area port indices ***/ |
7 | /* (only 0x70 of 0x80 bytes saved/restored by Windows driver) */ | 7 | /* (only 0x70 of 0x80 bytes saved/restored by Windows driver) */ |
8 | #define AZF_IO_SIZE_CODEC 0x80 | ||
9 | #define AZF_IO_SIZE_CODEC_PM 0x70 | ||
10 | |||
8 | /* the driver initialisation suggests a layout of 4 main areas: | 11 | /* the driver initialisation suggests a layout of 4 main areas: |
9 | * from 0x00 (playback), from 0x20 (recording) and from 0x40 (maybe MPU401??). | 12 | * from 0x00 (playback), from 0x20 (recording) and from 0x40 (maybe MPU401??). |
10 | * And another area from 0x60 to 0x6f (DirectX timer, IRQ management, | 13 | * And another area from 0x60 to 0x6f (DirectX timer, IRQ management, |
@@ -107,7 +110,8 @@ | |||
107 | #define IRQ_UNKNOWN2 0x0080 /* probably unused */ | 110 | #define IRQ_UNKNOWN2 0x0080 /* probably unused */ |
108 | #define IDX_IO_66H 0x66 /* writing 0xffff returns 0x0000 */ | 111 | #define IDX_IO_66H 0x66 /* writing 0xffff returns 0x0000 */ |
109 | #define IDX_IO_SOME_VALUE 0x68 /* this is set to e.g. 0x3ff or 0x300, and writable; maybe some buffer limit, but I couldn't find out more, PU:0x00ff */ | 112 | #define IDX_IO_SOME_VALUE 0x68 /* this is set to e.g. 0x3ff or 0x300, and writable; maybe some buffer limit, but I couldn't find out more, PU:0x00ff */ |
110 | #define IDX_IO_6AH 0x6A /* this WORD can be set to have bits 0x0028 activated; actually inhibits PCM playback!!! maybe power management?? */ | 113 | #define IDX_IO_6AH 0x6A /* this WORD can be set to have bits 0x0028 activated (FIXME: correct??); actually inhibits PCM playback!!! maybe power management?? */ |
114 | #define IO_6A_PAUSE_PLAYBACK 0x0200 /* bit 9; sure, this pauses playback, but what the heck is this really about?? */ | ||
111 | #define IDX_IO_6CH 0x6C | 115 | #define IDX_IO_6CH 0x6C |
112 | #define IDX_IO_6EH 0x6E /* writing 0xffff returns 0x83fe */ | 116 | #define IDX_IO_6EH 0x6E /* writing 0xffff returns 0x83fe */ |
113 | /* further I/O indices not saved/restored, so probably not used */ | 117 | /* further I/O indices not saved/restored, so probably not used */ |
@@ -115,15 +119,25 @@ | |||
115 | 119 | ||
116 | /*** I/O 2 area port indices ***/ | 120 | /*** I/O 2 area port indices ***/ |
117 | /* (only 0x06 of 0x08 bytes saved/restored by Windows driver) */ | 121 | /* (only 0x06 of 0x08 bytes saved/restored by Windows driver) */ |
122 | #define AZF_IO_SIZE_IO2 0x08 | ||
123 | #define AZF_IO_SIZE_IO2_PM 0x06 | ||
124 | |||
118 | #define IDX_IO2_LEGACY_ADDR 0x04 | 125 | #define IDX_IO2_LEGACY_ADDR 0x04 |
119 | #define LEGACY_SOMETHING 0x01 /* OPL3?? */ | 126 | #define LEGACY_SOMETHING 0x01 /* OPL3?? */ |
120 | #define LEGACY_JOY 0x08 | 127 | #define LEGACY_JOY 0x08 |
121 | 128 | ||
129 | #define AZF_IO_SIZE_MPU 0x04 | ||
130 | #define AZF_IO_SIZE_MPU_PM 0x04 | ||
131 | |||
132 | #define AZF_IO_SIZE_SYNTH 0x08 | ||
133 | #define AZF_IO_SIZE_SYNTH_PM 0x06 | ||
122 | 134 | ||
123 | /*** mixer I/O area port indices ***/ | 135 | /*** mixer I/O area port indices ***/ |
124 | /* (only 0x22 of 0x40 bytes saved/restored by Windows driver) | 136 | /* (only 0x22 of 0x40 bytes saved/restored by Windows driver) |
125 | * generally spoken: AC97 register index = AZF3328 mixer reg index + 2 | 137 | * UNFORTUNATELY azf3328 is NOT truly AC97 compliant: see main file intro */ |
126 | * (in other words: AZF3328 NOT fully AC97 compliant) */ | 138 | #define AZF_IO_SIZE_MIXER 0x40 |
139 | #define AZF_IO_SIZE_MIXER_PM 0x22 | ||
140 | |||
127 | #define MIXER_VOLUME_RIGHT_MASK 0x001f | 141 | #define MIXER_VOLUME_RIGHT_MASK 0x001f |
128 | #define MIXER_VOLUME_LEFT_MASK 0x1f00 | 142 | #define MIXER_VOLUME_LEFT_MASK 0x1f00 |
129 | #define MIXER_MUTE_MASK 0x8000 | 143 | #define MIXER_MUTE_MASK 0x8000 |