1 计算编解码器命令和路径#
1.1 获取解码器#
首先,我们需要从linux获取音频编码器的转储。因此,进入USB/CD(或)完全安装的任何Linux发行版。并在终端中输入以下命令以在桌面上以文本格式获取转储。
1
2
3
4
5
| cat /proc/asound/card0/codec#0 > ~/Desktop/codec_dump.txt
# 或者
cat /proc/asound/card0/codec#1 > ~/Desktop/codec_dump.txt
# 或者
cat /proc/asound/card0/codec#2 > ~/Desktop/codec_dump.txt
|
1.2 分析编解码器转储并提取相关信息#
我们需要从编码器转储以下细节:
- Codec
- Address
- Vendor ID(Convert this hex value into decimal value)
- Pin Complex Nodes with Control Name
- Audio Mixer/Selector Nodes
- Audio Output Nodes
- Audio Input Nodes
2 修补XML(平台和布局)文件#
2.1 从Pin复杂节点中提取值’Pin Default’、‘EAPD’、‘Node ID’#
我们已经从第1部分的编解码器转储中分析并获得了相关的详细信息。现在,我们尝试从上面提取的控制名称的Pin Complex节点获取Pin Default、EAPD和Node ID的值
举例:ACL269
Pin Complex Nodes with Control Name
1
2
3
4
| Node 14 : Pin Default 0x99130110, EAPD: 0x02
Node 18 : Pin Default 0x04a11820
Node 19 : Pin Default 0x99a3092f
Node 21 : Pin Default 0x0421101f
|
2.2 PIN默认值必须从右向左读取。我们将从其中取两个数字,然后从左到右写下来,如下面解释的ALC269#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| Node 14:
Pin Default value: 0x99130110
Extracted verb data: "10 01 13 99"
Node 18:
Pin Default value: 0x04a11820
Extracted verb data: "20 18 a1 04"
Node 19:
Pin Default value: 0x99a3092f
Extracted verb data: "2f 09 a3 99"
Node 21:
Pin Default value: 0x0421101f
Extracted verb data: "1f 10 21 04"
|
现在,我们需要根据第二篇文章中解释的动词信息来纠正上面的verb数据。
1
2
3
4
5
6
7
8
9
10
11
12
13
| at Node 14: 10 01 13 99 [ Correction 99->90(Note 1)]
at Node 18: 20 18 a1 04 [ Correction 18->10(Note 2)]
at Node 19: 2f 09 a3 99 [ Correction 2f->20(Note 3) 09->01(Note 2) 99->90(Note 1)]
at Node 21: 1f 10 21 04 [ Correction 1f->10(Note 3)]
at Node 14 EAPD : 02 (Note 5)
Corrected Verb Data:
Code:
at Node 14: 10 01 13 90
at Node 18: 20 10 a1 04
at Node 19: 20 01 a3 90
at Node 21: 10 10 21 04
at Node 14 EAPD : 02
|
默认关联修正后的Verb数据:注释4
1
2
3
4
5
| at Node 14: 10 01 13 90
at Node 18: 20 10 a1 04
at Node 19: 30 01 a3 90
at Node 21: 40 10 21 04
at Node 14 EAPD : 02
|
MIC修正后的最终Verb数据:注释6和注释7
1
2
3
4
5
| Node 14: 10 01 13 90
Node 18: 20 10 81 04
Node 19: 30 01 a0 90
Node 21: 40 10 21 04
Node 14 EAPD : 02
|