imx6dl使用i2s slaver模式,DAC波形异常

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6dl使用i2s slaver模式,DAC波形异常

1,497 Views
kaifengye
Contributor I

imx6dl用AUD3作为slaver模式,连接到TEF6635的Host_I2S,采样率是48k,bclk是3.072M。当播放音频时,imx6dl输出(AUD3_TXD_DAC)的波形异常,已经尝试了很多办法都没办法解决,希望有个高手帮忙。imx6dl_aud3_dac.jpg

Labels (1)
Tags (1)
0 Kudos
7 Replies

1,289 Views
kaifengye
Contributor I

wirgos 你好,bitclk和lrclk都正常,就AUD3_TXD_DAC有异常。TEF6638的格式是Philips,做master模式,imx6dl是S16_LE格式,做slave。上面那条黄色的是imx6dl输出的data,下面那条黄色是LRCLK,中间蓝色的是Bitclk,从波形上看前面17bit,data波形都是正常的,到了18bit时data波形就开始下斜了。是否和imx6dl输出S16_LE格式有关呢?应该输出S24_LE才对吗?微信图片_20190704184956.jpg

0 Kudos

1,289 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Kaifeng,

  >.是否和imx6dl输出S16_LE格式有关呢?应该输出S24_LE才对吗?

No, I don't think so.  Because S16_LE format is supported by sound card driver for wm8962, which is used on our i.MX6DL SabreSDB board.

Below is from imx-wm8962.c:

static int imx_wm8962_probe(struct platform_device *pdev)
{

......

        if (width == 24)
            priv->asrc_format = SNDRV_PCM_FORMAT_S24_LE;
        else
            priv->asrc_format = SNDRV_PCM_FORMAT_S16_LE;

......

}

So my suggestion is that the better way for you is to do test on i.mx6dl board , then compare result with your boad.

Have a nice day!

BR,

Weidong

0 Kudos

1,289 Views
kaifengye
Contributor I

Wigros,你好:我用的Android版本是4.4.2+kernel3.0.35,TEF6635用的驱动也是参考wm8962写的,刚看了一些imx-wm8962.c,并没有你说的那段代码
static int imx_wm8962_probe(struct platform_device *pdev)
{

......

if (width == 24)
priv->asrc_format = SNDRV_PCM_FORMAT_S24_LE;
else
priv->asrc_format = SNDRV_PCM_FORMAT_S16_LE;

......

}

我把代码上传上来,帮忙看一下。有可能是的代码是最新的,我用的比较旧的代码没有格式设置

0 Kudos

1,289 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello kaifeng,

    I have written a platform driver for WM8960 on the basis of android 4.2.2, see the link, please!

https://community.nxp.com/docs/DOC-158826 

   Attachments on the link are probably helpful for you, in addition, I will send a document on how to written Linux ALSA SoC driver which is written in Chinese.

Have a nice day!

BR,

Weidong

0 Kudos

1,289 Views
kaifengye
Contributor I

Wigros: 你好,发过我的邮件我看过了,好像没有找到有用的信息,我们目前播放声音都有,听起来也正常,但是做EMC的BCI实验时有杂音,现在怀疑是DATA波形不正常导致的,而且不知道如何修复这种波形异常问题。imx6为什么会输出这样一个异常波形,搞清楚了这个问题后,才好解决。

0 Kudos

1,289 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Kaifen,

    如果驱动调试和播放音频都能够正常听到声音,那么说明你的驱动程序的三个模块是没有问题的。如果播放时候,杂音是由于TXD线上的干扰造成的,那么你可以在TXD线上空间DAC芯片位置,对地接一个10pF左右的电容。然后,再实验一下,杂音是否可以去掉。

伟东

If the driver debugging and playing audio can hear the sound normally, then the three modules of your driver are all right.
If the noise is caused by interference on the TXD line when playing, you can connect the DAC chip position on the TXD line and a capacitor of about 10pF to the ground.
Then, experiment again to see if the noise can be removed.

Weidong

0 Kudos

1,289 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Kaifeng,

Just give you a little advice :

It seems that there is a capacitive load on the TX signal line of I2S.

Please also observe whether the bitclk and LRCLK waveforms provided by DAC to CPU are normal.

Have a nice day!

Weidong

0 Kudos