Statement: the content of this blog is composedHttp://blog.csdn.net/droidphoneOriginal, reprinted please indicate the source, thank you! 1. struct snd_card
1.1. What is snd_card?
Snd_card is a top-level structure of the entire ALSA audio driver. The software logical structure of the Sound Card begins with this structure. Almost all audio-related logical devices are under the management of snd_card, the first action of the sound card
Android from hardware to application: Step by Step 2 -- run the C program to test the hardware driver
Compile a C program to quickly test the hardware driver:
Create the driver_test folder in the external Folder under the root directory of the Android source code:
Cd external
Mkdir driver_test
Cd driver_test
Create Android. mk:
LOCAL_PATH := $(call my-dir)includ
as hardware raid, and features are not as good as hardware raid.
Next we will introduce various RAID technologies
I. RAID 0
The band technology is used to write data in parallel on multiple disks in bytes or bits (the starting offset of each disk is the same, and the subsequent segments of a certain number of bytes, i/O read/write performance can be improved, but it does not have data redundancy like raid1. Once the hard disk fails, it will be done.
Chapter 2 character Device Driver
Some important data structures and reference relationships:
Step 1: dynamically allocate major device numbers
Int register_chrdev_region (dev_t first, unsigned int count, char * Name );
Int alloc_chrdev_region (dev_t * Dev, unsigned int firstminor, unsigned int count, char * Name); // Dynamic Allocation
Void unregister_chrdev_region (dev_t first, unsigned int
K9f1208
Secotr size = 512 byte, block_pre_sector = 32 sector, block size = 512*32 = 16 K, device = 4096 block = 64 m
K9f1g08
Secotr size = 2 K, block_pre_sector = 64 sector, block size = 2*64 = 128 K, device = 1024 block = 128 m
The above is my previous understanding of the nandflash structure, which ignores a very important part, that is, the area where NAND is used to save other information. This informat
Analysis on the process of mounting the kernel driver layer to android4.0 USB (I)
1. supported_functions
static struct android_usb_function *supported_functions[] = {rmnet_smd_function,rmnet_sdio_function,rmnet_smd_sdio_function,rmnet_function,diag_function,serial_function,adb_function,ccid_function,//acm_function,mtp_function,ptp_function,rndis_function,mass_storage_function,accessory_function,NULL};
Since it is the analysis of the USB Mount process
Write a C program to quickly test the hardware driver:Create the Driver_test folder in the external folder under the Android source root directory:CD Externalmkdir driver_testCD Driver_testCreate Android.mk:Local_path: = $ (call My-dir) include $ (clear_vars) Local_module_tags: = Optionallocal_module: = driver_testlocal_src_ FILES: = Driver_test.cinclude $ (build_executable)Create driver_test.c:#include Back to Android source root: Make Driver_testYou may initially be prompted with an error:Host
Introduction to wm8960 for debugging the sound card driver in android 2. androidwm8960
3. Introduction to LINPUT input channels
The main configuration of LINPUT is as follows:
Set bit8 (LMN1) of R32 to 1: LINPUT1 connects to PGA;
Set bit7 (LINMUTE) of R00 to 0: Disable mute;
Set bit5 (AINL) of R25 to 1: PGA enabling;
Bit5 (LMIC) of R47 is set to 1: Left Boost Mi
Cs8900_probe function itself is not difficult, but you must understand the important functions of probe function. Because you are likely to write a probe function for your device.
First, let's look at a line that is easy to understand.Code:Printk (version_string "/N ");Obviously, the information displayed during kernel startup is printed out in this sentence.
Dev_addr in net_device is the MAC address of the NIC. You should provide:
# If defined (config_arch_smdk2410)Dev-> dev_addr [
, Exact_match, Exact_lock, p), if (error) return Error;kobject_get (p->kobj.parent); return 0;} The parameter p is the struct Cdev pointer of the device, Dev is the first device number, and count is the number of successive secondary device numbers. The function describes the addition of the device by adding the pointer p to the system to make the device effective immediately. If the add fails, the error code for the negative number is returned.The la
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.