|
abstraction library source file (TSD driver).
More...
Functions |
FAPEXOPENRET_T | FAPEX_TSD_Open (FAPEXOPENARG1_T id, FAPEXOPENARG2_T flags, FAPEXOPENARG3_T argptr) |
| open method. This function is called with the systemcall "open".
|
FAPEXRELRET_T | FAPEX_TSD_Close (FAPEXRELARG1_T id) |
| release method. This function is called with the systemcall "close".
|
FAPEXREADRET_T | FAPEX_TSD_Read (FAPEXREADARG1_T id, FAPEXREADARG2_T buf, FAPEXREADARG3_T count) |
| read method. This function is called with the systemcall "read".
This function is waited for until the stream data is prepared.
|
FAPEXWRTRET_T | FAPEX_TSD_Write (FAPEXWRTARG1_T id, FAPEXWRTARG2_T buf, FAPEXWRTARG3_T count) |
| write method. This function is called with the systemcall "write".
This function is waited for until the empty area is available in buffer.
This function is supported only when the tsSelect value of FAPEX_TSD_OpenParamStrT / FAPEX_TSD_InputParamStrT structure is FAPEX_TSD_INPUT_LINEAR_AUTO_MODE at FAPEX_TSD_Open() or FAPEX_IOCCOM_TSD_SET_INPUT command with FAPEX_TSD_Ioctl().
|
FAPEXIOCRET_T | FAPEX_TSD_Ioctl (FAPEXIOCARG1_T id, FAPEXIOCARG2_T cmd, FAPEXIOCARG3_T pArg) |
| ioctl method. This function is called with the systemcall "ioctl".
|
FAPEXMMPRET_T | FAPEX_TSD_Mmap (FAPEXMMPARG1_T start, FAPEXMMPARG2_T length, FAPEXMMPARG3_T prot, FAPEXMMPARG4_T flags, FAPEXMMPARG5_T id, FAPEXMMPARG6_T offset) |
| mmap method. This function is called with the systemcall "mmap".
|
FAPEXMUNMPRET_T | FAPEX_TSD_Munmap (FAPEXMMPARG1_T start, FAPEXMMPARG2_T length) |
| munmap method. This function is called with the systemcall "munmap".
|
Detailed Description
abstraction library source file (TSD driver).
These function is executed in user space.
- Attention:
- This program is provided as is. You can redistribute it and/or modify it. Fujitsu Semiconductor Limited accepts no responsibility or liability for any errors or omissions.
Copyright (C) 2008-2010 Fujitsu Semiconductor Limited, All Rights Reserved.
Function Documentation
open method. This function is called with the systemcall "open".
- Parameters:
-
id | The identifier for TSD block descriptor (common descriptor). |
flags | This parameter indicate a open mode (read only/write only/read-write).
This implementation supports only read-write mode. |
argptr | argument pointer (FAPEX_TSD_OpenParamStrT)
If descriptor for this 'id' has already been opened, this 'argptr' will be invalid. |
- Return values:
-
>=0 | process OK, new file descriptor is returned. |
<0 | process fails, its value is set to errno. |
release method. This function is called with the systemcall "close".
- Parameters:
-
id | The identifier for TSD block descriptor (common descriptor). |
- Return values:
-
0 | process OK |
<0 | process fails, its value is set to errno. |
read method. This function is called with the systemcall "read".
This function is waited for until the stream data is prepared.
- Parameters:
-
id | The identifier for TSD channel descriptor (sub descriptor). |
buf | The pointer to the destination buffer which is in the user space. |
count | The data size. |
- Return values:
-
>=0 | process OK, its value is the number of bytes actually read. |
<0 | process fails, its value is set to errno. |
write method. This function is called with the systemcall "write".
This function is waited for until the empty area is available in buffer.
This function is supported only when the tsSelect value of FAPEX_TSD_OpenParamStrT / FAPEX_TSD_InputParamStrT structure is FAPEX_TSD_INPUT_LINEAR_AUTO_MODE at FAPEX_TSD_Open() or FAPEX_IOCCOM_TSD_SET_INPUT command with FAPEX_TSD_Ioctl().
- Parameters:
-
id | The identifier for TSD block descriptor (common descriptor). |
buf | The pointer to the source buffer which is in the user space. |
count | The data size. |
- Return values:
-
>=0 | process OK, its value is the number of bytes actually write. |
<0 | process fails, its value is set to errno. |
- Note:
- There are limitation for using this function as follows.
- The first data in 'buf' area should be the sync word of TS packet.
- The size of TS packet should be "188" byte.
- TS packet data should be registered with big endian format.
ioctl method. This function is called with the systemcall "ioctl".
- Parameters:
-
id | The identifier for this descriptor. |
cmd | The ioctl command. |
pArg | The pointer to the argument of the ioctl command. |
- Return values:
-
0 | process OK |
<0 | process fails, its value is set to errno. |
ioctl command( cmd) type:
- FAPEX_IOCCOM_START
start TSD channel. (pArg is ignored)
When id is common descriptor for TSD block, all TSD channels on the ready state in this block will start.
When id is sub descriptor for a TSD channel on the ready state, only this TSD channel will start.
- FAPEX_IOCCOM_STOP
stop TSD channel. (pArg is ignored)
When id is common descriptor for TSD block, all TSD channels on the running state in this block will stop.
When id is sub descriptor for a TSD channel on the running state, only this TSD channel will start.
- FAPEX_IOCCOM_RESET
reset TSD block STC regulation. (pArg is ignored)
The id should be common descriptor for TSD block.
- FAPEX_IOCCOM_TSD_GET_STATUS
get TSD block/channel status.
Set pointer of FAPEX_TSD_StatusStrT data field to pArg.
The status value will be set to this field.
When id is common descriptor, it is possible to get TSD block status.
When id is sub descriptor, it is possible to get channel status.
- FAPEX_IOCCOM_TSD_GET_STC_VALUE
get STC value (unit of 90kHz).
Set pointer of uint64_t data to pArg.
If the appointed TSD block doesn't use STC, the returned value will be 0xFFFFFFFFFFFFFFFF.
mmap method. This function is called with the systemcall "mmap".
- Demuxed Buffer Mapping
When 'id' is TSD channel descriptor (sub descriptor),
this function supports accessing of the mapped area forTS-Demuxed payload data.
The readable area is only bufferSize bytes from mapped address.
This bufferSize is parameter of FAPEX_TSD_PidParamStrT or the FAPEX_TSD_SctFltParamStrT structure.
If the access of area excluding this is executed, the operation will not be guaranteed.
After reading of this payload data, the FAPEX_IOCCOM_TSD_SET_BUFFER_READSIZE command with FAPEX_TSD_Ioctl() should be executed.
- Parameters:
-
start | The memory mapping start pointer. |
length | The memory mapping size. |
prot | The desired memory protection. |
flags | The mapping option. |
id | The identifier for TSD block descriptor (common descriptor) or TSD channel descriptor (sub descriptor). |
offset | The memory mapping offset value. |
- Return values:
-
>0 | process OK, its value is the mapping address. |
<0 | process fails, its value is set to errno. |
munmap method. This function is called with the systemcall "munmap".
- Parameters:
-
start | The memory mapping start pointer. |
length | The memory mapping size. |
- Return values:
-
0 | process OK |
<0 | process fails, its value is set to errno. |
|
Copyright © 2006-2010 by Fujitsu Semiconductor Europe GmbH |
Copyright © 2008-2010 by Fujitsu Semiconductor Limited |
|
|
Disclaimer:
Please note that the use of this has been based on the terms and conditions of "DK Consent Letter (For Linux)"
agreement between you and Fujitsu Semiconductor Limited.
The contents of this document may be revised without prior notice. Contact our sales department for confirmation.
The information in this document are presented as is, no license is granted by implication or otherwise.
More...
FUJITSU sales representatives
|
|