Fujitsu DTV/STB solution driver (FAPex driver) Documentation [V01L00R00]


fapex/abst_libauout.h File Reference

abstraction library header file (Audio Output driver) More...

Data Structures

struct  FAPEX_AUOUT_OpenParamStrT
 open parameters for the AUOUT driver More...
struct  FAPEX_AUOUT_PcmInfoStrT
 PCM information parameters for the AUOUT driver. More...
struct  FAPEX_AUOUT_MuteParamStrT
 mute parameter for the AUOUT driver More...
struct  FAPEX_AUOUT_VolumeParamStrT
 volume parameter for the AUOUT driver More...
struct  FAPEX_AUOUT_DualMonoParamStrT
 DualMono parameter for the AUOUT driver. More...
struct  FAPEX_AUOUT_SpeakersParamStrT
 speakers parameter for the AUOUT driver More...
struct  FAPEX_AUOUT_BufferParamStrT
 I2S buffer parameter for the AUOUT driver. More...

Defines

#define FAPEX_AUOUT_ERR_BASE   (FAPEX_AUOUT_MODULE_BASE + FAPEX_RET_ERR_BASE)
#define FAPEX_AUOUT_ERR_BAD_PARAMETER   (FAPEX_AUOUT_ERR_BASE + FAPEX_ERR_BAD_PARAMETER)
#define FAPEX_AUOUT_ERR_OUT_OF_MEMORY   (FAPEX_AUOUT_ERR_BASE + FAPEX_ERR_OUT_OF_MEMORY)
#define FAPEX_AUOUT_ENABLE_I2S   (0x0001)
 Enable I2S output.
#define FAPEX_AUOUT_ENABLE_SPDIF   (0x0002)
 Enable SPDIF output.
#define FAPEX_AUOUT_ENABLE_HDMI   (0x0004)
 Enable HDMI output.
#define FAPEX_AUOUT_ENABLE_TYPE_MASK   (FAPEX_AUOUT_ENABLE_I2S | FAPEX_AUOUT_ENABLE_SPDIF)
#define FAPEX_AUOUT_CHANNEL_LEFT   0x00000001
 Enable Left channel.
#define FAPEX_AUOUT_CHANNEL_CENTER   0x00000002
 Enable Center channel.
#define FAPEX_AUOUT_CHANNEL_RIGHT   0x00000004
 Enable Right channel.
#define FAPEX_AUOUT_CHANNEL_SUR_LEFT   0x00000008
 Enable Left Surround channel.
#define FAPEX_AUOUT_CHANNEL_SUR_RIGHT   0x00000010
 Enable Right Surround channel.
#define FAPEX_AUOUT_CHANNEL_BACK_LEFT   0x00000020
 Enable Left Back Surround channel.
#define FAPEX_AUOUT_CHANNEL_BACK_RIGHT   0x00000040
 Enable Right Back Surround channel.
#define FAPEX_AUOUT_CHANNEL_LFE   0x00000080
 Enable Low Frequency Effects channel.
#define FAPEX_AUOUT_CHANNEL_ALL
#define FAPEX_AUOUT_CHANNEL_MIN_ID   (FAPEX_AUOUT_CHANNEL_LEFT)
#define FAPEX_AUOUT_CHANNEL_MAX_ID   (FAPEX_AUOUT_CHANNEL_LFE)
#define FAPEX_AUOUT_SPEAKER_MIN_ID   (0)
#define FAPEX_AUOUT_SPEAKER_MAX_ID   (7)
#define FAPEX_AUOUT_CHANNEL_STEREO   (FAPEX_AUOUT_CHANNEL_LEFT | FAPEX_AUOUT_CHANNEL_RIGHT)
#define FAPEX_AUOUT_CHANNEL_2BK   (FAPEX_AUOUT_CHANNEL_BACK_LEFT | FAPEX_AUOUT_CHANNEL_BACK_RIGHT)
#define FAPEX_AUOUT_CHANNEL_2SD   (FAPEX_AUOUT_CHANNEL_SUR_LEFT | FAPEX_AUOUT_CHANNEL_SUR_RIGHT)
#define FAPEX_AUOUT_CHANNEL_2P1CH   (FAPEX_AUOUT_CHANNEL_STEREO | FAPEX_AUOUT_CHANNEL_LFE)
#define FAPEX_AUOUT_CHANNEL_3CH   (FAPEX_AUOUT_CHANNEL_STEREO | FAPEX_AUOUT_CHANNEL_CENTER)
#define FAPEX_AUOUT_CHANNEL_3P1CH   (FAPEX_AUOUT_CHANNEL_3CH | FAPEX_AUOUT_CHANNEL_LFE)
#define FAPEX_AUOUT_CHANNEL_2S2CH   (FAPEX_AUOUT_CHANNEL_STEREO | FAPEX_AUOUT_CHANNEL_2BK)
#define FAPEX_AUOUT_CHANNEL_4P1CH   (FAPEX_AUOUT_CHANNEL_2S2CH | FAPEX_AUOUT_CHANNEL_LFE)
#define FAPEX_AUOUT_CHANNEL_3S2CH   (FAPEX_AUOUT_CHANNEL_3CH | FAPEX_AUOUT_CHANNEL_2BK)
#define FAPEX_AUOUT_CHANNEL_5P1CH   (FAPEX_AUOUT_CHANNEL_3S2CH | FAPEX_AUOUT_CHANNEL_LFE)
#define FAPEX_AUOUT_CHANNEL_7P1CH   (FAPEX_AUOUT_CHANNEL_5P1CH | FAPEX_AUOUT_CHANNEL_2SD)
#define FAPEX_AUOUT_STREAM_UNDEF   (-1)
 stream type parameter for the AUOUT driver
#define FAPEX_AUOUT_STREAM_AAC   (0)
 AAC-LC compressed audio.
#define FAPEX_AUOUT_STREAM_AC3   (1)
 AC3 compressed audio.
#define FAPEX_AUOUT_STREAM_MPEG_L1   (2)
 MPEG1/2 Layer 1 compressed audio.
#define FAPEX_AUOUT_STREAM_MPEG_L2   (3)
 MPEG1/2 Layer 2 compressed audio.
#define FAPEX_AUOUT_STREAM_MPEG_L3   (4)
 MPEG1/2 Layer 3 (MP3) compressed audio.
#define FAPEX_AUOUT_STREAM_WMA   (5)
 WMA compressed audio.
#define FAPEX_AUOUT_STREAM_EC3   (6)
 Enhanced AC3 compressed audio.
#define FAPEX_AUOUT_STREAM_HEAAC   (7)
 AACplus v1/v2 compressed audio.
#define FAPEX_AUOUT_BUFFER0_0   (0x0001)
 Enable Buffer0-0.
#define FAPEX_AUOUT_BUFFER0_1   (0x0002)
 Enable Buffer0-1.
#define FAPEX_AUOUT_BUFFER1_0   (0x0004)
 Enable Buffer1-0.
#define FAPEX_AUOUT_BUFFER1_1   (0x0008)
 Enable Buffer1-1.
#define FAPEX_AUOUT_BUFFER2_0   (0x0010)
 Enable Buffer2-0.
#define FAPEX_AUOUT_BUFFER2_1   (0x0020)
 Enable Buffer2-1.
#define FAPEX_AUOUT_BUFFER3_0   (0x0040)
 Enable Buffer3-0.
#define FAPEX_AUOUT_BUFFER3_1   (0x0080)
 Enable Buffer3-1.
#define FAPEX_IOCCOM_AUOUT_OPEN   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 0, FAPEX_AUOUT_OpenParamStrT)
 ioctl specific command for the AUOUT driver
#define FAPEX_IOCCOM_AUOUT_SET_PCM_INFO   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 1, FAPEX_AUOUT_PcmInfoStrT)
#define FAPEX_IOCCOM_AUOUT_GET_PCM_INFO   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 1, FAPEX_AUOUT_PcmInfoStrT)
#define FAPEX_IOCCOM_AUOUT_SET_STREAM_TYPE   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 2, int32_t)
#define FAPEX_IOCCOM_AUOUT_GET_STREAM_TYPE   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 2, int32_t)
#define FAPEX_IOCCOM_AUOUT_SET_MUTE   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 3, FAPEX_AUOUT_MuteParamStrT)
#define FAPEX_IOCCOM_AUOUT_SET_VOLUME   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 4, FAPEX_AUOUT_VolumeParamStrT)
#define FAPEX_IOCCOM_AUOUT_GET_VOLUME   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 4, FAPEX_AUOUT_VolumeParamStrT)
#define FAPEX_IOCCOM_AUOUT_SET_DUALMONO   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 5, FAPEX_AUOUT_DualMonoParamStrT)
#define FAPEX_IOCCOM_AUOUT_GET_SPEAKERS   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 6, FAPEX_AUOUT_SpeakersParamStrT)
#define FAPEX_IOCCOM_AUOUT_GET_I2SBUFFERS   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 7, FAPEX_AUOUT_BufferParamStrT)
#define FAPEX_IOCCOM_AUOUT_START_HDMI   _IO(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 8)
#define FAPEX_IOCCOM_AUOUT_STOP_HDMI   _IO(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 9)

Functions

FAPEXOPENRET_T FAPEX_AUOUT_Open (FAPEXOPENARG1_T id, FAPEXOPENARG2_T flags, FAPEXOPENARG3_T argptr)
 open method. This function is called with the systemcall "open".
FAPEXRELRET_T FAPEX_AUOUT_Close (FAPEXRELARG1_T id)
 release method. This function is called with the systemcall "close".
FAPEXIOCRET_T FAPEX_AUOUT_Ioctl (FAPEXIOCARG1_T id, FAPEXIOCARG2_T cmd, FAPEXIOCARG3_T pArg)
 ioctl method. This function is called with the systemcall "ioctl".

Detailed Description

abstraction library header file (Audio Output driver)

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.


Define Documentation

#define FAPEX_AUOUT_ERR_BASE   (FAPEX_AUOUT_MODULE_BASE + FAPEX_RET_ERR_BASE)

FAPex AUOUT error code base value

#define FAPEX_AUOUT_ERR_BAD_PARAMETER   (FAPEX_AUOUT_ERR_BASE + FAPEX_ERR_BAD_PARAMETER)

Bad parameter passed.

#define FAPEX_AUOUT_ERR_OUT_OF_MEMORY   (FAPEX_AUOUT_ERR_BASE + FAPEX_ERR_OUT_OF_MEMORY)

Memory allocation failed.

#define FAPEX_AUOUT_ENABLE_I2S   (0x0001)

Enable I2S output.

#define FAPEX_AUOUT_ENABLE_SPDIF   (0x0002)

Enable SPDIF output.

#define FAPEX_AUOUT_ENABLE_HDMI   (0x0004)

Enable HDMI output.

#define FAPEX_AUOUT_ENABLE_TYPE_MASK   (FAPEX_AUOUT_ENABLE_I2S | FAPEX_AUOUT_ENABLE_SPDIF)
#define FAPEX_AUOUT_CHANNEL_LEFT   0x00000001

Enable Left channel.

#define FAPEX_AUOUT_CHANNEL_CENTER   0x00000002

Enable Center channel.

#define FAPEX_AUOUT_CHANNEL_RIGHT   0x00000004

Enable Right channel.

#define FAPEX_AUOUT_CHANNEL_SUR_LEFT   0x00000008

Enable Left Surround channel.

#define FAPEX_AUOUT_CHANNEL_SUR_RIGHT   0x00000010

Enable Right Surround channel.

#define FAPEX_AUOUT_CHANNEL_BACK_LEFT   0x00000020

Enable Left Back Surround channel.

#define FAPEX_AUOUT_CHANNEL_BACK_RIGHT   0x00000040

Enable Right Back Surround channel.

#define FAPEX_AUOUT_CHANNEL_LFE   0x00000080

Enable Low Frequency Effects channel.

#define FAPEX_AUOUT_CHANNEL_MIN_ID   (FAPEX_AUOUT_CHANNEL_LEFT)
#define FAPEX_AUOUT_CHANNEL_MAX_ID   (FAPEX_AUOUT_CHANNEL_LFE)
#define FAPEX_AUOUT_SPEAKER_MIN_ID   (0)
#define FAPEX_AUOUT_SPEAKER_MAX_ID   (7)
#define FAPEX_AUOUT_CHANNEL_STEREO   (FAPEX_AUOUT_CHANNEL_LEFT | FAPEX_AUOUT_CHANNEL_RIGHT)
#define FAPEX_AUOUT_CHANNEL_2BK   (FAPEX_AUOUT_CHANNEL_BACK_LEFT | FAPEX_AUOUT_CHANNEL_BACK_RIGHT)
#define FAPEX_AUOUT_CHANNEL_2SD   (FAPEX_AUOUT_CHANNEL_SUR_LEFT | FAPEX_AUOUT_CHANNEL_SUR_RIGHT)
#define FAPEX_AUOUT_CHANNEL_2P1CH   (FAPEX_AUOUT_CHANNEL_STEREO | FAPEX_AUOUT_CHANNEL_LFE)
#define FAPEX_AUOUT_CHANNEL_3CH   (FAPEX_AUOUT_CHANNEL_STEREO | FAPEX_AUOUT_CHANNEL_CENTER)
#define FAPEX_AUOUT_CHANNEL_3P1CH   (FAPEX_AUOUT_CHANNEL_3CH | FAPEX_AUOUT_CHANNEL_LFE)
#define FAPEX_AUOUT_CHANNEL_2S2CH   (FAPEX_AUOUT_CHANNEL_STEREO | FAPEX_AUOUT_CHANNEL_2BK)
#define FAPEX_AUOUT_CHANNEL_4P1CH   (FAPEX_AUOUT_CHANNEL_2S2CH | FAPEX_AUOUT_CHANNEL_LFE)
#define FAPEX_AUOUT_CHANNEL_3S2CH   (FAPEX_AUOUT_CHANNEL_3CH | FAPEX_AUOUT_CHANNEL_2BK)
#define FAPEX_AUOUT_CHANNEL_5P1CH   (FAPEX_AUOUT_CHANNEL_3S2CH | FAPEX_AUOUT_CHANNEL_LFE)
#define FAPEX_AUOUT_CHANNEL_7P1CH   (FAPEX_AUOUT_CHANNEL_5P1CH | FAPEX_AUOUT_CHANNEL_2SD)
#define FAPEX_AUOUT_STREAM_UNDEF   (-1)

stream type parameter for the AUOUT driver

The related ioctl command type : FAPEX_IOCCOM_AUOUT_SET_STREAM_TYPE, FAPEX_IOCCOM_AUOUT_GET_STREAM_TYPE

See also:
FAPEX_AUOUT_Ioctl Audio stream undefined.
#define FAPEX_AUOUT_STREAM_AAC   (0)

AAC-LC compressed audio.

#define FAPEX_AUOUT_STREAM_AC3   (1)

AC3 compressed audio.

#define FAPEX_AUOUT_STREAM_MPEG_L1   (2)

MPEG1/2 Layer 1 compressed audio.

#define FAPEX_AUOUT_STREAM_MPEG_L2   (3)

MPEG1/2 Layer 2 compressed audio.

#define FAPEX_AUOUT_STREAM_MPEG_L3   (4)

MPEG1/2 Layer 3 (MP3) compressed audio.

#define FAPEX_AUOUT_STREAM_WMA   (5)

WMA compressed audio.

#define FAPEX_AUOUT_STREAM_EC3   (6)

Enhanced AC3 compressed audio.

#define FAPEX_AUOUT_STREAM_HEAAC   (7)

AACplus v1/v2 compressed audio.

#define FAPEX_AUOUT_BUFFER0_0   (0x0001)

Enable Buffer0-0.

#define FAPEX_AUOUT_BUFFER0_1   (0x0002)

Enable Buffer0-1.

#define FAPEX_AUOUT_BUFFER1_0   (0x0004)

Enable Buffer1-0.

#define FAPEX_AUOUT_BUFFER1_1   (0x0008)

Enable Buffer1-1.

#define FAPEX_AUOUT_BUFFER2_0   (0x0010)

Enable Buffer2-0.

#define FAPEX_AUOUT_BUFFER2_1   (0x0020)

Enable Buffer2-1.

#define FAPEX_AUOUT_BUFFER3_0   (0x0040)

Enable Buffer3-0.

#define FAPEX_AUOUT_BUFFER3_1   (0x0080)

Enable Buffer3-1.

#define FAPEX_IOCCOM_AUOUT_OPEN   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 0, FAPEX_AUOUT_OpenParamStrT)

ioctl specific command for the AUOUT driver

#define FAPEX_IOCCOM_AUOUT_SET_PCM_INFO   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 1, FAPEX_AUOUT_PcmInfoStrT)
#define FAPEX_IOCCOM_AUOUT_GET_PCM_INFO   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 1, FAPEX_AUOUT_PcmInfoStrT)
#define FAPEX_IOCCOM_AUOUT_SET_STREAM_TYPE   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 2, int32_t)
#define FAPEX_IOCCOM_AUOUT_GET_STREAM_TYPE   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 2, int32_t)
#define FAPEX_IOCCOM_AUOUT_SET_MUTE   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 3, FAPEX_AUOUT_MuteParamStrT)
#define FAPEX_IOCCOM_AUOUT_SET_VOLUME   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 4, FAPEX_AUOUT_VolumeParamStrT)
#define FAPEX_IOCCOM_AUOUT_GET_VOLUME   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 4, FAPEX_AUOUT_VolumeParamStrT)
#define FAPEX_IOCCOM_AUOUT_SET_DUALMONO   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 5, FAPEX_AUOUT_DualMonoParamStrT)
#define FAPEX_IOCCOM_AUOUT_GET_SPEAKERS   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 6, FAPEX_AUOUT_SpeakersParamStrT)
#define FAPEX_IOCCOM_AUOUT_GET_I2SBUFFERS   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 7, FAPEX_AUOUT_BufferParamStrT)
#define FAPEX_IOCCOM_AUOUT_START_HDMI   _IO(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 8)
#define FAPEX_IOCCOM_AUOUT_STOP_HDMI   _IO(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_AUOUT + 9)

Function Documentation

FAPEXOPENRET_T FAPEX_AUOUT_Open ( FAPEXOPENARG1_T  id,
FAPEXOPENARG2_T  flags,
FAPEXOPENARG3_T  argptr 
)

open method. This function is called with the systemcall "open".

Parameters:
idThe device identifier.
flagsThis parameter indicate a open mode (read only/write only/read-write).
This implementation supports only read-write mode.
argptrargument pointer (FAPEX_AUOUT_OpenParamStrT)
If descriptor for this 'id' has already been opened, this 'argptr' will be invalid.
Return values:
>=0process OK, new file descriptor is returned.
<0process fails, its value is set to errno.
FAPEXRELRET_T FAPEX_AUOUT_Close ( FAPEXRELARG1_T  id )

release method. This function is called with the systemcall "close".

Parameters:
idThe identifier for this descriptor.
Return values:
0process OK
<0process fails, its value is set to errno.
FAPEXIOCRET_T FAPEX_AUOUT_Ioctl ( FAPEXIOCARG1_T  id,
FAPEXIOCARG2_T  cmd,
FAPEXIOCARG3_T  pArg 
)

ioctl method. This function is called with the systemcall "ioctl".

Parameters:
idThe identifier for this descriptor.
cmdThe ioctl command.
pArgThe pointer to the argument of the ioctl command.
Return values:
0process OK
<0process fails, its value is set to errno.

ioctl command(cmd) type:



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