2 * Driver for the NXP SAA7164 PCIe bridge
4 * Copyright (c) 2009 Steven Toth <stoth@kernellabs.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 /* TODO: Cleanup and shorten the namespace */
24 /* Some structues are passed directly to/from the firmware and
25 * have strict alignment requirements. This is one of them.
30 u8 bDescriptorSubtype
;
35 u32 dwDeviceRegistersLocation
;
36 u32 dwHostMemoryRegion
;
37 u32 dwHostMemoryRegionSize
;
38 u32 dwHostHibernatMemRegion
;
39 u32 dwHostHibernatMemRegionSize
;
40 } __attribute__((packed
)) tmComResHWDescr_t
;
42 /* This is DWORD aligned on windows but I can't find the right
43 * gcc syntax to match the binary data from the device.
44 * I've manually padded with Reserved[3] bytes to match the hardware,
45 * but this could break if GCC decies to pack in a different way.
50 u8 bDescriptorSubtype
;
59 } tmComResInterfaceDescr_t
;
85 u32
*m_pdwSetWritePos
;
87 u32
*m_pdwGetWritePos
;
90 /* All access is protected */
102 } __attribute__((packed
)) tmComResInfo_t
;
121 wait_queue_head_t wait
;
135 } __attribute__((packed
)) tmComResDescrHeader_t
;
147 } __attribute__((packed
)) tmComResExtDevDescrHeader_t
;
152 } __attribute__((packed
)) tmComResGPIO_t
;
159 } __attribute__((packed
)) tmComResPathDescrHeader_t
;
163 ITT_ANTENNA
= 0x0203,
164 LINE_CONNECTOR
= 0x0603,
165 SPDIF_CONNECTOR
= 0x0605,
166 COMPOSITE_CONNECTOR
= 0x0401,
167 SVIDEO_CONNECTOR
= 0x0402,
168 COMPONENT_CONNECTOR
= 0x0403,
169 STANDARD_DMA
= 0xF101
170 } tmComResTermType_t
;
181 } __attribute__((packed
)) tmComResAntTermDescrHeader_t
;
193 } __attribute__((packed
)) tmComResTunerDescrHeader_t
;
196 /* the buffer does not contain any valid data */
197 TM_BUFFER_FLAG_EMPTY
,
199 /* the buffer is filled with valid data */
202 /* the buffer is the dummy buffer - TODO??? */
203 TM_BUFFER_FLAG_DUMMY_BUFFER
212 tmBufferFlag_t BufferFlag_t
;
226 u64
**pagetablelistvirt
;
227 u64
*pagetablelistphys
;
229 u32 numpagetableentries
;
230 } tmHWStreamParameters_t
;
233 tmHWStreamParameters_t HWStreamParameters_t
;
234 u64 qwDummyPageTablePhys
;
235 u64
*pDummyPageTableVirt
;
236 } tmStreamParameters_t
;
254 } __attribute__((packed
)) tmComResDMATermDescrHeader_t
;
259 * This is the transport stream format header.
262 * bLength - The size of this descriptor in bytes.
263 * bDescriptorType - CS_INTERFACE.
264 * bDescriptorSubtype - VS_FORMAT_MPEG2TS descriptor subtype.
265 * bFormatIndex - A non-zero constant that uniquely identifies the
267 * bDataOffset - Offset to TSP packet within MPEG-2 TS transport
269 * bPacketLength - Length of TSP packet, in bytes (typically 188).
270 * bStrideLength - Length of MPEG-2 TS transport stride.
271 * guidStrideFormat - A Globally Unique Identifier indicating the
272 * format of the stride data (if any). Set to zeros
273 * if there is no Stride Data, or if the Stride
274 * Data is to be ignored by the application.
285 u8 guidStrideFormat
[16];
286 } __attribute__((packed
)) tmComResTSFormatDescrHeader_t
;