Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
awacs.h File Reference

Go to the source code of this file.

Data Structures

struct  awacs_regs
 

Macros

#define MASK_ISFSEL   (0xf) /* Input SubFrame Select */
 
#define MASK_OSFSEL   (0xf << 4) /* Output SubFrame Select */
 
#define MASK_RATE   (0x7 << 8) /* Sound Rate */
 
#define MASK_CNTLERR   (0x1 << 11) /* Error */
 
#define MASK_PORTCHG   (0x1 << 12) /* Port Change */
 
#define MASK_IEE   (0x1 << 13) /* Enable Interrupt on Error */
 
#define MASK_IEPC   (0x1 << 14) /* Enable Interrupt on Port Change */
 
#define MASK_SSFSEL   (0x3 << 15) /* Status SubFrame Select */
 
#define MASK_NEWECMD   (0x1 << 24) /* Lock: don't write to reg when 1 */
 
#define MASK_EMODESEL   (0x3 << 22) /* Send info out on which frame? */
 
#define MASK_EXMODEADDR   (0x3ff << 12) /* Extended Mode Address -- 10 bits */
 
#define MASK_EXMODEDATA   (0xfff) /* Extended Mode Data -- 12 bits */
 
#define MASK_ADDR0   (0x0 << 12) /* Expanded Data Mode Address 0 */
 
#define MASK_ADDR_MUX   MASK_ADDR0 /* Mux Control */
 
#define MASK_ADDR_GAIN   MASK_ADDR0
 
#define MASK_ADDR1   (0x1 << 12) /* Expanded Data Mode Address 1 */
 
#define MASK_ADDR_MUTE   MASK_ADDR1
 
#define MASK_ADDR_RATE   MASK_ADDR1
 
#define MASK_ADDR2   (0x2 << 12) /* Expanded Data Mode Address 2 */
 
#define MASK_ADDR_VOLA   MASK_ADDR2 /* Volume Control A -- Headphones */
 
#define MASK_ADDR_VOLHD   MASK_ADDR2
 
#define MASK_ADDR4   (0x4 << 12) /* Expanded Data Mode Address 4 */
 
#define MASK_ADDR_VOLC   MASK_ADDR4 /* Volume Control C -- Speaker */
 
#define MASK_ADDR_VOLSPK   MASK_ADDR4
 
#define MASK_ADDR5   (0x5 << 12) /* Expanded Data Mode Address 5 */
 
#define MASK_ADDR6   (0x6 << 12) /* Expanded Data Mode Address 6 */
 
#define MASK_ADDR7   (0x7 << 12) /* Expanded Data Mode Address 7 */
 
#define MASK_GAINRIGHT   (0xf) /* Gain Right Mask */
 
#define MASK_GAINLEFT   (0xf << 4) /* Gain Left Mask */
 
#define MASK_GAINLINE   (0x1 << 8) /* Disable Mic preamp */
 
#define MASK_GAINMIC   (0x0 << 8) /* Enable Mic preamp */
 
#define MASK_MUX_CD   (0x1 << 9) /* Select CD in MUX */
 
#define MASK_MUX_MIC   (0x1 << 10) /* Select Mic in MUX */
 
#define MASK_MUX_AUDIN   (0x1 << 11) /* Select Audio In in MUX */
 
#define MASK_MUX_LINE   MASK_MUX_AUDIN
 
#define SHIFT_GAINLINE   8
 
#define SHIFT_MUX_CD   9
 
#define SHIFT_MUX_MIC   10
 
#define SHIFT_MUX_LINE   11
 
#define GAINRIGHT(x)   ((x) & MASK_GAINRIGHT)
 
#define GAINLEFT(x)   (((x) << 4) & MASK_GAINLEFT)
 
#define MASK_ADDR1RES1   (0x3) /* Reserved */
 
#define MASK_RECALIBRATE   (0x1 << 2) /* Recalibrate */
 
#define MASK_SAMPLERATE   (0x7 << 3) /* Sample Rate: */
 
#define MASK_LOOPTHRU   (0x1 << 6) /* Loopthrough Enable */
 
#define SHIFT_LOOPTHRU   6
 
#define MASK_CMUTE   (0x1 << 7) /* Output C (Speaker) Mute when 1 */
 
#define MASK_SPKMUTE   MASK_CMUTE
 
#define SHIFT_SPKMUTE   7
 
#define MASK_ADDR1RES2   (0x1 << 8) /* Reserved */
 
#define MASK_AMUTE   (0x1 << 9) /* Output A (Headphone) Mute when 1 */
 
#define MASK_HDMUTE   MASK_AMUTE
 
#define SHIFT_HDMUTE   9
 
#define MASK_PAROUT   (0x3 << 10) /* Parallel Out (???) */
 
#define MASK_PAROUT0   (0x1 << 10) /* Parallel Out (???) */
 
#define MASK_PAROUT1   (0x1 << 11) /* Parallel Out (enable speaker) */
 
#define SHIFT_PAROUT   10
 
#define SHIFT_PAROUT0   10
 
#define SHIFT_PAROUT1   11
 
#define SAMPLERATE_48000   (0x0 << 3) /* 48 or 44.1 kHz */
 
#define SAMPLERATE_32000   (0x1 << 3) /* 32 or 29.4 kHz */
 
#define SAMPLERATE_24000   (0x2 << 3) /* 24 or 22.05 kHz */
 
#define SAMPLERATE_19200   (0x3 << 3) /* 19.2 or 17.64 kHz */
 
#define SAMPLERATE_16000   (0x4 << 3) /* 16 or 14.7 kHz */
 
#define SAMPLERATE_12000   (0x5 << 3) /* 12 or 11.025 kHz */
 
#define SAMPLERATE_9600   (0x6 << 3) /* 9.6 or 8.82 kHz */
 
#define SAMPLERATE_8000   (0x7 << 3) /* 8 or 7.35 kHz */
 
#define MASK_OUTVOLRIGHT   (0xf) /* Output Right Volume */
 
#define MASK_ADDR2RES1   (0x2 << 4) /* Reserved */
 
#define MASK_ADDR4RES1   MASK_ADDR2RES1
 
#define MASK_OUTVOLLEFT   (0xf << 6) /* Output Left Volume */
 
#define MASK_ADDR2RES2   (0x2 << 10) /* Reserved */
 
#define MASK_ADDR4RES2   MASK_ADDR2RES2
 
#define VOLRIGHT(x)   (((~(x)) & MASK_OUTVOLRIGHT))
 
#define VOLLEFT(x)   (((~(x)) << 6) & MASK_OUTVOLLEFT)
 
#define MASK_MIC_BOOST   (0x4) /* screamer mic boost */
 
#define SHIFT_MIC_BOOST   2
 
#define MASK_EXTEND   (0x1 << 23) /* Extend */
 
#define MASK_VALID   (0x1 << 22) /* Valid Data? */
 
#define MASK_OFLEFT   (0x1 << 21) /* Overflow Left */
 
#define MASK_OFRIGHT   (0x1 << 20) /* Overflow Right */
 
#define MASK_ERRCODE   (0xf << 16) /* Error Code */
 
#define MASK_REVISION   (0xf << 12) /* Revision Number */
 
#define MASK_MFGID   (0xf << 8) /* Mfg. ID */
 
#define MASK_CODSTATRES   (0xf << 4) /* bits 4 - 7 reserved */
 
#define MASK_INSENSE   (0xf) /* port sense bits: */
 
#define MASK_HDPCONN   8 /* headphone plugged in */
 
#define MASK_LOCONN   4 /* line-out plugged in */
 
#define MASK_LICONN   2 /* line-in plugged in */
 
#define MASK_MICCONN   1 /* microphone plugged in */
 
#define MASK_LICONN_IMAC   8 /* line-in plugged in */
 
#define MASK_HDPRCONN_IMAC   4 /* headphone right plugged in */
 
#define MASK_HDPLCONN_IMAC   2 /* headphone left plugged in */
 
#define MASK_LOCONN_IMAC   1 /* line-out plugged in */
 
#define MASK_CLIPLEFT   (0xff << 7) /* Clipping Count, Left Channel */
 
#define MASK_CLIPRIGHT   (0xff) /* Clipping Count, Right Channel */
 
#define MASK_CSERR   (0x1 << 7) /* Error */
 
#define MASK_EOI
 
#define MASK_CSUNUSED   (0x1f << 1) /* bits 1-5 not used */
 
#define MASK_WAIT   (0x1) /* Wait */
 
#define RATE_48000   (0x0 << 8) /* 48 kHz */
 
#define RATE_44100   (0x0 << 8) /* 44.1 kHz */
 
#define RATE_32000   (0x1 << 8) /* 32 kHz */
 
#define RATE_29400   (0x1 << 8) /* 29.4 kHz */
 
#define RATE_24000   (0x2 << 8) /* 24 kHz */
 
#define RATE_22050   (0x2 << 8) /* 22.05 kHz */
 
#define RATE_19200   (0x3 << 8) /* 19.2 kHz */
 
#define RATE_17640   (0x3 << 8) /* 17.64 kHz */
 
#define RATE_16000   (0x4 << 8) /* 16 kHz */
 
#define RATE_14700   (0x4 << 8) /* 14.7 kHz */
 
#define RATE_12000   (0x5 << 8) /* 12 kHz */
 
#define RATE_11025   (0x5 << 8) /* 11.025 kHz */
 
#define RATE_9600   (0x6 << 8) /* 9.6 kHz */
 
#define RATE_8820   (0x6 << 8) /* 8.82 kHz */
 
#define RATE_8000   (0x7 << 8) /* 8 kHz */
 
#define RATE_7350   (0x7 << 8) /* 7.35 kHz */
 
#define RATE_LOW   1 /* HIGH = 48kHz, etc; LOW = 44.1kHz, etc. */
 

Macro Definition Documentation

#define GAINLEFT (   x)    (((x) << 4) & MASK_GAINLEFT)

Definition at line 102 of file awacs.h.

#define GAINRIGHT (   x)    ((x) & MASK_GAINRIGHT)

Definition at line 101 of file awacs.h.

#define MASK_ADDR0   (0x0 << 12) /* Expanded Data Mode Address 0 */

Definition at line 65 of file awacs.h.

#define MASK_ADDR1   (0x1 << 12) /* Expanded Data Mode Address 1 */

Definition at line 69 of file awacs.h.

#define MASK_ADDR1RES1   (0x3) /* Reserved */

Definition at line 106 of file awacs.h.

#define MASK_ADDR1RES2   (0x1 << 8) /* Reserved */

Definition at line 114 of file awacs.h.

#define MASK_ADDR2   (0x2 << 12) /* Expanded Data Mode Address 2 */

Definition at line 73 of file awacs.h.

#define MASK_ADDR2RES1   (0x2 << 4) /* Reserved */

Definition at line 137 of file awacs.h.

#define MASK_ADDR2RES2   (0x2 << 10) /* Reserved */

Definition at line 140 of file awacs.h.

#define MASK_ADDR4   (0x4 << 12) /* Expanded Data Mode Address 4 */

Definition at line 77 of file awacs.h.

#define MASK_ADDR4RES1   MASK_ADDR2RES1

Definition at line 138 of file awacs.h.

#define MASK_ADDR4RES2   MASK_ADDR2RES2

Definition at line 141 of file awacs.h.

#define MASK_ADDR5   (0x5 << 12) /* Expanded Data Mode Address 5 */

Definition at line 82 of file awacs.h.

#define MASK_ADDR6   (0x6 << 12) /* Expanded Data Mode Address 6 */

Definition at line 83 of file awacs.h.

#define MASK_ADDR7   (0x7 << 12) /* Expanded Data Mode Address 7 */

Definition at line 84 of file awacs.h.

#define MASK_ADDR_GAIN   MASK_ADDR0

Definition at line 67 of file awacs.h.

#define MASK_ADDR_MUTE   MASK_ADDR1

Definition at line 70 of file awacs.h.

#define MASK_ADDR_MUX   MASK_ADDR0 /* Mux Control */

Definition at line 66 of file awacs.h.

#define MASK_ADDR_RATE   MASK_ADDR1

Definition at line 71 of file awacs.h.

#define MASK_ADDR_VOLA   MASK_ADDR2 /* Volume Control A -- Headphones */

Definition at line 74 of file awacs.h.

#define MASK_ADDR_VOLC   MASK_ADDR4 /* Volume Control C -- Speaker */

Definition at line 78 of file awacs.h.

#define MASK_ADDR_VOLHD   MASK_ADDR2

Definition at line 75 of file awacs.h.

#define MASK_ADDR_VOLSPK   MASK_ADDR4

Definition at line 79 of file awacs.h.

#define MASK_AMUTE   (0x1 << 9) /* Output A (Headphone) Mute when 1 */

Definition at line 115 of file awacs.h.

#define MASK_CLIPLEFT   (0xff << 7) /* Clipping Count, Left Channel */

Definition at line 172 of file awacs.h.

#define MASK_CLIPRIGHT   (0xff) /* Clipping Count, Right Channel */

Definition at line 173 of file awacs.h.

#define MASK_CMUTE   (0x1 << 7) /* Output C (Speaker) Mute when 1 */

Definition at line 111 of file awacs.h.

#define MASK_CNTLERR   (0x1 << 11) /* Error */

Definition at line 50 of file awacs.h.

#define MASK_CODSTATRES   (0xf << 4) /* bits 4 - 7 reserved */

Definition at line 159 of file awacs.h.

#define MASK_CSERR   (0x1 << 7) /* Error */

Definition at line 177 of file awacs.h.

#define MASK_CSUNUSED   (0x1f << 1) /* bits 1-5 not used */

Definition at line 179 of file awacs.h.

#define MASK_EMODESEL   (0x3 << 22) /* Send info out on which frame? */

Definition at line 59 of file awacs.h.

#define MASK_EOI
Value:
(0x1 << 6) /* End of Input --
only for Input Channel */

Definition at line 178 of file awacs.h.

#define MASK_ERRCODE   (0xf << 16) /* Error Code */

Definition at line 156 of file awacs.h.

#define MASK_EXMODEADDR   (0x3ff << 12) /* Extended Mode Address -- 10 bits */

Definition at line 60 of file awacs.h.

#define MASK_EXMODEDATA   (0xfff) /* Extended Mode Data -- 12 bits */

Definition at line 61 of file awacs.h.

#define MASK_EXTEND   (0x1 << 23) /* Extend */

Definition at line 152 of file awacs.h.

#define MASK_GAINLEFT   (0xf << 4) /* Gain Left Mask */

Definition at line 89 of file awacs.h.

#define MASK_GAINLINE   (0x1 << 8) /* Disable Mic preamp */

Definition at line 90 of file awacs.h.

#define MASK_GAINMIC   (0x0 << 8) /* Enable Mic preamp */

Definition at line 91 of file awacs.h.

#define MASK_GAINRIGHT   (0xf) /* Gain Right Mask */

Definition at line 88 of file awacs.h.

#define MASK_HDMUTE   MASK_AMUTE

Definition at line 116 of file awacs.h.

#define MASK_HDPCONN   8 /* headphone plugged in */

Definition at line 161 of file awacs.h.

#define MASK_HDPLCONN_IMAC   2 /* headphone left plugged in */

Definition at line 167 of file awacs.h.

#define MASK_HDPRCONN_IMAC   4 /* headphone right plugged in */

Definition at line 166 of file awacs.h.

#define MASK_IEE   (0x1 << 13) /* Enable Interrupt on Error */

Definition at line 52 of file awacs.h.

#define MASK_IEPC   (0x1 << 14) /* Enable Interrupt on Port Change */

Definition at line 53 of file awacs.h.

#define MASK_INSENSE   (0xf) /* port sense bits: */

Definition at line 160 of file awacs.h.

#define MASK_ISFSEL   (0xf) /* Input SubFrame Select */

Definition at line 47 of file awacs.h.

#define MASK_LICONN   2 /* line-in plugged in */

Definition at line 163 of file awacs.h.

#define MASK_LICONN_IMAC   8 /* line-in plugged in */

Definition at line 165 of file awacs.h.

#define MASK_LOCONN   4 /* line-out plugged in */

Definition at line 162 of file awacs.h.

#define MASK_LOCONN_IMAC   1 /* line-out plugged in */

Definition at line 168 of file awacs.h.

#define MASK_LOOPTHRU   (0x1 << 6) /* Loopthrough Enable */

Definition at line 109 of file awacs.h.

#define MASK_MFGID   (0xf << 8) /* Mfg. ID */

Definition at line 158 of file awacs.h.

#define MASK_MIC_BOOST   (0x4) /* screamer mic boost */

Definition at line 147 of file awacs.h.

#define MASK_MICCONN   1 /* microphone plugged in */

Definition at line 164 of file awacs.h.

#define MASK_MUX_AUDIN   (0x1 << 11) /* Select Audio In in MUX */

Definition at line 94 of file awacs.h.

#define MASK_MUX_CD   (0x1 << 9) /* Select CD in MUX */

Definition at line 92 of file awacs.h.

#define MASK_MUX_LINE   MASK_MUX_AUDIN

Definition at line 95 of file awacs.h.

#define MASK_MUX_MIC   (0x1 << 10) /* Select Mic in MUX */

Definition at line 93 of file awacs.h.

#define MASK_NEWECMD   (0x1 << 24) /* Lock: don't write to reg when 1 */

Definition at line 58 of file awacs.h.

#define MASK_OFLEFT   (0x1 << 21) /* Overflow Left */

Definition at line 154 of file awacs.h.

#define MASK_OFRIGHT   (0x1 << 20) /* Overflow Right */

Definition at line 155 of file awacs.h.

#define MASK_OSFSEL   (0xf << 4) /* Output SubFrame Select */

Definition at line 48 of file awacs.h.

#define MASK_OUTVOLLEFT   (0xf << 6) /* Output Left Volume */

Definition at line 139 of file awacs.h.

#define MASK_OUTVOLRIGHT   (0xf) /* Output Right Volume */

Definition at line 136 of file awacs.h.

#define MASK_PAROUT   (0x3 << 10) /* Parallel Out (???) */

Definition at line 118 of file awacs.h.

#define MASK_PAROUT0   (0x1 << 10) /* Parallel Out (???) */

Definition at line 119 of file awacs.h.

#define MASK_PAROUT1   (0x1 << 11) /* Parallel Out (enable speaker) */

Definition at line 120 of file awacs.h.

#define MASK_PORTCHG   (0x1 << 12) /* Port Change */

Definition at line 51 of file awacs.h.

#define MASK_RATE   (0x7 << 8) /* Sound Rate */

Definition at line 49 of file awacs.h.

#define MASK_RECALIBRATE   (0x1 << 2) /* Recalibrate */

Definition at line 107 of file awacs.h.

#define MASK_REVISION   (0xf << 12) /* Revision Number */

Definition at line 157 of file awacs.h.

#define MASK_SAMPLERATE   (0x7 << 3) /* Sample Rate: */

Definition at line 108 of file awacs.h.

#define MASK_SPKMUTE   MASK_CMUTE

Definition at line 112 of file awacs.h.

#define MASK_SSFSEL   (0x3 << 15) /* Status SubFrame Select */

Definition at line 54 of file awacs.h.

#define MASK_VALID   (0x1 << 22) /* Valid Data? */

Definition at line 153 of file awacs.h.

#define MASK_WAIT   (0x1) /* Wait */

Definition at line 180 of file awacs.h.

#define RATE_11025   (0x5 << 8) /* 11.025 kHz */

Definition at line 195 of file awacs.h.

#define RATE_12000   (0x5 << 8) /* 12 kHz */

Definition at line 194 of file awacs.h.

#define RATE_14700   (0x4 << 8) /* 14.7 kHz */

Definition at line 193 of file awacs.h.

#define RATE_16000   (0x4 << 8) /* 16 kHz */

Definition at line 192 of file awacs.h.

#define RATE_17640   (0x3 << 8) /* 17.64 kHz */

Definition at line 191 of file awacs.h.

#define RATE_19200   (0x3 << 8) /* 19.2 kHz */

Definition at line 190 of file awacs.h.

#define RATE_22050   (0x2 << 8) /* 22.05 kHz */

Definition at line 189 of file awacs.h.

#define RATE_24000   (0x2 << 8) /* 24 kHz */

Definition at line 188 of file awacs.h.

#define RATE_29400   (0x1 << 8) /* 29.4 kHz */

Definition at line 187 of file awacs.h.

#define RATE_32000   (0x1 << 8) /* 32 kHz */

Definition at line 186 of file awacs.h.

#define RATE_44100   (0x0 << 8) /* 44.1 kHz */

Definition at line 185 of file awacs.h.

#define RATE_48000   (0x0 << 8) /* 48 kHz */

Definition at line 184 of file awacs.h.

#define RATE_7350   (0x7 << 8) /* 7.35 kHz */

Definition at line 199 of file awacs.h.

#define RATE_8000   (0x7 << 8) /* 8 kHz */

Definition at line 198 of file awacs.h.

#define RATE_8820   (0x6 << 8) /* 8.82 kHz */

Definition at line 197 of file awacs.h.

#define RATE_9600   (0x6 << 8) /* 9.6 kHz */

Definition at line 196 of file awacs.h.

#define RATE_LOW   1 /* HIGH = 48kHz, etc; LOW = 44.1kHz, etc. */

Definition at line 201 of file awacs.h.

#define SAMPLERATE_12000   (0x5 << 3) /* 12 or 11.025 kHz */

Definition at line 130 of file awacs.h.

#define SAMPLERATE_16000   (0x4 << 3) /* 16 or 14.7 kHz */

Definition at line 129 of file awacs.h.

#define SAMPLERATE_19200   (0x3 << 3) /* 19.2 or 17.64 kHz */

Definition at line 128 of file awacs.h.

#define SAMPLERATE_24000   (0x2 << 3) /* 24 or 22.05 kHz */

Definition at line 127 of file awacs.h.

#define SAMPLERATE_32000   (0x1 << 3) /* 32 or 29.4 kHz */

Definition at line 126 of file awacs.h.

#define SAMPLERATE_48000   (0x0 << 3) /* 48 or 44.1 kHz */

Definition at line 125 of file awacs.h.

#define SAMPLERATE_8000   (0x7 << 3) /* 8 or 7.35 kHz */

Definition at line 132 of file awacs.h.

#define SAMPLERATE_9600   (0x6 << 3) /* 9.6 or 8.82 kHz */

Definition at line 131 of file awacs.h.

#define SHIFT_GAINLINE   8

Definition at line 96 of file awacs.h.

#define SHIFT_HDMUTE   9

Definition at line 117 of file awacs.h.

#define SHIFT_LOOPTHRU   6

Definition at line 110 of file awacs.h.

#define SHIFT_MIC_BOOST   2

Definition at line 148 of file awacs.h.

#define SHIFT_MUX_CD   9

Definition at line 97 of file awacs.h.

#define SHIFT_MUX_LINE   11

Definition at line 99 of file awacs.h.

#define SHIFT_MUX_MIC   10

Definition at line 98 of file awacs.h.

#define SHIFT_PAROUT   10

Definition at line 121 of file awacs.h.

#define SHIFT_PAROUT0   10

Definition at line 122 of file awacs.h.

#define SHIFT_PAROUT1   11

Definition at line 123 of file awacs.h.

#define SHIFT_SPKMUTE   7

Definition at line 113 of file awacs.h.

#define VOLLEFT (   x)    (((~(x)) << 6) & MASK_OUTVOLLEFT)

Definition at line 144 of file awacs.h.

#define VOLRIGHT (   x)    (((~(x)) & MASK_OUTVOLRIGHT))

Definition at line 143 of file awacs.h.