自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

air_snake的专栏

Linux嵌入式开发(C,C++)

  • 博客(43)
  • 资源 (1)
  • 收藏
  • 关注

原创 使用embedded ubuntu构建嵌入式文件系统

最近开发了很多基于Freescale的imx6的系统,其中一个问题就是如何找到一个合适的,易用的嵌入式文件系统。当然,我们可以用很多的工具来生成定制话的文件系统,但是在调试开发的时候,每次重新定制,选配文件系统也是一个颇为耗费时间的工作。下面我会将我使用embedded ubuntu 的过程记录下来,方便以后工作。闲话不多说,首先要下载最小文件系统安装首先提示我需要安装一定环境,我

2013-03-21 15:15:12 1535

原创 Linux ALSA 驱动及其应用心得汇总

首先,主要参看的网上的资料就是ALSA的官方主页以及一些博客。1.驱动部分Linux ALSA声卡驱动之一:ALSA架构简介Linux ALSA声卡驱动之二:声卡的创建Linux ALSA声卡驱动之三:PCM设备的创建Linux ALSA声卡驱动之四:Control设备的创建Linux ALSA声卡驱动之五:移动设备中的ALSA(ASoC)Lin

2013-03-03 20:08:35 1010

原创 Macbook 开发环境搭建

当前系统为MAC OS 10.7.51. 在App store中安装xcode, 安装好xcode之后,还要在xcode中安装command line tool。不然用brew有很多软件安装有问题。2. 安装Homebrew  一个homebrew的简单入门Homebrew将本地的/usr/local初始化为git的工作树,并将目录所有者变更为当前所操作的用户,以后的操

2013-02-28 14:05:21 1475

转载 DAPM之五:dapm机制深入分析(下)

dapm触发时的入口函数是dapm_power_widgets,稍后详细分析这个函数,这里仅说其作用:检查每个dapm widget,如果该widget处在一条complete paths中,则power up这个widget,否则power down。dapm触发1、dapm widgets建立时,详见snd_soc_dapm_new_widgets;2、上层通过

2013-02-26 21:42:34 724

转载 DAPM之四:dapm机制深入分析(上)

哲学里有三个终极命题:你是谁?从何处来?到何处去?而对于dapm机制,我们可以这样提问:dapm是什么,起到何作用?dapm是如何建立的?dapm又是如何触发的?下面会就这三个问题进行分析。首先是dapm是什么?这在DAPM之一:概述中提及了,就是音频电源动态管理。相信电源管理大家都不会陌生。dapm设计的目的就是只有需要时才打开必要的部件(widget),不需要时则关闭部件,达到省电的目

2013-02-26 21:41:58 1159

转载 DAPM之三:audio paths与asound.conf

其实asound.conf真跟dapm没多大关系,之所以把它也纳入dapm系列之一,是为了考虑到知识的连贯性。在DAPM之二:AUDIO PATHS与dapm kcontrol>提到:通过配置好asound.conf,上层则可打开asound.conf中定义的虚拟设备,而自动选择相应的音频通道。这是asound.conf很重要的一个作用,从这方面来说,并不是跟dapm完全没关系。

2013-02-26 21:41:14 488

转载 DAPM之一概述

DAPM--Dynamic Audio Power Management,对应结构体是snd_soc_dapm_widget和snd_soc_dapm_route,对应的操作函数是snd_soc_dapm_new_controls()、snd_soc_dapm_add_routes()和snd_soc_dapm_new_widgets()。在我看来,DAPM是音频驱动初接触者的噩梦。从何处来,到何

2013-02-26 21:40:36 524

转载 DAPM之二:audio paths与dapm kcontrol

在用alsa_amixer controls时,除了我们之前提到的snd_soc_add_controls添加的kcontrols外,还有一些多出来的controls。其实多出来的那些都是属于dapm kcontrol,主要用于切换音频路径。 一、AUDIO PATHS OVERVIEW以标准内核2.6.32的wm8900 codec

2013-02-26 21:40:07 508

转载 Linux ALSA声卡驱动之八:ASoC架构中的Platform

1.  Platform驱动在ASoC中的作用前面几章内容已经说过,ASoC被分为Machine,Platform和Codec三大部件,Platform驱动的主要作用是完成音频数据的管理,最终通过CPU的数字音频接口(DAI)把音频数据传送给Codec进行处理,最终由Codec输出驱动耳机或者是喇叭的音信信号。在具体实现上,ASoC有把Platform驱动分为两个部分:snd_soc_pl

2013-02-26 21:39:07 446

转载 Linux ALSA声卡驱动之七:ASoC架构中的Codec

1.  Codec简介在移动设备中,Codec的作用可以归结为4种,分别是:对PCM等信号进行D/A转换,把数字的音频信号转换为模拟信号对Mic、Linein或者其他输入源的模拟信号进行A/D转换,把模拟的声音信号转变CPU能够处理的数字信号对音频通路进行控制,比如播放音乐,收听调频收音机,又或者接听电话时,音频信号在codec内的流通路线是不一样的对音频信号做出相应的处理

2013-02-26 21:38:26 485

转载 Linux ALSA声卡驱动之六:ASoC架构中的Machine

前面一节的内容我们提到,ASoC被分为Machine、Platform和Codec三大部分,其中的Machine驱动负责Platform和Codec之间的耦合以及部分和设备或板子特定的代码,再次引用上一节的内容:Machine驱动负责处理机器特有的一些控件和音频事件(例如,当播放音频时,需要先行打开一个放大器);单独的Platform和Codec驱动是不能工作的,它必须由Machine驱动把它们结

2013-02-26 21:37:47 477

转载 Linux ALSA声卡驱动之五:移动设备中的ALSA(ASoC)

1.  ASoC的由来ASoC--ALSA System on Chip ,是建立在标准ALSA驱动层上,为了更好地支持嵌入式处理器和移动设备中的音频Codec的一套软件体系。在ASoc出现之前,内核对于SoC中的音频已经有部分的支持,不过会有一些局限性:   Codec驱动与SoC CPU的底层耦合过于紧密,这种不理想会导致代码的重复,例如,仅是wm8731的驱动,当时Lin

2013-02-26 21:36:55 377

转载 Linux ALSA声卡驱动之四:Control设备的创建

Control接口Control接口主要让用户空间的应用程序(alsa-lib)可以访问和控制音频codec芯片中的多路开关,滑动控件等。对于Mixer(混音)来说,Control接口显得尤为重要,从ALSA 0.9.x版本开始,所有的mixer工作都是通过control接口的API来实现的。 ALSA已经为AC97定义了完整的控制接口模型,如果你的Codec芯片只

2013-02-26 21:36:18 398

转载 Linux ALSA声卡驱动之三:PCM设备的创建

1. PCM是什么PCM是英文Pulse-code modulation的缩写,中文译名是脉冲编码调制。我们知道在现实生活中,人耳听到的声音是模拟信号,PCM就是要把声音从模拟转换成数字信号的一种技术,他的原理简单地说就是利用一个固定的频率对模拟信号进行采样,采样后的信号在波形上看就像一串连续的幅值不一的脉冲,把这些脉冲的幅值按一定的精度进行量化,这些量化后的数值被连续地输出、传输、处

2013-02-26 21:31:12 443

转载 Linux ALSA声卡驱动之二:声卡的创建

1. struct snd_card 1.1. snd_card是什么snd_card可以说是整个ALSA音频驱动最顶层的一个结构,整个声卡的软件逻辑结构开始于该结构,几乎所有与声音相关的逻辑设备都是在snd_card的管理之下,声卡驱动的第一个动作通常就是创建一个snd_card结构体。正因为如此,本节中,我们也从 struct cnd_card开始吧。

2013-02-26 21:27:11 468

转载 Linux ALSA声卡驱动之一:ALSA架构简介

一.  概述    ALSA是Advanced Linux Sound Architecture 的缩写,目前已经成为了linux的主流音频体系结构,想了解更多的关于ALSA的这一开源项目的信息和知识,请查看以下网址:http://www.alsa-project.org/。    在内核设备驱动层,ALSA提供了alsa-driver,同时在应用层,ALSA为我们提供了alsa-

2013-02-26 21:25:13 474

原创 uBuntu下emacs配置及其嵌入式环境搭建

这是我在github上所存储的配置及其uBuntu环境的搭建。git://github.com/sheepjxx/emacs_config.gitEmacs configuration on LinuxInstall GuidThis guide is only for uBuntu 12.04 version, haven't been test on oth

2013-02-26 20:59:48 1514

原创 embedded system network setup

Setting up the bridge Linux won't let you bridge a wireless interface in managed mode at all unless you enable 4addr:iw dev wlan0 set 4addr onEnable routing by modifying the ip_forward /pr

2013-02-26 13:41:44 469

原创 How to avoid "sudo minicom"

sudo adduser MyUser dialoutsudo chmod a+rw /dev/ttyUSB0

2013-02-26 13:17:13 347

转载 NFS挂载问题汇总

The rpcbind failure Error.The following example shows the message that appears on the client system during the boot process or in response to an explicit mount request:nfs mount: server1:: RPC:

2012-03-20 13:05:09 845

原创 Using OpenWRT on TP-Link WR841N-V7.2 router

1.      Visit the OpenWRT website https://openwrt.org/, find the supportinghardware tables. According to your router, select the corresponding link.2.       Followthe instruction below. Be careful,

2012-02-19 17:37:24 1809

原创 单链表的反序

<br />node* reverse(node *head){if(head == NULL || head->next == NULL){return head;}node *cur = head;node *pre = NULL;node *tmp;while(cur->next){tmp = pre;pre = cur;cur = cur->next;pre->next = tmp; //操作pre的next逆转}cur->next =

2010-09-21 10:02:00 754

原创 Google 面试准备

Second round interview preparation

2010-07-31 00:06:00 712

原创 Linux循环缓冲实现

内核中有很好的循环缓冲的实现 在kernel/kfifo.c中,以及include/linux/kfifo.h中。我们可以根据内核的代码,改为用户态的程序,实现如下。fifo.h文件如下#ifndef _LINUX_FIFO_H #define _LINUX_FIFO_H #include "pthread.h" #define __u32 unsigned long #define __

2008-09-10 16:53:00 1497

转载 cli()/sti()移除指南

cli()/sti()移除指南UniProcessor:UP 单处理器MultiProcessor:MP 多处理器#### cli()/sti() removal guide, started by Ingo Molnar [email protected] [原文:linux-2.6.22/Documentation/cli-sti-removal.txt]CN Translated

2008-08-07 14:08:00 1575

原创 sys_open分析,从文件名找到文件信息(namei)

从文件名找到文件信息(namei) 本文档的Copyleft归yfydz所有,使用GPL发布,可以自由拷贝,转载,转载时请保持文档的完整性,严禁用于任何商业用途。msn: [email protected]来源:http://yfydz.cublog.cn1. 前言inode是类Unix系统的文件系统的基本索引方法,每个文件都对应一个inode,再通过inode找到文件

2008-07-22 14:48:00 6449 2

原创 IT人士群聚喝酒的讲究『转』

大家喝的是啤酒,这时你入座了…… 你给自己倒了杯可乐,这叫低配置。 你给自已倒了杯啤酒,这叫标准配置。 你给自己倒了杯茶水,这茶的颜色还跟啤酒一样,这叫木马。 你给自己倒了杯可乐,还滴了几滴醋,不仅颜色跟啤酒一样,而且不冒热气还有泡泡,这叫超级木马。 你的同事给你倒了杯白酒,这叫推荐配置。 人到齐了,酒席开始了。 你先一个人喝了一小口,这叫单元测试。 你跟旁边的人说哥们咱们随意,这叫交叉测试。 但

2008-07-17 00:44:00 826 3

转载 FC9安装vm-tools最终方案

转载:http://blog.csdn.net/chinazcw/archive/2008/06/25/2587103.aspx 1、打开菜单“VM -> Install VMware Tools”,然后有光盘自动弹出,把里面的源代码拷贝出来。我的文件是vmwareTools-6.0.4-93057.tar.gz ,我把它拷贝到/opt里。2 、安装 VMware TOOLS   

2008-07-04 17:49:00 2624 4

转载 使用VIM开发软件项目 - (5) 使用tag文件和taglist插件 (二)

 新一篇: 在CSDN的文章中插入图片function StorePage(){d=document;t=d.selection?(d.selection.type!=None?d.selection.createRange().text:):(d.getSelection?d.getSelection():);void(keyit=window.open(http://ww

2008-05-13 13:57:00 748

转载 44b0引导注释

 转自http://www.dzkf.cn/html/qianrushixitong/2006/0725/64.html  *******************************************************; * NAME : 44BINIT.S *; * Version : 10.JAn.2003 *; * Description: *; * C star

2008-03-10 11:32:00 600

原创 arm9200开发文档

2007.8.13u-boot1.1.6初步调试成功。1.在网上找了几个u-boot的移植文档,之前一直没有成功,后来,设置好u-boot的程序运行地址后,make clean && make at91rm9200dk_config && make ,生成u-boot.bin文件。2.在调试好arm9200的仿真器后,选择File->Load memory from file ,选择u

2008-02-27 15:48:00 2957

原创 Linux2.6内核驱动hello.c

 hello.c代码/**//**************************************************/#include linux/init.h>#include linux/module.h>MODULE_LICENSE("Dual BSD/GPL");static char *whom="world";static int howmany = 1 ;mod

2007-05-23 23:26:00 939

原创 Linux内存泄漏检测

valgrind --leak-check=yes -v ./checker

2007-05-23 22:44:00 1163

原创 Linux获取进程ID

#include stdio.h> #include unistd.h>  int main ( ) ...{  printf ("The process ID is %d ", (int) getpid ()) ; //本进程  printf ("The parent process ID is %d ", (int) getppid ()) ; //父进程  return 0 ; } 

2007-05-23 22:42:00 14196 1

原创 Linux下如何动态加载,卸载库

1)程序中include # 2)调用dlopen ("libtest.so", RTLD_LAZY);3)编译的时候加–ldl例如:void* handle = dlopen ("libtest.so", RTLD_LAZY); void (*test)() = dlsym (handle, "my_function"); (*test)(); dlclose (ha

2007-05-23 22:40:00 4720

原创 Linux下使用math函数库注意

由于math的函数不再libc中,所以编译的时候要加上-lm选项 

2007-05-23 22:39:00 1292

原创 Archives的生成

ar cr libtest.a test1.o test2.o可以通过-ltest进行调用,如gcc -o app app.o -L. –ltest 

2007-05-23 22:38:00 619

原创 如何编译动态库

 比如说通过以下的方法:gcc -c -fPIC test1.c                                     //PIC stands for position-independent code.gcc -c -fPIC test2.c调用方法:gcc -shared -fPIC -o libtest.so test1.o test2.o 

2007-05-23 22:32:00 730

原创 如何使用multiICE烧写Bootload

         1)启动multi-ice server       2) AXD Debugger 启动       3)stop 程序       4)ob c:/44b0.cfg       5) File->Load image,加载memory2flash程序,44b0的mem2flash的image       6)找到Bios BIN文件fs44b0bios

2007-05-23 22:30:00 1190

原创 如何在uClinux上添加用户程序

        1)修改user下的Makefile文件       2)修改config下的Confiure.help文件       3)修改config 下的config.in文件       4)make Menuconfig添加用户程序 

2007-05-23 22:29:00 806 2

Programming Python 3rd

OReilly python book. 最新的python教材,由OReilly出版 Already the industry standard for Python users, Programming Python from O'Reilly just got even better. This third edition has been updated to reflect current best practices and the abundance of changes introduced by the latest version of the language, Python 2.5. Whether you're a novice or an advanced practitioner, you'll find this refreshed book more than lives up to its reputation. Programming Python, Third Edition teaches you the right way to code. It explains Python language syntax and programming techniques in a clear and concise manner, with numerous examples that illustrate both correct usage and common idioms. By reading this comprehensive guide, you'll learn how to apply Python in real-world problem domains such as: GUI programming Internet scripting Parallel processing Database management Networked applications Programming Python, Third Edition covers each of these target domains gradually, beginning with in-depth discussions of core concepts and then progressing toward complete programs. Large examples do appear, but only after you've learned enough to understand their techniques and code. Along the way, you'll also learn how to use the Python language in realistically scaled programs--concepts such as Object Oriented Programming (OOP) and code reuse are recurring side themes throughout this text. If you're interested in Python programming, then this O'Reilly classic needs to be within arm's reach. The wealth of practical advice, snippets of code and patterns of program design can all be put into use on a daily basis--making your life easier and more productive. Reviews of the second edition: "...about as comprehensive as any book can be." --Dr. Dobb's Journal "If the language had manuals, they would undoubtedly be the texts from O'Reilly...'Learning Python' and 'Programming Python' are definitive treatments." --SD Times

2009-04-01

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除