AnsweredAssumed Answered

关于imx6音频播放问题

Question asked by li xing on Sep 1, 2015

现在从事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

Outcomes