亚洲免费av电影一区二区三区,日韩爱爱视频,51精品视频一区二区三区,91视频爱爱,日韩欧美在线播放视频,中文字幕少妇AV,亚洲电影中文字幕,久久久久亚洲av成人网址,久久综合视频网站,国产在线不卡免费播放

        ?

        Design of a Linux Audio Driver Based on the SEP6200*

        2014-02-28 17:36:54YANGLiyuanWANGPengWUXiaofeiLINGMing
        電子器件 2014年2期
        關(guān)鍵詞:方法學(xué)嵌入式碩士

        YANG Liyuan ,WANG Peng,WU Xiaofei,LING Ming

        (National Engineering Research Center for ASIC,Southeast University,Nanjing 210096,China)

        Now,various electronic products based on embedded technologies,including MP3,MP4,Smart Phones,Tablet PCs etc,have been widely used in our daily life.Domestic CPU core based on electronic products is still in their infancy,so the autonomous SOC(System On Chip)SEP6200 based the CPU of unicore must promote the development of China-made electronic products.Current traditional audio driver system is mostly designed and developed based on the ARM family CPU cores.Unicore CPU as a domestic self-developed processor core is different from the ARM architecture,so the audio system based on the hardware platform of SEP6200 must be re-designed and developed.The purpose of this paper is to design and implement a linux audio driver system that can run on the platform of SEP6200 and CS3700 steadily.Through porting MPlayer to the platform,both playback and recording can achieve stable results which prove that the system works properly.

        1 Hardware Design

        1.1 SEP6200

        SEP6200[1]is independently developed by National Engineering Research Center for ASIC of Southeast University.SEP6200 uses unicore of Peking University as the kernel.It has a 32 high-performance RISC core,up to 800 MHz,supports floating point unit;has a 16-bit SRAM/NOR Flash interface,supports to boot from Nand;has 16/32-bit DDR2/DDR3 interface;maximum supports 512 MB,800 MHz bit rate;supports MPEG 1/2/4/H.264/Divx/RV/AVS/VC1/VP6/7/8 and other formats;up to 1 920×1 080 resolution;supports color TFT LCD,supports 16,18,24 bit RGB output;integrated HDMI Transmitter,compatible with HDMI 1.3 specification.It has 1-way USB2.0 OTG controller,2-way SDIO interface,3-way SPI interface,4-way UART interface,I2C interface,I2S interface,I2S interfaces,16-way GPIO interface;16-channel DMA,2-channel DMA.It uses digital chips TSMC 65 nm LP process,TFBGA package.

        1.2 Architecture Design

        CS3700 is a low power,high-performance audio decoder chip.It is often used for portable multimedia electronic products.It can provide high quality audio,while eliminating the use of large-capacitor headphones.It not only can perform basic D/A and A/D conversion function,but also audio controlling and digital signal processing functions.It supports I2S[2]bus data format.The audio system hardware framework shown in Fig.1.

        Fig.1 Hardware architecture

        SEP6200 is connected with the audio decoder chip CS3700 via I2C and I2S bus.The principle of playing audio:SEP6200 transmits control signal to the CS3700 through I2C,configuring some register value of CS3700,while the audio signal is transmitted through I2S.CS3700 completes audio signal D/A conversion.The analog signal is played back through a microphone.Recording has used the same principle.It is the inverse process of playback.

        2 Audio Software System

        2.1 ALSA system architecture

        Before ALSA(Advanced Linux Sound Architecture)[3]audio system,OSS(Open Sound System)[4]audio system has been developed for a long time and is very mature.But it is still a commercial product that is not completely open source,and has been largely lost in the Linux mainline updates.ALSA just to make up the deficiencies of OSS.It is a completely open source audio system,compatible with GPL.It is an alternative sound card driver architecture.

        Compared with OSS,ALSA in addition provides a set of kernel driver modules,and also provides a rich interface function library ALSA-lib[5]to simplify the preparation of applications specifically.Compared to the original ioctl-based programming interface provided by OSS,ALSA-lib library is more convenient and more abundant in use.In linux2.6 kernel,ALSA has become the default sound subsystem,used to replace OSS in the linux2.4.

        ALSA’s main features are as follows:

        (1)Supporting all audio interfaces from consumer sound cards to professional sound equipment;

        (2)Modular kernel driver;

        (3)Supporting for symmetric multiprocessing(SMP)and multithreading;

        (4)Providing a rich application development library to simplify application development;

        (5)Supporting OSS API,compatible with OSS applications.

        ALSA system can be roughly divided into the driver package(alsa-driver)and development package(alsa-lib).The alsa-driver[6]is divided into the core layerand the hardware-related underlying hardware layer.Usually,we only need to port the underlying hardware layer.The realization of the core layer can isolate from underlying hardware.It belongs to the ALSA standard framework,and does not require developers to implement their own transplants.Framework is shown in Fig.2.

        Fig.2 ALSA architecture

        2.2 ASOC Driver Design

        The audio system uses ASOC(ALSA System on Chip))framework.ASOC[7]is the development and evolution of ALSA audio system in SOC.So it still belongs to ALSA in essence.But it separates the CPU-related code framework,making ASOC framework for better portability.

        ASOC is mainly composed of three parts:

        (1)Codec driver This section is only concerned about Codec itself,characteristics associated with the CPU platform has nothing to with this part[8];

        (2)Platform driver This part is related to the CPU platform,and has nothing to do with Codec.it mainly deals with two problems:DMA engine and PCM,I2S control integrated in SOC[9];

        (3)Board-level driver(also known as machine driver)This part binds the platform-driver and Codec driver,describing the board-level hardware features specifically[10].

        These three parts are ASOC core layers,they come true by kernel/sound/soc-core.c in the kernel source.In the case of sound card driver based on ASOC framework,ALSA-libs as well as a series of utility are still available.

        2.3 ASOC Driver Registration

        Firstly,it enters by the function of snd_soc_init()in the ASOC driver core layer.Then,it calls the platform driver registration function platform_driver_register().Secondly,it probes the driver by the function of soc_probe().after probed the driver,it register card driver for the core layer[11],achieving by the function of snd_soc_register_card().After registering the core sound card,it begins to detect the hardware in three parts:

        (1)Board-level detection By the function of sep0611_board_probe()to complete,it is responsible for setting the Codec’s gpio,enabling the codec,checking the headphone plug,setting the speaker and headphone;

        (2)I2S detection By the function of sep0611_i2s_probe()to complete,it is responsible for setting i2s,dma initialization,application for dma interruption;

        (3)Codec detection By the function of cs3700_probe()to complete,functions called by it include i2c_add_driver(),cs3700_i2s_probe and cs3700_init().

        Function cs3700_init()mainly completes for three things,function snd_soc_new_pcms()registers the stream of pcm;snd_soc_init_card()registers card,which includes two devices:control device and pcm device;sep0611_cs3700_init()completes cs3700’s hardware initialization.

        An important structural body sep0611_i2s_dai needs detailed explanation.All operations to codec of I2S are with this structure as objects,including the probe,suspend,resume and other operations.It specifies the minimum and maximum number of channels,sample rate and data format when it reads and writes data.

        Contents with“sep0611”is closely related to SOC chip,they are underlying driver that must be implemented by yourself.

        2.4 Process of Writing Data

        Applications write data by calling API function and_pcm_write()in ALSA-lib,then wait the function snd_pcm_wait()to be called by ALSA-lib.After the bottom can be written,it comes into the ALSA-driver underlying driver by calling the poll system,poll signal enters the sleep queue blocking process[12].Interrupt signal of hardware triggers interrupt handler registered in ALSA-driver layer.Interrupt function then calls the related functions in ALSA-driver to determine whether to write data.ALSA-driver needs to do two things at this time:first,call the underly-ing hardware drivers to get the hardware current data size;secondly,determine the size of the idle data area.After completed,if it satisfied the condition,awaken the sleep queue,awaken the poll signals,and finally return to the ALSA-lib.After ALSA-lib signal is received,the data will be written into buffer.

        Data read is controlled by a DMA transfer[13].ALSA-lib map memory applied by hardware to user space through the mechanism of mmap.After the application write data to a memory space,hardware is able to read the data directly.When there is data in map memory,DMA performs related actions,transmitting data to codec.Codec begins to play a sound decoding after reading data.These are the details writing and playing the audio on the layer of a user process.Reading and recording process is similar,just the API functions called by applications are different.

        3 Conclusion

        After experimental tests,in linux2.6.32 system,using SEP6200 and CS3700 as the hardware platform,this audio driver based on ASOC architecture works properly.

        Two-channel differential input,and mono input have achieved recording;single-channel stereo output and two-channel output have achieve a normal playback.At present,the driver has been successfully applied in embedded system based on SEP6200 and CS3700,and stable,reaching the expected results.

        Refereces:

        [1]SEP6200 User Manual.

        [2]Zhou Peng,Wang Cheng, ,et al.Design of WM8976 Audio Driver Based on ALSA[J].Journal of WUT(Information and Management engineering),2011,33(4):517 -520.

        [3]Zhou Peng,Wang Cheng,et al.Design of WM8976 Audio Driver Based on ALSA[J].Journal of WUT(Information and Management Engineering),2011,33(4):517 -520.

        [4]Jaya Kumar,Liam Girdwood.ALSA,OLPC Audio and ASoC/DAPM.2006.https://foss.in/2006/cfp/slides/ALSA_and_OLPC_audio_82.pdf.

        [5]Liam Girdwood.Alsa for System on Chip.2006.https://www.embedded - kernel- track.org/2006/ASoC.pdf.

        [6]Sreekrishnan Venkateswara.Essential Linux Device Driver[M].1st E-dition.New Jersey:Prentice Hall,2008.

        [7]Ding Yong,Zhou Yu,Du Sidan.on Linux 2.6 Based Embedded ASoC Audio Driver and Its Implementation[J].Computer Applications and Software,2010,27(4):267 -270.

        [8]< linux -2.6.32 > /Documentation/sound/alsa/soc/Codec.txt.

        [9]< linux -2.6.32 > /Documentation/sound/alsa/soc/platform.txt.

        [10]< linux -2.6.32.> /Documentation/sound/alsa/soc/machine.txt.

        [11]Qian Hong,Hu Chen.Design and Implementation of Audio Driver Based on Audio Codec’97 for Embedded System[J].Chinese Journal of Electron Devices,2006,29(02):500 -504.

        [12]Corbet J.Alessandro Rubini Linux Device Drivers[M].Sebastpol:OReilly and Associates,2005:137 -142.

        [13]Yu Yue,Yao Guoliang.Design and Implementation of Audio Driver for Embedded Linux System[J].Chinese Journal of Electron Devices,2008,31(2):709 -711.

        楊鯉源(1988-),男,碩士研究生,主要研究方向?yàn)榍度胧较到y(tǒng)設(shè)計(jì),Linux驅(qū)動(dòng)設(shè)計(jì),SOC異構(gòu)計(jì)算;

        吳曉飛(1990-),男,碩士研究生,主要研究方向?yàn)榍度胧较到y(tǒng)設(shè)計(jì),GPU訪存特性研究

        王 鵬(1988-),男,碩士研究生,主要研究方向?yàn)長(zhǎng)inux應(yīng)用開(kāi)發(fā),DDR控制器調(diào)度算法研究;

        凌 明(1972-),男,副教授,主要研究方向?yàn)榍度胧綄?shí)時(shí)操作系統(tǒng)、SOC設(shè)計(jì)方法學(xué)、SOC存儲(chǔ)子系統(tǒng)設(shè)計(jì)。

        猜你喜歡
        方法學(xué)嵌入式碩士
        全球首個(gè)氫燃料電池汽車(chē)碳減排方法學(xué)獲批
        昆明理工大學(xué)工商管理碩士(MBA)簡(jiǎn)介
        大型學(xué)術(shù)著作《藥理研究方法學(xué)》出版發(fā)行
        如何寫(xiě)好碩士博士學(xué)位論文
        搭建基于Qt的嵌入式開(kāi)發(fā)平臺(tái)
        嵌入式軟PLC在電鍍生產(chǎn)流程控制系統(tǒng)中的應(yīng)用
        追蹤方法學(xué)在院前急救護(hù)理安全管理中的應(yīng)用
        人降鈣素原定量檢測(cè)方法學(xué)評(píng)價(jià)
        Altera加入嵌入式視覺(jué)聯(lián)盟
        倍福 CX8091嵌入式控制器
        日韩av高清无码| 色婷婷久久亚洲综合看片| 99麻豆久久久国产精品免费| 亚洲av第一页国产精品| 久久久久亚洲精品天堂| 日韩美女人妻一区二区三区| 亚洲国产精品一区二区毛片| 亚洲裸男gv网站| 国产二级一片内射视频播放| 婷婷久久国产综合精品| 粗大的内捧猛烈进出看视频| 国产自国产在线观看免费观看 | 精精国产xxxx视频在线播放器| 日韩视频午夜在线观看| 国产国产精品人在线视| 亚洲欧洲偷自拍图片区| 成人日韩av不卡在线观看| 亚洲av男人的天堂在线| 日本va欧美va精品发布| 国产真实乱人偷精品人妻| 无码国产精品一区二区免费式芒果| 91精品国产综合久久精品密臀| 国产做国产爱免费视频| 欧美人与物videos另类xxxxx| 看全色黄大黄大色免费久久 | 国产特黄1区2区3区4区| 娇小女人被黑人插免费视频| 奇米影视777撸吧| 亚洲一区二区在线视频播放| 国产精品高清国产三级国产av| 亚洲av成人无遮挡网站在线观看| 乌克兰少妇xxxx做受6| 台湾佬中文偷拍亚洲综合| 国产在线视频91九色| 天天色影网| 亚洲AV无码久久精品国产老人| 国产自拍视频一区在线| 亚洲精品蜜夜内射| 欧美亚州乳在线观看| 国产精品一级黄色大片| 强奸乱伦影音先锋|