现在从事imx6的开发工作,在调试wm8960的驱动的过程中,发现这么一个问题:
对wm8960的驱动的移植,我是借鉴的是飞思卡尔论坛上的对wm8960的驱动imx-wm8960.c,现在的状态是能播放声音,但是循环播放到多次的时候,差不多11次,发现开始出现问题,从sheel显示
asoc: platform imx-pcm-audio.1 hw params failed
HW_PARAMS failed: -22的信息,声音就不再播放了。
对问题进行跟踪,发现问题已经在soc-core.c文件的static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)函数里
if (platform->driver->ops && platform->driver->ops->hw_params) {
ret = platform->driver->ops->hw_params(substream, params);
if (ret < 0) {
printk(KERN_ERR "asoc: platform %s hw params failed\n",
platform->name);
goto platform_err;
}
}处。还请指教。
Original Attachment has been moved to: imx-wm8960.c.zip
Hi li xing,
You can refer to the document WM8960 audio codec .
Hope this can help you.
Have a great day,
Dan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
谢谢,我参考的就是这篇文章,我把问题定位了,应该是dma出了问题 发自网易邮箱 在2015年09月02日 10:12 ,b45499写道: 关于imx6音频播放问题 reply from Dan Wang in i.MX Community - View the full discussion Hi li xing, You can refer to the document WM8960 audio codec . Hope this can help you. Have a great day, Dan
能說明一下dma的問題嗎? 謝謝
在声音测试中,我进行循环播放,前10次的播放是正常的,从第11次开始,
开始提示
asoc: platform imx-pcm-audio.1 hw params failed
HW_PARAMS failed: -22的信息,声音就不再播放了。
的信息。通过对问题定位是因为申请不到DMA通道了。