Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
.github/workflows/ | 12-May-2024 | - | 167 | 159 | ||
alsa-info/ | 12-May-2024 | - | 1,054 | 905 | ||
alsaconf/ | 12-May-2024 | - | 2,916 | 2,479 | ||
alsactl/ | 12-May-2024 | - | 8,401 | 7,173 | ||
alsaloop/ | 12-May-2024 | - | 4,145 | 3,710 | ||
alsamixer/ | 12-May-2024 | - | 5,922 | 4,769 | ||
alsaucm/ | 12-May-2024 | - | 1,478 | 1,203 | ||
amidi/ | 12-May-2024 | - | 947 | 815 | ||
amixer/ | 12-May-2024 | - | 2,332 | 2,043 | ||
aplay/ | 12-May-2024 | - | 3,948 | 3,450 | ||
axfer/ | 12-May-2024 | - | 10,965 | 8,598 | ||
bat/ | 12-May-2024 | - | 5,977 | 4,620 | ||
iecset/ | 12-May-2024 | - | 808 | 685 | ||
include/ | 12-May-2024 | - | 277 | 82 | ||
m4/ | 12-May-2024 | - | 2 | 1 | ||
po/ | 12-May-2024 | - | 8,625 | 6,984 | ||
seq/ | 12-May-2024 | - | 3,919 | 3,133 | ||
speaker-test/ | 12-May-2024 | - | 1,610 | 1,282 | ||
topology/ | 12-May-2024 | - | 4,060 | 3,000 | ||
utils/ | 12-May-2024 | - | 127 | 93 | ||
.gitignore | D | 12-May-2024 | 1,010 | 73 | 70 | |
.travis.yml | D | 12-May-2024 | 679 | 19 | 18 | |
BUILD.gn | D | 12-May-2024 | 4.2 KiB | 181 | 149 | |
COPYING | D | 12-May-2024 | 17.6 KiB | 341 | 281 | |
ChangeLog | D | 12-May-2024 | 1 KiB | 44 | 28 | |
INSTALL | D | 12-May-2024 | 1.6 KiB | 57 | 39 | |
Makefile.am | D | 12-May-2024 | 1 KiB | 55 | 48 | |
OAT.xml | D | 12-May-2024 | 7.9 KiB | 105 | 47 | |
README.OpenSource | D | 12-May-2024 | 382 | 11 | 11 | |
README.md | D | 12-May-2024 | 1.3 KiB | 29 | 24 | |
README_zh.md | D | 12-May-2024 | 3 KiB | 86 | 74 | |
TODO | D | 12-May-2024 | 187 | 5 | 4 | |
acinclude.m4 | D | 12-May-2024 | 440 | 13 | 12 | |
bundle.json | D | 12-May-2024 | 1 KiB | 36 | 35 | |
configure.ac | D | 12-May-2024 | 15.8 KiB | 453 | 403 | |
gitcompile | D | 12-May-2024 | 705 | 26 | 22 |
README.OpenSource
1[ 2 { 3 "Name": "alsa-utils", 4 "License": "GNU 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-utils", 9 "Description": "This package contains the command line utilities for the ALSA project." 10 } 11]
README.md
1# alsa-utils 2## Advanced Linux Sound Architecture - Utilities 3 4 5 6This package contains the command line utilities for the ALSA project. 7The package can be compiled only with the installed ALSA driver and 8the ALSA C library (alsa-lib). 9 10Utility | Description 11----------------|---------------------------------------------------- 12alsaconf | the ALSA driver configurator script 13alsa-info | a script to gather information about ALSA subsystem 14alsactl | an utility for soundcard settings management 15aplay/arecord | an utility for the playback / capture of .wav,.voc,.au files 16axfer | an utility to transfer audio data frame (enhancement of aplay) 17amixer | a command line mixer 18alsamixer | a ncurses mixer 19amidi | a utility to send/receive sysex dumps or other MIDI data 20iecset | a utility to show/set the IEC958 status bits 21speaker-test | a speaker test utility 22alsaloop | a software loopback for PCM devices 23alsaucm | Use Case Manager utility 24alsabat | a sound tester for ALSA sound card driver 25alsatplg | ALSA topology compiler 26 27You may give a look for more information about the ALSA project to URL 28http://www.alsa-project.org. 29
README_zh.md
1- [三方开源软件alsa-utils](#三方开源软件alsa-utils) 2 - [1. alsa-utils简介](#1-alsa-utils简介) 3 - [2. 组件引入背景简述](#2-组件引入背景简述) 4 - [3. 使用场景](#3-使用场景) 5 - [4. 为OpenHarmony带来的价值](#4-为openharmony带来的价值) 6 - [5. 如何使用](#5-如何使用) 7 - [5.1 添加编译](#51-添加编译) 8 - [5.2 常用命令的使用](#52-常用命令的使用) 9 10## 三方开源软件alsa-utils 11### 1. alsa-utils简介 12alsa-utils作为一种HDI之外的定位工具,便于问题定界、方便对HDI不熟悉的驱动移植生态伙伴使用,包含用于ALSA的命令行实用程序。 13您可以通过[ALSA官网](http://www.alsa-project.org)了解更多关于ALSA项目的信息。 14 15### 2. 组件引入背景简述 16为满足OEM生态伙伴已经支持ALSA的产品采用"ALSA兼容方案"接入OpenHarmony,而提供的命令行定位调试工具。 17 18### 3. 使用场景 19只能用于已安装ALSA驱动程序和ALSA C库(ALSA -lib)的系统中使用,且只能作为独立工具使用。 20 21### 4. 为OpenHarmony带来的价值 221. 满足OEM生态伙伴中已支持的ALSA的产品快速接入OpenHarmony诉求。 232. 降低开发者学习成本加速南向生态发展。 24 25### 5. 如何使用 26#### 5.1 添加编译 27由于alsa-utils作为调试工具默认不编译打包,您可以采用以下两种方式进行编译: 281. 如果采用Openharmony主线源码 29您可采用以下命令进行编译: 30```bash 31./build.sh --product-name [PRODUCT_NAME] --ccache --build-target third_party/alsa-utils:alsa-utils 32``` 332. 如已拉出分支需要编译打包 34在现有的OpenHarmony的文档或者子系统中有如下添加方法 35方法:在您的 bundle.json 文件 添加 36```json 37"build": { 38 "sub_component": [ 39 "//third_party/alsa-utils:alsa-utils" 40 ] 41} 42``` 43注意:此三方件编译需要先编译ALSA-lib 44 45### 5.2 常用命令的使用 46 47aplay放音XXX.wav音频文件,详细参数及使用请用“ -h” 查看 48 49```bash 50aplay /data/XXX.wav 51``` 52 53arecord录音test.wav,其中 -d 30表示录制30s时间, -r 44100表示rate 为44100Hz, -c 2表示为双声道立体声, -t wav表示录制的音频文件是wav格式 54 55```bash 56arecord -d 30 -f cd -r 44100 -c 2 -t wav test.wav 57``` 58 59amixer命令打开录放音通路,contents用来查看各个元素(以dayu_200开发板举例),cset来设置录放音通路: 60 61```bash 62# amixer contents 63numid=2,iface=MIXER,name='Capture MIC Path' 64 ; type=ENUMERATED,access=rw------,values=1,items=4 65 ; Item #0 'MIC OFF' 66 ; Item #1 'Main Mic' 67 ; Item #2 'Hands Free Mic' 68 ; Item #3 'BT Sco Mic' 69 : values=1 70numid=1,iface=MIXER,name='Playback Path' 71 ; type=ENUMERATED,access=rw------,values=1,items=11 72 ; Item #0 'OFF' 73 ; Item #1 'RCV' 74 ; Item #2 'SPK' 75 ; Item #3 'HP' 76 ; Item #4 'HP_NO_MIC' 77 ; Item #5 'BT' 78 ; Item #6 'SPK_HP' 79 ; Item #7 'RING_SPK' 80 ; Item #8 'RING_HP' 81 ; Item #9 'RING_HP_NO_MIC' 82 ; Item #10 'RING_SPK_HP' 83 : values=6 84#amixer cset numid=1 6 85#amixer cset numid=2 1 86```