1、HDAL主
模块
关键:供应商 API 不能直接调用 HDAL 函数。必须通过平台
驱动程序调用
2、推荐的HDAL组件
3、HDAL模块
●
Audio Feature:
-hd_audiocapture
-hd_audioout
-hd_audioenc
-hd_audiodec
●
video Feature:
-hd_videocapture
-hd_videoout
-hd_videoenc
-hd_videodec
-hd_videoprocess
●System:
-hd_common
-hd_debug
-hd_logger
●Others:
-hd_gfx
-hd_util
4、内存管理
4.1 HDAL MMZ
4.2 HDAL 内存布局
●/*
linux system
memory region*/
●memory {
device_type = "memory"; reg = <0x00000000 0x08000000>; };
●/* Linux setup reserved memory */
●reserved-memory {
●#address-cells = <1>;
●#size-cells = <1>;
●ranges;
●cma0: cma0@0x05000000 {
●compatible = "shared-dma-pool"; reusable; reg = <0x05000000 0x00400000>; alignment =<0x400000>; status = "okay";
●};
●
DSP_cma0: dsp_cma0@0x04800000 {
●compatible = "shared-dma-pool"; reusable; reg = <0x04800000 0x00800000>; alignment =<0x400000>; status = "okay";
●};
●dsp_cma1: dsp_cma1@0x04000000 {
●compatible = "shared-dma-pool"; reusable; reg = <0x04000000 0x00800000>; alignment =<0x400000>; status = "okay";
●};
●};
●nvt_cma {
●compatible = "nvt,fmem_cma"; memory-region = <&cma0>;
●};
●nvt_dsp_cma0 {
●compatible = "nvt,nvt_dsp_cma"; memory-region = <&dsp_cma0>; id = <0>;
●};
●nvt_dsp_cma1 {
●compatible = "nvt,nvt_dsp_cma"; memory-region = <&dsp_cma1>; id = <1>;
●};
●hdal-memory {
●#address-cells = <1>;
●#size-cells = <1>;
●
media { reg = <0x08000000 0x18000000>; };
●}
4.3 HDAL Memory Pools
●Common pools (也稱為 Public pools)
-nvtmpp 在 init 時就要決定所有pools 的 buffer size/buffer count,不能動 態 create/destroy pool, 使用者可規畫多個 buffer pools,每個 pool 有多個相同 size 的 buffers,不同 pool 的 buffer size 不同,
-非某個 module 專用, 而是所有的 modules 一起共用這些 buffers
-任意 module 要從 common pools 要一塊 buffer 時,搜尋的方式為:從最小的 free buffer size 往大的找,直到找到滿足需求的size
-有 lock/unlock 與 reference count 機制來管理目前 buffers 的使用狀況, 當 reference count 為 0,buffer 就會
release 回到 common pools
●Private pools
-可以動態 create/destroy pool
-某個 module 內部專用的
-無 lock/unlock 與 reference count 機制
●Initial:
-Memory pool init 時 會先將 common pool 分割出來,其他剩下的 memory 全部保留給 private pool
更多内容请下载附件查看
更多资料及方案及技术咨询电话:
18928412535(微信同号)加号请备注