i.MX6 serials (i.MX6S/DL/D/Q/Dp/Qp) audio card development guide:MX6X_ASOC_V5-20191115.pdf

Document created by John Li Employee on Apr 27, 2017Last modified by John Li Employee on Jun 21, 2020
Version 3Show Document
  • View in full screen mode

this doc is explain how to develop a audio card driver base on i.MX6 platform.

which explain the ASOC architecture struction basic knowledage and then give some sample for the audio driver development like:

1:NXP SGTL5000: NXP i.MX BSP sabrelite board default support it. check imx6qdl-sabrelite.dtsi

 codec: sgtl5000@0a {
  compatible = "fsl,sgtl5000";
  reg = <0x0a>;
  clocks = <&clks 201>;
  VDDA-supply = <&reg_2p5v>;
  VDDIO-supply = <&reg_3p3v>;
 };

2: Wolfson WM8524.

   A: 3.0.35 BSP support: i.MX6 setbox BSP support it:(which in elder fsl community link and out of data)

   B: 3.14.28 BSP support pls check attachment:

3: Wolfson WM8960.

    which include how to add the android middle-layer and driver, pls check attachment.

4: TI TLV320AIC3120

     which include how to add the android middle-layer and driver, pls check attachment.

5: TI TLV320AIC3X

     pls check attachment.

Contents
1 ALSA and ASOC基本概念 ......................................... 3
1.1 ASoC的由来 ........................................................... 4
1.2 硬件架构 ................................................................. 5
1.3 软件架构 ................................................................. 7
1.4 数据结构 ............................................................... 10
2 音频驱动的流程,平台数据,内核配置与测试 ......... 11
2.1 音频驱动的打开流程 ............................................. 11
2.2 音频驱动平台数据 ................................................ 11
2.3 音频驱动内核配置 ................................................ 14
2.4 音频驱动的测试 .................................................... 14
3 音频驱动ASoC的机器层 .......................................... 15
3.1 注册Platform Device ............................................. 15
3.2 注册Platform Driver .............................................. 18
3.3 初始化入口soc_probe() ........................................ 19
4 音频驱动ASoC的Codec层 ....................................... 27
4.1 Codec简介............................................................ 27
4.2 ASoC中对Codec的数据抽象 ................................ 28
4.3 Codec的注册 ........................................................ 34
4.4 Codec初始化 ........................................................ 39
4.5 regmap-io ............................................................. 39
5 音频驱动ASoC的Codec层 ....................................... 40
5.1 Platform驱动在ASoC中的作用 ............................. 40
5.2 snd_soc_platform_driver的注册 ........................... 40
5.3 snd_soc_platform_driver中的ops字段 .................. 43
5.4 音频数据的dma操作 ............................................. 43
5.5 cpu的snd_soc_dai driver驱动的注册 .................... 44
5.6 snd_soc_dai_driver中的ops字段 .......................... 47
6 音频驱动移植 范例:SGTL5000(Saberlite) ................ 50
6.1 硬件设计 ............................................................... 50
6.2 软件目录 ............................................................... 51
6.3 软件说明 ............................................................... 52
7 音频驱动移植 范例:WM8524(OTT SetBox) ............. 54
7.1 硬件设计 ............................................................... 54
7.2 软件目录 ............................................................... 55
7.3 软件说明 ............................................................... 56

8 WM8524 3.14.28 BSP支持 ...................................... 60
8.1 简介 ...................................................................... 60
8.2 软件目录 ............................................................... 61
8.3 软件说明 ............................................................... 61
8.4 测试与Debug ........................................................ 67
9 如何编写机器层代码与调试 ...................................... 70
9.1 Audio codec时钟设定 ............................................ 72
9.2 Audio dapm设定 ................................................... 80
9.3 Wm8960.c的debug ............................................. 100
9.4 一些debug方法 ................................................... 101
10 一些特殊的支持情况 ............................................... 104
10.1 非DAPM规范的codec. ........................................ 104
11 TLV320AIC3X 4.1.15 BSP支持 .............................. 107
11.1 简介 .................................................................... 107
11.2 软件目录 ............................................................. 109
11.3 软件说明 ............................................................. 110
11.4 测试与Debug ...................................................... 115

Outcomes