AnsweredAssumed Answered

Help!!!请问如何移植wm8904声卡

Question asked by felix yang on Jan 4, 2017
Latest reply on Apr 7, 2017 by Marco Bascetta

各位大神,我最近在移植wm8904声卡到安卓4.4.2上,cpu是imx6q,内核使用的是3.0.35,我照抄了imx-wm8962.c,做了一份imx-wm8904.c文件,部分修改如下(imx-wm8904.c):

static struct snd_soc_dai_link imx_dai[] = {
{
.name = "HiFi",
.stream_name = "HiFi",
.codec_dai_name = "wm8904",
.codec_name = "wm8904.0-001a",
.cpu_dai_name = "imx-ssi.1",
.platform_name = "imx-pcm-audio.1",
.init = imx_wm8904_init,
.ops = &imx_hifi_ops,
},
};

与wm8904.c驱动中的wm8904_dai .name对应起来了,如代码(wm8904.c):

static struct snd_soc_dai_driver wm8904_dai = {
.name = "wm8904",
.playback = {
.stream_name = "Playback",
.channels_min = 2,
.channels_max = 2,
.rates = WM8904_RATES,
.formats = WM8904_FORMATS,
},
.capture = {
.stream_name = "Capture",
.channels_min = 2,
.channels_max = 2,
.rates = WM8904_RATES,
.formats = WM8904_FORMATS,
},
.ops = &wm8904_dai_ops,
.symmetric_rates = 1,
};

可是在wm8904.c驱动中,始终不能进入wm8904_probe。

串口打印的部分log如下:

enter the wm8904_i2c_probe
imx-hdmi-soc-dai imx-hdmi-soc-dai.0: Failed: Load HDMI-video first.
android_work: sent uevent USB_STATE=CONNECTED
android_work: sent uevent USB_STATE=DISCONNECTED
enter imx_wm8904_probe
Initialize HDMI-audio failed. Load HDMI-video first!
ALSA device list:
No soundcards found.

 

请问如何移植wm8904声卡?imx-wm8904.c 这个machine layer code 如何修改?跪求各位大神指导。谢谢。

Outcomes