Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
.github/workflows/ | 12-May-2024 | - | 99 | 95 | ||
alsalisp/ | 12-May-2024 | - | 624 | 492 | ||
aserver/ | 12-May-2024 | - | 1,446 | 1,288 | ||
doc/ | 12-May-2024 | - | 708 | 601 | ||
include/ | 12-May-2024 | - | 14,313 | 7,566 | ||
m4/ | 12-May-2024 | - | 319 | 281 | ||
modules/ | 12-May-2024 | - | 2,476 | 2,050 | ||
src/ | 12-May-2024 | - | 123,828 | 89,644 | ||
test/ | 12-May-2024 | - | 9,238 | 7,553 | ||
utils/ | 12-May-2024 | - | 359 | 302 | ||
.gitignore | D | 12-May-2024 | 934 | 70 | 69 | |
.travis.yml | D | 12-May-2024 | 136 | 6 | 5 | |
BUILD.gn | D | 12-May-2024 | 7.1 KiB | 187 | 178 | |
COPYING | D | 12-May-2024 | 25.8 KiB | 505 | 418 | |
ChangeLog | D | 12-May-2024 | 1.3 KiB | 70 | 43 | |
INSTALL | D | 12-May-2024 | 3.8 KiB | 134 | 91 | |
MEMORY-LEAK | D | 12-May-2024 | 469 | 14 | 9 | |
Makefile.am | D | 12-May-2024 | 829 | 41 | 34 | |
NOTES | D | 12-May-2024 | 2 KiB | 57 | 39 | |
OAT.xml | D | 12-May-2024 | 7.9 KiB | 109 | 51 | |
README.OpenSource | D | 12-May-2024 | 368 | 11 | 11 | |
README.md | D | 12-May-2024 | 926 | 26 | 16 | |
README_zh.md | D | 12-May-2024 | 3.6 KiB | 75 | 60 | |
TODO | D | 12-May-2024 | 246 | 5 | 4 | |
acinclude.m4 | D | 12-May-2024 | 1.2 KiB | 25 | 24 | |
bundle.json | D | 12-May-2024 | 964 | 36 | 35 | |
configure.ac | D | 12-May-2024 | 25.7 KiB | 794 | 712 | |
gitcompile | D | 12-May-2024 | 2 KiB | 95 | 87 | |
ohos_build_config.sh | D | 12-May-2024 | 525 | 27 | 22 |
README.OpenSource
1 [ 2 { 3 "Name": "alsa-lib", 4 "License": "GNU LESSER GENERAL PUBLIC LICENSE", 5 "License File": "COPYING", 6 "Version Number": "1.2.6", 7 "Owner": "zhangyunhu@huawei.com", 8 "Upstream URL": "https://github.com/alsa-project/alsa-lib", 9 "Description": "A library to interface with ALSA in the Linux kernel." 10 } 11 ]
README.md
1 # alsa-lib 2 ## Advanced Linux Sound Architecture (ALSA) project 3 4  5 6 The alsa-lib is a library to interface with ALSA in the Linux kernel and 7 virtual devices using a plugin system. 8 9 The up-to-date reference generated from sources can be accessed here: 10 11 http://www.alsa-project.org/alsa-doc/alsa-lib/ 12 13 You may give a look for more information about the ALSA project to URL 14 http://www.alsa-project.org. 15 16 ### Submitting patches 17 18 The preferred way to submit patches is by sending them by email to the 19 alsa-devel mailing list. Sending mail to the list requires subscription, 20 subscribe here: https://mailman.alsa-project.org/mailman/listinfo/alsa-devel 21 22 Add Takashi Iwai `<tiwai@suse.de>` and/or Jaroslav Kysela `<perex@perex.cz>` to 23 Cc so that your patch won't be missed. 24 25 Patches are also accepted as GitHub pull requests. 26
README_zh.md
1 - [三方开源软件alsa-lib](#三方开源软件alsa-lib) 2 - [1. Alsa-lib简介](#1-alsa-lib简介) 3 - [2. 引入背景简述](#2-引入背景简述) 4 - [3. 使用场景](#3-使用场景) 5 - [4. 为OpenHarmony带来的价值](#4-为openharmony带来的价值) 6 - [5. 如何使用](#5-如何使用) 7 - [5.1 内核编译开关配置](#51-内核编译开关配置) 8 - [5.2 产品化编译开关配置](#52-产品化编译开关配置) 9 - [5.3 alsa-lib组件编译依赖添加](#53-alsa-lib组件编译依赖添加) 10 ## 三方开源软件alsa-lib 11 ### 1. Alsa-lib简介 12 ALSA-lib是和Linux内核虚拟设备ALSA进行接口的库,虽然Linux下ALSA给用户空间提供了系统调用,但alsa-lib对系统调用进行进一步封装,并实现了很多插件,例如多音频源进行混音播放时,调用的就是dmix插件。ALSA-lib是ALSA框架应用库(必需基础库)。 13 14 源代码最新参考资料可以访问:[alsa-lib官网主页](http://www.alsa-project.org/alsa-doc/alsa-lib/)。 15 您也可以通过[ALSA官网主页](http://www.alsa-project.org)了解更多关于ALSA项目的信息。 16 17 ### 2. 引入背景简述 18 Openharmony南向生态发展过程中,已经支持过ALSA的OEM产商在接入OpenHarmony过程中存在使用内核ALSA框架的诉求。鉴于此OpenHarmony Audio为支持南向生态伙伴快速接入鸿蒙、快速实现产品化而提供的“ALSA兼容方案”,本方案采用插件化的适配器模式通过alsa-lib实现ALSA的兼容。 19 20 ### 3. 使用场景 21 本方案仅供OEM产商中已支持ALSA框架的设备在移植OpenHarmony系统过程中作为备选方案使用,建议优先选择ADM(Audio Driver Model, HDF 音频驱动模型)。 22 本仓接口能力的直接调用对象为驱动子系统的Audio模块。 23 24 ### 4. 为OpenHarmony带来的价值 25 1. 满足OEM生态伙伴中已支持的ALSA的产品快速接入OpenHarmony诉求。 26 2. 提供产品化过程中ADM(Audio Driver Model, HDF 音频驱动模型)暂不具备的能力。 27 28 ### 5. 如何使用 29 ADM与ALSA在一款特定产品上的使用方式为二选一,考虑到设备内存,不建议两者同时存在。 30 使用过程中需要完成内核编译选项的配置、产品化编译开关的配置,如需产商需要自己实现设备抽象层(DAL),则需要配置对的编译依赖。 31 32 #### 5.1 内核编译开关配置 33 34 需要在各自产品的Linux kernel配置文件中打开对应开关,路径如下:其中${product_name}表示您的产品名称 35 36 kernel/linux/config/linux-5.10/arch/arm64/configs/${product_name}_standard_defconfig 37 38 以rk3568_standard_defconfig为例配置如下: 39 40 ```sh 41 CONFIG_SOUND=y 42 CONFIG_SND=y 43 44 # CONFIG_DRIVERS_HDF_AUDIO is not set 45 # CONFIG_DRIVERS_HDF_AUDIO_RK3568 is not set 46 ``` 47 #### 5.2 产品化编译开关配置 48 49 需要在各自产品配置文件中打开对应开关,路径如下:其中${product_company}表示您的企业名称,${product_name}表示您的产品名称 50 ```bash 51 52 /vendor/${product_company}/${product_name}/config.json 53 ``` 54 开关如下:在drivers_peripheral_audio部件节点下,找到特性宏drivers_peripheral_audio_alsa_lib,开启为true,关闭为false,默认为false. 55 ```json 56 drivers_peripheral_audio_alsa_lib = true 57 ``` 58 59 #### 5.3 alsa-lib组件编译依赖添加 60 如需要重新实现Audio DAL,则需要添加alsa-lib组件的编译依赖,可以采用以下两种方法进行添加。 61 **方法一(可选):** 62 在您的 bundle.json 文件 添加 63 ```json 64 "deps": { 65 "third_part": [ 66 "alsa-lib" 67 ] 68 } 69 ``` 70 **方法二(可选):** 71 在您的BUILD.gn需要的地方添加依赖 72 ```json 73 deps += [ "//third_party/alsa-lib:libasound" ] 74 ``` 75