Friday, July 22, 2011

Video/Audio Cards

Graphics (Video) Card


Top of the Graphics and Sound Card Advice page
A graphics card (also called a video card or video adapter) is an expansion card that processes instructions sent by the CPU via a dedicated graphics processor. It acts like a small motherboard specifically dedicated to display. People who use their computers primarily for office work require only basic performance, but for serious graphics, video editing or gaming, a good graphics card becomes an important consideration. Some graphics cards also have TV-out, S-Video and video capture connections, although these may not be included as standard. Many graphics cards have the ability to output to two displays simultaneously.

IGP:Some computer manufacturers offer IGP (Integrated Graphics Platform) systems where graphics capabilities are built into the main system motherboard so that a separate, stand-alone graphics card is not necessary. While perfectly adequate for basic computing tasks, current IGP systems are not powerful enough for advanced uses and will not be able to handle today's 3D games.

Graphics Processor: Most graphics cards are based on either the Nvidia GeForce or ATi Radeon family. The technology is licensed to third party manufacturers such as Asus, Creative, Sapphire etc. New generations of GeForce and Radeon cards appear roughly every six months. The latest top-of-the range card is likely to cost around £300-£400. Mid-range cards are available at around £100-£200. These are capable of playing games well and are a good solution for the majority of PCs. Bottom of the range cards cost around £50. These will be fine for most PC tasks, but will perform poorly in graphics-intensive work.

Interface: The interface is the slot, or bus, required in your PC to run the card. There are two main types: AGP, and PCI Express (sometimes written as PCI-E or PCIe).

AGP is the older standard which is now becoming obsolete. However, it is still supported by some manufacturers and there is a strong second-hand market for AGP cards.

The current standard is PCI Express, which is much more powerful than an AGP card. Additional numbers relate to the throughput data that the card can handle, e.g. 4X, 8X or 16x. An AGP 2X card equates to 533MBps (megabytes per second), while 4X is 1.07GBps (gigabytes per second). AGP 8X is the current standard. If you are installing a new card, you will need to ensure that your motherboard supports throughput at that speed, or else the card's full potential will be wasted.

The old PCI slot is now obsolete and a PCI-based graphics card is likely to be found only in older computers. However, this type of card is still adequate for basic office tasks.

Memory : Graphics cards use their own dedicated memory. As with system RAM, the more memory the card has, the better the performance will be. A card with 64MB is adequate for basic office tasks, but at least 256MB is required for the latest games and video applications. Graphics card memory cannot usually be upgraded later.

IGP systems, with graphics chips integrated on the motherboard (see above), often use a portion of system RAM to display graphics, which may reduce the computer's overall performance.

Clock Speed : Manufacturers often quote megahertz (MHz) numbers. There are usually three clock speeds quoted: the core clock speed, the memory clock speed and the Ramdac clock speed. Core clock speed refers to the internal speed of the graphics processor. Memory speed (or memory clock) refers to the speed of data transfer between the card's onboard memory and the graphics processor. A clock speed of around 500MHz or greater is best for 3D graphics and games.

Ramdac speed refers to the capabilities of the digital-to-analogue converter that provides the graphics output from the card. It doesn't directly affect graphics performance but governs the range of refresh rates the card can support at a particular screen resolution. Ensure that the card you buy can display the resolutions you want to use with at least a 75Hz monitor refresh rate to avoid eye strain from screen flicker.

Overclocking : Running a graphics processor faster than the manufacturer's specified speed is popular among PC tweakers and dedicated gamers. Although this carries risks such as overheating, it can be a viable way to gain extra performance from a card when done within safety limits specified by the manufacturer. Some manufacturers sell cards that have already been overclocked, others bundle overclocking software with cards. Be sure to read the manufacturer's recommendations and instructions before overclocking.

Drivers and software : The latest driver can make a big difference to a card's performance. Visit the manufacturer's website regularly to check for updates. Other software bundled with graphics cards can include games that show off the card's performance, DVD players and graphical demos. These deals vary greatly, so check out the bundle that suits you best.

Power Supply Unit : A high-end graphics card requires a strong power supply unit (PSU) in a PC in order to function properly. It may also need a direct connection to the PSU if the graphics card cannot draw enough power from the motherboard alone. Without it, the card will simply not run.

Power demands should be researched in advance of upgrading to a more powerful graphics card. Find out from your retailer of choice just how much power your card will need, and whether it will need an extra connector. If so, what type? Make sure that your existing PSU can support it, otherwise you may have to budget for a new power supply unit as well.

Sound Cards



Most PCs come with some form of sound capability built-in on the motherboard. However, there are advantages to upgrading to a dedicated soundcard. As well as achieving better sound quality, a dedicated soundcard can boost your PC's overall performance because it deals separately with sound, thus saving system resources.

All entry-level soundcards support 16-bit quality sound which is recorded or played back at 44.1 KHz. This is CD-quality sound and is adequate for making and playing CDs and MP3s, and for reproducing most surround sound formats on DVDs and games.

Games enthusiasts may want 3D sound support. DirectSound 3D allows sounds to pan around the speakers; Sensaura, Aureal and EAX technologies are even more convincing for games compatible with these systems.

If you intend to create your own music on your PC, you will want 24-bit sound with sampling rates of 48KHz or 96KHz. A 24-bit card will also support the newer sound formats for DVD movies, such as THX surround or Dolby Digital EX 7.1.

Entry level 16-bit soundcards can cost as little at £15, but cards by the bigger manufacturers such as Creative or Terratec start at around £25. Soundcards are usually installed in an internal PCI slot, but external USB cards are becoming popular, particularly for notebook computers. Currently, external cards are more expensive than internal cards at around £35 for an entry-level card and £60-80 for a 24-bit USB card.

Standard connectivity options should include microphone in, line in/line out for front and rear speakers, midi/joystick port, CD-in and headphone connectors. The latest cards may also feature high-speed FireWire ports for connecting digital camcorders and advanced audio options.

Monday, July 18, 2011

Dealing with Kernel Failure

The below mentioned text is from a Book : Building Embedded Linux System by Karim Yaghmour.I have copied this for self-reference.

The Linux kernel is a very stable and mature piece of software. This, however, does not mean that it or the hardware it relies on never fail. Linux Device Drivers covers issues such as oops messages and system hangs. In addition to keeping these issues in mind during your design, you should think about the most common form of kernel failure known as kernel panic.When a fatal error occurs and is caught by the kernel, it will stop all processing and emit a kernel panic message.

There are many reasons a kernel panic can occur. One of the most frequent is when you forget to specify to the kernel the location of its root file system. In that case, the kernel will boot normally and will panic upon trying to mount its root file system.

The only means of recovery in case of a kernel panic is a complete system reboot.For this reason,the kernel accepts a boot parameter that indicates the number of seconds it should wait after a kernel panic to reboot. If you would like the kernel to reboot one second after a kernel panic, for instance, you would pass the following sequence as part of the kernel's boot parameters: panic=1.

The code for the kernel's panic function, panic(), is in the kernel/panic.c file in the kernel's sources.The first observation to be made is that the panic function's default output goes to the console.However, If your system do not even have a terminal, you may want to modify this function according to your particular hardware. An alternative to the terminal, for example, would be to write the actual error string in a special section of flash memory that is specifically set aside for this purpose. At the next reboot, you would be able to retrieve the text information from that flash section and attempt to solve the problem.



Read Memory : Android inside OMAP


The following Code is used for reading memory map in android, after cross-compilation, the exe should be pushed to the target and executed for reading any memory map registers in the system.

include stdio.h
include stdlib.h
include sys/mman.h
include fcntl.h

#define MEM_SIZE 4096
#define MEM_MASK (MEM_SIZE - 1)
#define MEMORY "/dev/mem"

void memaccess(unsigned int reg_addr, unsigned int *reg_val)
{
int fd;
void *mem_map, *mem_addr;

fd = open(MEMORY, O_RDWR|O_SYNC);
if(fd < 0) {
perror(MEMORY);
exit(1);
}

mem_map = mmap(0, MEM_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, reg_addr & ~MEM_MASK);

if(mem_map == (void*) - 1) {
perror("mmap()");
exit(1);
}

mem_addr = mem_map + (reg_addr & MEM_MASK);

if (reg_val)
*(unsigned int*)mem_addr = *reg_val;
else
printf("0x%08X\n", *(unsigned int*)mem_addr);
}


int main(int argc, char *argv[])
{

unsigned int reg_addr, reg_val, *reg_val_ptr;

if (argc < 2) {
fprintf(stderr, "\nUsage:\t%s [value]\n\n\n", argv[0]);
exit(1);
}

reg_addr = strtoul(argv[1], NULL, 0);

if (argc == 3) {
reg_val = strtoul(argv[2], NULL, 0);
reg_val_ptr = &reg_val;
}
else
reg_val_ptr = NULL;

memaccess(reg_addr, reg_val_ptr);
return 0;
}

Sunday, July 17, 2011

Steps for Building Android for OMAP4430

Lets try to build Android....


I have shown all commands to build from x-loader till Android File system below.However the below mentioned steps are exclusively for OMAP4430 platform, hence changes should be made for building the same for other targets as necessary.
The below text only shows the commands for building Android in Linux Platform only.

Please visit http://omappedia.org/wiki/Android_Getting_Started#Building_kernel for more details.

0) Download cross-compiler from Internet for your corresponding Target like ARM or any other and copy the directory in opt folder of Linux file system(in your PC) and export the path of the compiler.

1. X-Loader:
a)Downloading code:
git clone git://git.omapzoom.org/repo/x-loader.git
git checkout --tract -b omap4_dev origin/omap4_dev

b)Build Commands:
make distclean
make CROSS_COMPILE=arm-none-linux-gnueabi- omap4430sdp_config
make CROSS_COMPILE=arm-none-linux-gnueabi- ift

c)output: x-load.bin

d)Signing:
./generate_MLO OMAP4430 ESx.x x-load.bin


2.U-Boot*
a)Downloading code:
git clone git://git.omapzoom.org/repo/u-boot.git
git checkout -b xx remotes/origin/omap4_dev

b)Build:
make distclean
make CROSS_COMPILE=arm-none-linux-gnueabi- omap4430sdp_config
make CROSS_COMPILE=arm-none-linux-gnueabi-


3.Linux Kernel*
a)Downloading:
git clone git://git.omapzoom.org/kernel/omap.git
git checkout -b xx remotes/origin/p-android-omap-2.6.35

b)Build:
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
make android_4430_defconfig
make -j4 uImage

4.Android Filesystem
a)Downloading:
repo init -u git://git.omapzoom.org/platform/omapmanifest.git -b gingerbread
repo sync
mkdir manifest
cd manifest
git clone git://git.omapzoom.org/platform/omapmanifest.git
cd omapmanifest
git checkout -b gb remotes/origin/gingerbread
export MANIFEST=`pwd`
cd ../../
repo init -u $MANIFEST
repo sync

//Use the Maninfest and checkout a proper branch :

cd manifest/omapmanifest
git checkout -b gb remotes/origin/gingerbread
git pull
export MANIFEST=`pwd`
cd ../../
repo init -u $MANIFEST
repo sync

b)Build:
make clean
cp -Rfp device/ti/blaze/buildspec.mk.default buildspec.mk
make -j4

Carefree Git

Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.Branching and merging are fast and easy to do

Create a folder named Git_test.

Command : Cd git_test // go into that folder

Command : git init // initialise the git for this particular folder

Command:git clone git://git.omapzoom.org/kernel/omap.git android-2.6.35 //for getting the kernel source

or //Create a file : gvim one.c // it will create one file one.

command : git add one.c // It will add this file to a git server(local)

Command : git diff // this will give you the difference of what is not commited

Command : git commit -a // This will create a new page, in that give the commit message then save and close that page.

Command : git log // this will gives the message logs of all commit ID's

Command : git show // this will shows the lines whatever changed during the commit

Command : git format-patch -1 // It will create the patch.

Command: git format-patch -1 changeid //it will create the patch for the changeid.

Command : git am patchname.patch // this is to apply the patches on folder.

Command : git branch -a //to see all branch an select any one branch for checkout.

Command : git checkout -b branchname actualbranch //to create a separate branch.

Command : git checkout branchname //to get into existing branch

Command : git push ssh://x0151836@omap:29418/kernel/omap HEAD:refs/for/p-android-omap-2.6.35 //for code submit