Package: android.hardware.broadcastradio@1.0

types

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

Details
Members
UP
DOWN

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)This data must be transparent to the android framework
CLOCK = 3
clock data, see MetaDataClock

MetadataKey

enum MetadataKey: int32_t
Details
Members
INVALID = -1
RDS_PI = 0
RDS PI - string
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
ART = 10
Album art - raw
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

Details
Members
stereo
Stereo supported

BandConfig

struct BandConfig {Band type; bool antennaConnected; uint32_t lowerLimit; uint32_t upperLimit; vec spacings; union Ext ext}
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}
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 or not
stereo
program is stereo or not
digital
digital program or not(e.g HD Radio program )
signalStrength
signal strength from 0 to 100
metadata
non empty if meta data are present(e.g PTY, song title...)