Wiley.Symbian.OS.Internals.Real.time.Kernel.Programming.Dec.2005.eBook-DDU (779891), страница 12
Текст из файла (страница 12)
The job of the display is to turn pixels in the frame buffer intoimages we can see.38HARDWARE FOR SYMBIAN OSDisplays in Symbian phones come in common sizes dictated by theuser interface software layers, since the latter are graphically optimizedto the screen size. The most common resolutions are 176 × 208 pixels asused in Series 60 phones and 240 × 320 pixels for UiQ.The frame buffer is an area of contiguous physical memory, largeenough to contain an array of pixels with the same dimension asthe display.The base port reserves memory for the frame buffer during initialization,and ensures the MMU maps it with write-through caching.
A frame bufferfor 16-bpp QVGA display will require 150 KB (320 × 240 × 2) of RAM.Pixels have common formats depending on their storage containers.Most current mobile phones use 16 bits per pixel (bpp) in 565 format,where the top 5 bits are red, the middle 6 bits are green, and the bottom5 bits are blue – giving 65,535 (216 ) unique colors:15 → 1110 → 54→0REDGREENBLUEPhones with genuine 18-bpp displays are starting to be common,they display 262,144 colors. Symbian OS does not support 18-bitwords – instead a 24-bpp representation is used inside a 32-bit word.This has an aRGB, 8888 format, where the ‘‘a’’ is empty space or analpha value.
The LCD controller will discard the bottom two bits of eachcolor component byte:31 → 2423 → 1615 → 87→0alphaREDGREENBLUEMobile phone LCDs come in two distinct types, dumb and smart. Adumb display does not contain any control electronics; instead its pixelsare driven directly by the LCD controller in the SoC. On the other hand,a smart display contains its own LCD controller, memory for the framebuffer, and a medium-bandwidth interface back to the SoC.The dumb display controller within an SoC has to output a new copyof the display image around 60 times per second to persist the image onthe LCD.This 60 Hz update requires the controller to continually transfer datafrom memory using DMA as long as the display is switched on. UsingIRAM as a frame buffer can help reduce the power cost and bandwidthoverhead of the display.
As I said earlier, a 16-bit QVGA with a 60 Hzrefresh rate will require 8.78 MB of data every second, and looking to thefuture, a full 32-bit VGA display will require eight times as much data.AUDIO39The interface to a smart display is optimized for two uses: incrementalupdates to the display when small elements change, and full bandwidthoperation when multimedia video or games require it. For the smallupdates, the updated screen region is transferred into the display interfaceusing a smart 2D DMA engine.Smart displays save power by removing the need for full-bandwidthupdates most of the time.
Their internal circuitry is optimized to match thedisplay characteristics exactly. They have additional low-power modesfor idle phones that only want to display the clock. These have partialdisplay refreshing and limited colors.2.9 AudioThe audio sub-system of a Symbian OS phone contains two, mostlyindependent, streams of audio data. One is the telephony voice data andthe other is multimedia data.Two vital phone use cases are to have good quality voice calls andlong talk times. Digital audio buses are dedicated to voice data to ensurethis is the case.The de facto raw hardware audio format used in a Symbian OS phoneis 16-bit pulse code modulated (PCM) data.
The quality ranges from8 kHz mono for telephony audio up to 48 kHz stereo for music playback.PCM audio hardware can be quite simple, requiring little setup toensure the volume and correct output path are selected. Then all thatis needed is to feed data to the hardware at the rate it demands – DMAhardware is very good for this. If data transfer stalls, the audio hardwarewill immediately produce audible pops, clicks and stutters.2.9.1 Telephony audioThe telephony voice data is the essence of a phone call.
It has stringentlatency restrictions placed upon it to ensure that the user has a highquality call without the effects of transatlantic satellite lag. To ensure thisis the case, the system designers have optimized the controlling softwareand hardware paths for low latency response and low power consumptionduring a voice call.The BP contains a DSP that performs the processing for voice bandaudio without passing through Symbian OS. During a call, Symbian OSwill be in a low-power mode, only needing to wake up when the displayneeds updating.A normal call will end up in the analogue audio circuits. They containthe analogue to digital and digital to analogue converters, which in turnare connected to the microphone and speakers.
When using a BlueTooth(BT) headset the PCM data is transported directly into the BT module viaits own dedicated interface.40HARDWARE FOR SYMBIAN OSSymbian OS needs an additional audio path to allow it to inject systemsounds into the ongoing call. These are for such things as message alerts,low battery and a second incoming call. This injection of sounds can bedone by passing the raw audio data over the IPC link to the BP, wherethe DSP will mix it into the audio stream.2.9.2 Multimedia audioMultimedia audio is a general term for every generated sound in thesystem that is not voice data.The main multimedia sounds are:• Ring tones, in many formats• Alerts, for incoming messages• Alarms, from clock and calendar• Video telephony• MP3 playback• Games• Recorded voice, dictaphone• Video capture and playback.The higher levels are all controlled by the Symbian multimedia framework(MMF) for media players, file formats and plug-ins.The Multimedia Device Framework (MDF) will contain the codecs, andit will transfer PCM data to and from the device driver layer, DevSound.Video telephony (VT) is a special case, in which live audio data doespass through Symbian OS.
The audio elements of the call are multiplexedinto the 64-kb/s data stream along with the video. The VT call system hasto de-multiplex the incoming data stream, decode the audio and videoelements, and then play them in sync. This is normally done in dedicatedhardware or a DSP, since it would require all of a 200 MHz ARM CPUjust to run the codecs.The main complexity in the audio systems is the ever-growingnumber of audio sources and sinks, and the possible ways in whichthey can be connected. For example, current phones have multiple headsets, speakers, Bluetooth and FM radios.
This is likely toremain an issue until hardware is capable of mixing and routingevery audio source in all possible combinations. Today some audiouse cases will be incompatible with others, requiring them to interrupteach other.POWER MANAGEMENT412.10 Power managementAll Symbian OS phones are battery powered, and as I have stressedthroughout this chapter, effective power management (PM) is crucial indesigning a successful Symbian OS phone.The overall design goals of the SoC team must be focused on adequateperformance at low power. At every decision point the system’s designersmust ask themselves, ‘‘How will this affect the power consumption?’’‘‘Can I design this in another way that will have the same performancewith lower power?’’ Only by constant attention to power use will a singlebattery charge give hours of talk and play time, and still leave hundredsof hours for standby.The ARM CPUs used in Symbian OS phones are designed as answersto these questions, as they are the best low-power peripheral blocks inuse.
Schemes to reduce power consumption within the SoC includeself-clocking circuits, serial ports that power down when idle andmemory controllers that put RAM into low-power modes wheneverpossible.Most importantly, the SoC should only include hardware capabilitiesthat will be used. Use case analysis and feature justification are a goodway of removing unnecessary power loads at the start of the design.An example of a bad design is an over-specified internal bus with morebandwidth than all of its slave peripherals.I explain the EKA2 power model in Chapter 15, Power Management.This power management architecture is based on the runtime use of sharedpower resources by the peripherals. To closely match this model, the SoCpower architecture needs to be partitioned for clean and orthogonal PM,enabling peripherals to have well-defined power and clock sources thatcan be turned on and off as needed.The designers of CPUs like to invent all sorts of named power modes,for example Turbo, Run, Idle, Doze, Sleep, Deep Sleep and Off.
The morepower-saving the mode is, the more work is required to get into or outof the state. For example, a Deep Sleep state is likely to require flushingall the state out of the caches, and turning off the core, and waking fromDeep Sleep will initially look like a boot to the CPU.Almost all of these modes will map onto the Symbian OS idle mode,where the system is powered but doing nothing. Symbian OS tends tospend most of its time in idle mode, even going into it between presseson a phone keypad.