如何使用_alsa-utils
amixer
1 | # amixer --help |
使用 amixer scontrols 命令查看 audio driver 提供可以控制的接口,例如 WM8940 提供以下接口
1 | # amixer scontrols |
使用 amixer scontents 命令可以看到各個接口目前的數值1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27# amixer scontents
Simple mixer control 'Speaker',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 63
Mono: Playback 63 [100%] [6.00dB] [on]
Simple mixer control 'Speaker Mixer Line Bypass',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 1
Mono: 1 [100%] [0.00dB]
Simple mixer control 'Speaker Playback ZC',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'Mic Bias Level',0
Capabilities: enum
Items: '0.9' '0.65'
Item0: '0.9'
Simple mixer control 'Mono Mixer Line Bypass',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 1
Mono: 1 [100%] [0.00dB]
...
使用 amixer sget 接口名稱 可以查看特定接口的數值1
2
3
4
5
6
7# amixer sget 'Capture PGA',0
Simple mixer control 'Capture PGA',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 63
Mono: 63 [100%] [35.25dB]
使用 amixer sset 接口名稱 數值 可以設定特定接口的數值1
2
3
4
5
6
7# amixer sset 'Capture PGA',0 63
Simple mixer control 'Capture PGA',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 63
Mono: 63 [100%] [35.25dB]