~ubuntu-branches/ubuntu/oneiric/oss4/oneiric-proposed

« back to all changes in this revision

Viewing changes to kernel/drv/oss_hdaudio/hdaudio.h

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Rivera
  • Date: 2011-06-16 20:37:48 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110616203748-jbrxik6ql33z54co
Tags: 4.2-build2004-1ubuntu1
* Merge from Debian unstable.
  - Supports our current kernel (LP: #746048)
  Remaining changes:
  - debian/oss4-dkms.dkms.in: s/source/build/ in Kernel headers paths.
* ld-as-needed.patch: Re-order CC arguments to enable building with ld
  --as-needed (LP: #770972)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Purpose: Common definitions for the hdaudio driver files
 
3
 */
 
4
/*
 
5
 *
 
6
 * This file is part of Open Sound System.
 
7
 *
 
8
 * Copyright (C) 4Front Technologies 1996-2008.
 
9
 *
 
10
 * This this source file is released under GPL v2 license (no other versions).
 
11
 * See the COPYING file included in the main directory of this source
 
12
 * distribution for the license terms and conditions.
 
13
 *
 
14
 */
 
15
#define HDA_GCAP                0x00    /* Global Capabilities  */
 
16
#define HDA_VMIN                0x02    /* Minor Version */
 
17
#define HDA_VMAJ                0x03    /* Major Version */
 
18
#define HDA_OUTPAY              0x04    /* Output Payload Capability */
 
19
#define HDA_INPAY               0x06    /* Input Payload Capability */
 
20
#define HDA_GCTL                0x08    /* Global Control */
 
21
#       define CRST                     0x00000001      /* Controller reset */
 
22
#define HDA_WAKEEN              0x0C    /* Wake Enable */
 
23
#define HDA_STATESTS            0x0E    /* Wake Status */
 
24
#define HDA_GSTST               0x10    /* Global Status */
 
25
#define HDA_INTCTL              0x20    /* Interrupt Control */
 
26
#define HDA_INTSTS              0x24    /* Interrupt Status */
 
27
#define HDA_WCCNT               0x30    /* Wall Clock Counter */
 
28
#define HDA_SSYNC               0x38    /* Stream Synchronization */
 
29
#define HDA_CORBLBASE           0x40    /* CORB Lower Base Address */
 
30
#define HDA_CORBUBASE           0x44    /* CORB Upper Base Address */
 
31
#define HDA_CORBWP              0x48    /* CORB Write Pointer */
 
32
#define HDA_CORBRP              0x4A    /* CORB Read Pointer */
 
33
#define HDA_CORBCTL             0x4C    /* CORB Control */
 
34
#define HDA_CORBSTS             0x4D    /* CORB Status */
 
35
#define HDA_CORBSIZE            0x4E    /* CORB Size */
 
36
#define HDA_RIRBLBASE           0x50    /* RIRB Lower Base Address */
 
37
#define HDA_RIRBUBASE           0x54    /* RIRB Upper Base Address */
 
38
#define HDA_RIRBWP              0x58    /* RIRB Write Pointer */
 
39
#define HDA_RINTCNT             0x5A    /* Response Interrupt Count */
 
40
#define HDA_RIRBCTL             0x5C    /* RIRB Control */
 
41
#define HDA_RIRBSTS             0x5D    /* RIRB Status */
 
42
#define HDA_RIRBSIZE            0x5E    /* RIRB Size */
 
43
#define HDA_IC                  0x60    /* Immediate Command Output Interface */
 
44
#define HDA_IR                  0x64    /* Immediate Command Input Interface */
 
45
#define HDA_IRS                 0x68    /* Immediate Command Status */
 
46
#define HDA_DPLBASE             0x70    /* DMA Position Lower Base Address */
 
47
#define HDA_DPUBASE             0x74    /* DMA Position Upper Base Address */
 
48
 
 
49
#define HDA_SD_CTL              0x0
 
50
#define HDA_SD_STS              0x3
 
51
#define HDA_SD_LPIB             0x4
 
52
#define HDA_SD_CBL              0x8
 
53
#define HDA_SD_LVI              0xC
 
54
#define HDA_SD_FIFOSIZE         0x10
 
55
#define HDA_SD_FORMAT           0x12
 
56
#define HDA_SD_BDLPL            0x18
 
57
#define HDA_SD_BDLPU            0x1C
 
58
#define HDA_SD_LPIBA            0x2004
 
59
 
 
60
#define HDA_SDI0CTL             0x80    /* Stream Descriptor Control */
 
61
#define HDA_SDI0STS             0x83    /* Stream Descriptor Status */
 
62
#define HDA_SDI0LPIB            0x84    /* Link Position in Current Buffer */
 
63
#define HDA_SDI0CBL             0x88    /* Cyclic Buffer Length */
 
64
#define HDA_SDI0LVI             0x8C    /* Last Valid Index */
 
65
#define HDA_SDI0FIFOSIZE        0x90    /* FIFO Size */
 
66
#define HDA_SDI0FORMAT          0x92    /* Format */
 
67
#define HDA_SDI0BDLPL           0x98    /* List Pointer - Lower */
 
68
#define HDA_SDI0BDLPU           0x9C    /* List Pointer - Upper */
 
69
#define HDA_SDI0LPIBA           0x2084  /* Link Posiiton in Buffer n Alias */
 
70
 
 
71
#define HDA_SDI1CTL             0xA0    /* Stream Descriptor Control */
 
72
#define HDA_SDI1STS             0xA3    /* Stream Descriptor Status */
 
73
#define HDA_SDI1LPIB            0xA4    /* Link Position in Current Buffer */
 
74
#define HDA_SDI1CBL             0xA8    /* Cyclic Buffer Length */
 
75
#define HDA_SDI1LVI             0xAC    /* Last Valid Index */
 
76
#define HDA_SDI1FIFOSIZE        0xB0    /* FIFO Size */
 
77
#define HDA_SDI1FORMAT          0xB2    /* Format */
 
78
#define HDA_SDI1BDLPL           0xB8    /* List Pointer - Lower */
 
79
#define HDA_SDI1BDLPU           0xBC    /* List Pointer - Upper */
 
80
#define HDA_SDI1LPIBA           0x20A4  /* Link Posiiton in Buffer n Alias */
 
81
 
 
82
#define HDA_SDI2CTL             0xC0    /* Stream Descriptor Control */
 
83
#define HDA_SDI2STS             0xC3    /* Stream Descriptor Status */
 
84
#define HDA_SDI2LPIB            0xC4    /* Link Position in Current Buffer */
 
85
#define HDA_SDI2CBL             0xC8    /* Cyclic Buffer Length */
 
86
#define HDA_SDI2LVI             0xCC    /* Last Valid Index */
 
87
#define HDA_SDI2FIFOSIZ         0xD0    /* FIFO Size */
 
88
#define HDA_SDI2FORMAT          0xD2    /* Format */
 
89
#define HDA_SDI2BDLPL           0xD8    /* List Pointer - Lower */
 
90
#define HDA_SDI2BDLPU           0xDC    /* List Pointer - Upper */
 
91
#define HDA_SDI2LPIBA           0x20D4  /* Link Posiiton in Buffer n Alias */
 
92
 
 
93
#define HDA_SDI3CTL             0xE0    /* Stream Descriptor Control */
 
94
#define HDA_SDI3STS             0xE3    /* Stream Descriptor Status */
 
95
#define HDA_SDI3LPIB            0xE4    /* Link Position in Current Buffer */
 
96
#define HDA_SDI3CBL             0xE8    /* Cyclic Buffer Length */
 
97
#define HDA_SDI3LVI             0xEC    /* Last Valid Index */
 
98
#define HDA_SDI3FIFOSIZE        0xF0    /* FIFO Size */
 
99
#define HDA_SDI3FORMAT          0xF2    /* Format */
 
100
#define HDA_SDI3BDLPL           0xF8    /* List Pointer - Lower */
 
101
#define HDA_SDI3BDLPU           0xFC    /* List Pointer - Upper */
 
102
#define HDA_SDI3LPIBA           0x20E4  /* Link Posiiton in Buffer n Alias */
 
103
 
 
104
#define HDA_SDO0CTL             0x100   /* Stream Descriptor Control */
 
105
#define HDA_SDO0STS             0x103   /* Stream Descriptor Status */
 
106
#define HDA_SDO0LPIB            0x104   /* Link Position in Current Buffer */
 
107
#define HDA_SDO0CBL             0x108   /* Cyclic Buffer Length */
 
108
#define HDA_SDO0LVI             0x10C   /* Last Valid Index */
 
109
#define HDA_SDO0FIFOSIZE        0x110   /* FIFO Size */
 
110
#define HDA_SDO0FORMAT          0x112   /* Format */
 
111
#define HDA_SDO0BDLPL           0x118   /* List Pointer - Lower */
 
112
#define HDA_SDO0BDLPU           0x11C   /* List Pointer - Upper */
 
113
#define HDA_SDO0LPIBA           0x2104  /* Link Posiiton in Buffer n Alias */
 
114
 
 
115
#define HDA_SDO1CTL             0x120   /* Stream Descriptor Control */
 
116
#define HDA_SDO1STS             0x123   /* Stream Descriptor Status */
 
117
#define HDA_SDO1LPIB            0x124   /* Link Position in Current Buffer */
 
118
#define HDA_SDO1CBL             0x128   /* Cyclic Buffer Length */
 
119
#define HDA_SDO1LVI             0x12C   /* Last Valid Index */
 
120
#define HDA_SDO1FIFOSIZE        0x130   /* FIFO Size */
 
121
#define HDA_SDO1FORMAT          0x132   /* Format */
 
122
#define HDA_SDO1BDLPL           0x138   /* List Pointer - Lower */
 
123
#define HDA_SDO1BDLPU           0x13C   /* List Pointer - Upper */
 
124
#define HDA_SDO1LPIBA           0x2124  /* Link Posiiton in Buffer n Alias */
 
125
 
 
126
#define HDA_SDO2CTL             0x140   /* Stream Descriptor Control */
 
127
#define HDA_SDO2STS             0x143   /* Stream Descriptor Status */
 
128
#define HDA_SDO2LPIB            0x144   /* Link Position in Current Buffer */
 
129
#define HDA_SDO2CBL             0x148   /* Cyclic Buffer Length */
 
130
#define HDA_SDO2LVI             0x14C   /* Last Valid Index */
 
131
#define HDA_SDO2FIFOSIZE        0x150   /* FIFO Size */
 
132
#define HDA_SDO2FORMAT          0x152   /* Format */
 
133
#define HDA_SDO2BDLPL           0x158   /* List Pointer - Lower */
 
134
#define HDA_SDO2BDLPU           0x15C   /* List Pointer - Upper */
 
135
#define HDA_SDO2LPIBA           0x2144  /* Link Posiiton in Buffer n Alias */
 
136
 
 
137
#define HDA_SDO3CTL             0x160   /* Stream Descriptor Control */
 
138
#define HDA_SDO3STS             0x163   /* Stream Descriptor Status */
 
139
#define HDA_SDO3LPIB            0x164   /* Link Position in Current Buffer */
 
140
#define HDA_SDO3CBL             0x168   /* Cyclic Buffer Length */
 
141
#define HDA_SDO3LVI             0x16C   /* Last Valid Index */
 
142
#define HDA_SDO3FIFOSIZE        0x170   /* FIFO Size */
 
143
#define HDA_SDO3FORMAT          0x172   /* Format */
 
144
#define HDA_SDO3BDLPL           0x178   /* List Pointer - Lower */
 
145
#define HDA_SDO3BDLPU           0x17C   /* List Pointer - Upper */
 
146
 
 
147
#define HWINFO_SIZE     256
 
148
 
 
149
/*
 
150
 * Debugging ioctl calls
 
151
 */
 
152
 
 
153
typedef struct
 
154
{
 
155
  int cad, wid;
 
156
  char name[32];
 
157
} hda_name_t;
 
158
 
 
159
typedef struct
 
160
{
 
161
  int cad, wid;
 
162
  char info[4000];
 
163
} hda_widget_info_t;
 
164
 
 
165
#define HDA_IOCTL_WRITE         __SIOWR('H', 0, int)
 
166
#define HDA_IOCTL_READ          __SIOWR('H', 1, int)
 
167
#define HDA_IOCTL_NAME          __SIOWR('H', 2, hda_name_t)
 
168
#define HDA_IOCTL_WIDGET        __SIOWR('H', 3, hda_widget_info_t)