Porting WM8988 in i.MX8MMQ 只能playback 无法arecord

cancel
Showing results for 
Search instead for 
Did you mean: 

Porting WM8988 in i.MX8MMQ 只能playback 无法arecord

389 Views
xcyhere
Contributor I

您好:

         我现在使用的芯片是imx8mm,BSP参考板使用的audio codec是wm8524,我现在项目中使用的是wm8988,我将wm8988驱动移植好之后,能够正常playback播放,但是无法进行arecord(capture)。后来在community上发现说是在i.mx8mq和i.mx8m mini中,使用的编解码器是wm8524,它只支持音频播放。虽然8M Mini有PDM麦克风接口(Micfil),不支持通过I2s录制音频。但是我在设备树种已经加入了录音引脚设置了,但是还是无法arecord。我的代码贴在下面,希望能够给我提供下帮助。

1、Environment

   (1)Software Platform:
            Kernel : Linux 4.14.98

   (2)Hardware Platform

            Processor: Freescale i.MX8MMQ

            Memory: 2 GiB
            Flash: 8GB Managed Nand

2、WM8988 Hardware Design

  pastedImage_9.png

3、BSP configuration for audio

   (1)I2C 

         vim arch/arm64/boot/dts/freescale/fsl-imx8mm-evk.dts

         a、configuration pin port

         pastedImage_5.png   pastedImage_6.png

         b、add I2C device (wm8988)

         pastedImage_3.png

         pastedImage_4.png

      

   (2)I2S multiplexing

      vim arch/arm64/boot/dts/freescale/fsl-imx8mm-evk.dts

          a、configuration pin portpastedImage_7.png

          b、add I2S device (wm8988)

      pastedImage_8.png

  (3)sound card node

         vim arch/arm64/boot/dts/freescale/fsl-imx8mm-evk.dts

            pastedImage_10.png

Labels (1)
0 Kudos
2 Replies

80 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi xcy

except these changes seems it is necessary to create machine layer file

( corresponding to .compatible = "fsl,imx-audio-wm8988") imx-wm8988.c in linux/sound/soc/fsl

fsl\soc\sound - linux-imx - i.MX Linux kernel 

as described in sect.7.1.4.5 Source Code Structure, Figure 7-1. ALSA SoC Software Architecture

attached Linux Manual

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

80 Views
xcyhere
Contributor I

你好:     

         感谢你的回复,我除了修改设备树信息之外,已经创建并修改了machine文件:sound/soc/fsl/imx-wm8988.c,代码提供在附件里。我先在遇到的情况是wm8988能够playback播放,但是无法arecord录音。具体描述如下:     

         (1)开发环境          

                     kernel:Linux 4.14.98          

                     Processor:Freescale i.MX8MMQ     

         (2)设备树修改已经按照之前内容修改过了     

         (3)machine层驱动代码修改过了,在附件中     

         (4)使用arecord -Dhw:0,0 -f cd -t wav -d 10 111.wav进行录音,整个过程进行没有报错,但是使用aplay 111.wav播放时,并未有录下声音     

         (5)我又重新交叉编译了tinyalsa工具,tinyplay可以播放音乐,但是使用tinycap命令重新录音,仍然是没有声音     

         (6)我使用amixer controls检查了下控制项,确认switch/volume已经处在开启/最大音量状态    

      

       我的工作现在停在这个问题上了,进行不下去了,希望得到你的帮助,谢谢!

0 Kudos