Properties
Handle
typedef uint32_t Handle
Unique handle allocated to a radio module
Result
enum Result: int32_t
Details |
Members |
OK
|
|
NOT_INITIALIZED
|
|
INVALID_ARGUMENTS
|
|
INVALID_STATE
|
|
TIMEOUT
|
|
|
Class
enum Class: uint32_t
Radio hardware module class.A given radio hardware module HAL is of one class only.The platform can not have more than one hardware module of each class.Current version of the framework only supports RADIO_CLASS_AM_FM.
Details |
Members |
AM_FM = 0
|
FM(including HD radio)and AM
|
SAT = 1
|
Satellite Radio
|
DT = 2
|
Digital Radio(DAB )
|
|
Band
enum Band: uint32_t
value for field "type" of radio band described in struct radio_hal_band_config
Details |
Members |
AM = 0
|
Amplitude Modulation band:LW, MW, SW
|
FM = 1
|
Frequency Modulation band:FM
|
FM_HD = 2
|
FM HD Radio / DRM(IBOC )
|
AM_HD = 3
|
AM HD Radio / DRM(IBOC )
|
|
Rds
enum Rds: uint32_t
RDS variant implemented.A struct FmBandConfig can list none or several.
Details |
Members |
NONE = 0
|
|
WORLD = ( 1 << 0 )
|
|
US = ( 1 << 1 )
|
|
|
Deemphasis
enum Deemphasis: uint32_t
FM deemphasis variant implemented.A struct FmBandConfig can list one or more.
Details |
Members |
D50 = ( 1 << 0 )
|
|
D75 = ( 1 << 1 )
|
|
|
Direction
enum Direction: uint32_t
Scanning direction for scan() and step() tuner APIs
MetadataType
enum MetadataType: int32_t
Details |
Members |
INVALID = -1
|
|
INT = 0
|
Signed 32 bit integer
|
TEXT = 1
|
String
|
RAW = 2
|
Raw binary data(icon or art).
The data should be a valid PNG, JPEG, GIF or BMP file.Invalid format must be handled gracefully as if the field was missing.
|
CLOCK = 3
|
clock data, see MetaDataClock
|
|
MetadataKey
enum MetadataKey: int32_t
Details |
Members |
INVALID = -1
|
|
RDS_PI = 0
|
RDS PI - int32_t
|
RDS_PS = 1
|
RDS PS - string
|
RDS_PTY = 2
|
RDS PTY - int32_t
|
RBDS_PTY = 3
|
RBDS PTY - int32_t
|
RDS_RT = 4
|
RDS RT - string
|
TITLE = 5
|
Song title - string
|
ARTIST = 6
|
Artist name - string
|
ALBUM = 7
|
Album name - string
|
GENRE = 8
|
Musical genre - string
|
ICON = 9
|
Station icon - raw(int32_t for HAL 1.1 )
|
ART = 10
|
Album art - raw(int32_t for HAL 1.1 )
|
CLOCK = 11
|
Clock - MetaDataClock
|
|
FmBandConfig
struct FmBandConfig {Deemphasis deemphasis; bool stereo; Rds rds; bool ta; bool af; bool ea}
Additional attributes for an FM band configuration
Details |
Members |
deemphasis
|
deemphasis variant
|
stereo
|
stereo supported
|
rds
|
RDS variants supported
|
ta
|
Traffic Announcement supported
|
af
|
Alternate Frequency supported
|
ea
|
Emergency announcements supported
|
|
AmBandConfig
struct AmBandConfig {bool stereo}
Additional attributes for an AM band configuration
BandConfig
struct BandConfig {Band type; bool antennaConnected; uint32_t lowerLimit; uint32_t upperLimit; vec spacings; union Ext ext}
Radio band configuration.Describes a given band supported by the radio module.The HAL can expose only one band per type with the the maximum range supported and all options.The framework will derive the actual regions were this module can operate and expose separate band configurations for applications to chose from.
Details |
Members |
type
|
|
antennaConnected
|
|
lowerLimit
|
|
upperLimit
|
|
spacings
|
|
ext
|
|
|
Properties
struct Properties {Class classId; string implementor; string product; string version; string serial; uint32_t numTuners; uint32_t numAudioSources; bool supportsCapture; vec bands}
Exposes properties of a given hardware radio module.NOTE:current framework implementation supports only one audio source(num_audio_sources = 1). The source corresponds to AUDIO_DEVICE_IN_FM_TUNER.If more than one tuner is supported(num_tuners>1), only one can be connected to the audio source.
Details |
Members |
classId
|
Class of this module.E.g AM_FM
|
implementor
|
implementor name
|
product
|
product name
|
version
|
product version
|
serial
|
serial number(for subscription services )
|
numTuners
|
number of tuners controllable independently
|
numAudioSources
|
number of audio sources driven simultaneously
|
supportsCapture
|
the hardware supports capture of audio source from audio HAL
|
bands
|
band descriptors
|
|
MetaDataClock
struct MetaDataClock {uint64_t utcSecondsSinceEpoch; int32_t timezoneOffsetInMinutes}
Details |
Members |
utcSecondsSinceEpoch
|
Seconds since epoch at GMT + 0.
|
timezoneOffsetInMinutes
|
Minutes offset from the GMT.
|
|
MetaData
struct MetaData {MetadataType type; MetadataKey key; int32_t intValue; MetaDataClock clockValue; string stringValue; vec rawValue}
Details |
Members |
type
|
|
key
|
|
intValue
|
Value used for type MetadataType.INT
|
clockValue
|
Value used for type MetadataType.CLOCK
|
stringValue
|
Value used for type MetadataType.TEXT
|
rawValue
|
Value used for type MetadataType.RAW
|
|
ProgramInfo
struct ProgramInfo {uint32_t channel; uint32_t subChannel; bool tuned; bool stereo; bool digital; uint32_t signalStrength; vec metadata}
Radio program information.Returned by the HAL with event RADIO_EVENT_TUNED.Contains information on currently tuned channel.
Details |
Members |
channel
|
current channel .(e.g kHz for band type AM_FM )
|
subChannel
|
current sub channel .(FM_HD )
|
tuned
|
Tuned to a program(not a noise). It's the same condition that would stop scan operation.
|
stereo
|
program is stereo or not
|
digital
|
digital program or not(e.g HD Radio program )
|
signalStrength
|
Signal quality measured in 0% to 100% range.
Despite the name, this is not a signal strength.The purpose of this field is primarily informative.
|
metadata
|
Metadata:PTY, song title etc.
|
|