AnsweredAssumed Answered

移植wm8904芯片的ssi Tx引脚没有波形

Question asked by wenbin songwenbin on Jun 15, 2015
Latest reply on Jan 3, 2017 by felix yang

我正在移植wm8904芯片,codec的内容使用i.mx6库中自带的wm8904.c,imx的内容修改了imx-wm8962为imx-wm8904.c

 

启动信息为:

<3>imx ssi imx_ssi_probe

<3>ssi clk -1063799288

<3>imx-wm8904 sysclk: 24000000

<3>imx ssi imx_ssi_dai_probe

<3>Device is a WM8904, ID is 8904

<6>wm8904 0-001a: revision A

<3>wm8904 finish

<3>wm8904 0-001a: Failed to add route DMIC->DMICDAT

<3>imx ssi imx_pcm_new

<3>imx ssi imx_pcm_preallocate_dma_buffer

<3>imx ssi imx_pcm_preallocate_dma_buffer

<6>asoc: wm8904-hifi <-> imx-ssi.1 mapping ok

<6>input: wm8904-audio DMIC as /devices/platform/soc-audio.6/sound/card0/input4

<6>input: wm8904-audio Headphone Jack as /devices/platform/soc-audio.6/sound/card0/input5

<6>imx_3stack asoc driver

<6>asoc: mxc-hdmi-soc <-> imx-hdmi-soc-dai.0 mapping ok

<6>ALSA device list:

<6>  #0: wm8904-audio

<6>  #1: imx-hdmi-soc

 

测试方法:

./tinyplay audio8k16S.wav

 

程序可以正确执行,有wm8904发来的BCLK和FS波形,但是没有i.mx6 ssi的tx引脚没有波形。

 

1. 对比了wm8962产生的BCLK波形和FS波形,确定wm8904输出波形没有问题。

2. 看了dmesg,没有任何错误信息

3. 在dma的pointer位置打了log, dma是正常输出的

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 0 0

<3>snd_imx_pcm_pointer: 0 0

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 4096 1024

<3>snd_imx_pcm_pointer: 4096 1024

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 8192 2048

<3>snd_imx_pcm_pointer: 8192 2048

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 12288 3072

<3>snd_imx_pcm_pointer: 12288 3072

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 0 0

<3>snd_imx_pcm_pointer: 0 0

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 4096 1024

<3>snd_imx_pcm_pointer: 4096 1024

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 8192 2048

<3>snd_imx_pcm_pointer: 8192 2048

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 12288 3072

<3>snd_imx_pcm_pointer: 12288 3072

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 0 0

<3>snd_imx_pcm_pointer: 0 0

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 4096 1024

<3>snd_imx_pcm_pointer: 4096 1024

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 8192 2048

<3>snd_imx_pcm_pointer: 8192 2048

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 12288 3072

<3>snd_imx_pcm_pointer: 12288 3072

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 0 0

<3>snd_imx_pcm_pointer: 0 0

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 4096 1024

<3>snd_imx_pcm_pointer: 4096 1024

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 8192 2048

<3>snd_imx_pcm_pointer: 8192 2048

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 12288 3072

<3>snd_imx_pcm_pointer: 12288 3072

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 0 0

<3>snd_imx_pcm_pointer: 0 0

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 4096 1024

<3>snd_imx_pcm_pointer: 4096 1024

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 8192 2048

<3>snd_imx_pcm_pointer: 8192 2048

<3>audio_dma_irq

<3>snd_imx_pcm_pointer: 12288 3072

<3>snd_imx_pcm_pointer: 12288 3072

<3>audio_dma_irq

4. 对比了wm8962播放声音时和wm8904的ssi寄存器内容是相同的

<3>trigger start

<3>playback

<3>ssi enable

<3>ssi: scr 15b

<3>ssi: sisr 3323

<3>ssi: sier 80001

<3>ssi: stcr 38d

<3>ssi: stccr 4e100

<3>ssi: sfcsr 460046

<3>ssi: str 1113

 

<3>trigger stop

<3>ssi unenable

<3>ssi: scr 158

<3>ssi: sisr 3003

<3>ssi: sier 0

<3>ssi: stcr 38d

<3>ssi: stccr 4e100

<3>ssi: sfcsr 460046

<3>ssi: str 110a

Outcomes