The document will introduce all steps for poring WM8960 audio codec to freescale android4.2.2 BSP.
Attachments include :
(1)Document for porting
(2)Codec driver : wm8960.c
(3)Machine driver: imx-wm8960.c
(4)wm8960 schematic for reference
(5)Android Audio HAL: config_wm8960.h
(6)schematic: MX6QDL-PIANO-CNFV1.DSN
(7)i.MX6DL BSP files
mx6dl_piano.c
mx6dl_piano.h
mx6dl_piano_pmic_pfuse100.c
(8)i.MX6Q BSP files
mx6q_piano.c
mx6q_piano.h
mx6q_piano_pmic_pfuse100.c
Freescale TICS Team
Weidong.sun
OK, thank you for your high praise!
porting to android4.4.3 wil be arranged to be next work.
Regards,
weidong
hi sun,
I port the wm8960 code to android4.4.2, the wm8960 driver is ok,I can found the wm8960 sound card and can found the
controlC0
pcmC0D0c
pcmC0D0p
timer
in /dev/snd dir.
but that has some problem,the logcat is:
W/audio_hw_primary( 2281): card -1, port 0 device 0x400
W/audio_hw_primary( 2281): rate 44100, channel 2 period_size 0xc0
E/audio_hw_primary( 2281): cannot open pcm_out driver 1: cannot open device '/dev/snd/pcmC4294967295D0p': No such file or directory
W/audio_hw_primary( 2281): card -1, port 0 device 0x400
W/audio_hw_primary( 2281): rate 44100, channel 2 period_size 0xc0
E/audio_hw_primary( 2281): cannot open pcm_out driver 1: cannot open device '/dev/snd/pcmC4294967295D0p': No such file or directory
and can't hear anything on the headphone.
all are base on the document's guide.
can you give me some advise?
hi,sun!
Can you write a document introduce how to port the driver to android4.4.3/android5.0/yocto1.6.2?
Is there a plan?
Hi Wilson,
I am using WM8960 for my project, I added above modules(config_wm8960.h,wm8960.c,wm8960.h,imx-wm8960.c) , Working Fine.I can able to hear the audio. Thanks Weidong.sun.
Hi Zidan,
I want small info from you.I took sabresd reference, Audio COdec working fine( I can able to record & Listen audio),As per imx-wm8960(Machine drivers) routed Audio Codec(WM8960) to MIC(input1 ADC to store audio in Process) & Head_phone(Processor's DAC to output channel).
But As per my requirements i need to play Auxillory audio stream which connected to 2nd input channel & FM in 3rd input channel(Like below pic).
So how i can route(switch one input channel to other input channel) it in imx-wm8960.c file like below.
{ "Headphone Jack", NULL, "HP_L" },
{ "Headphone Jack", NULL, "HP_R" },
{ "Speaker_L", NULL, "SPK_LP" },
{ "Speaker_L", NULL, "SPK_LN" },
{ "Speaker_R", NULL, "SPK_RP" },
{ "Speaker_R", NULL, "SPK_RN" },
{ "LINPUT1", NULL, "MICB" },
{ "MICB", NULL, "Mic Jack" },
// { "LINPUT3", "LINPUT3 Switch", "HP_L" },
// { "RINPUT3", "RINPUT3 Switch", "HP_R" },
}
I am waiting for your reply. Thank you.
Hi,
It's not working on my platform. The only diffenent is i2c channel, othere are same.. does I lost something ?
------------------------------ parital log --------------------------------
usbcore: registered new interface driver snd-usb-audio
wm8960 i2C probe
wm8960 i2C probe sucessful
imx-hdmi-soc-dai: probe of imx-hdmi-soc-dai.0 failed with error -12
imx_wm8960_probe successful,MCLK is 24000000
wm8960 machine device add
ALSA device list:
No soundcards found.
oprofile: using arm/armv7-ca9
GACT probability NOT on
Mirror/redirect action on
--------------------------------------------------------------------------
Please help me to check ... Thanks!
David5ICP
Hi wilson,
In our new BSP , wm8960 was supported. you can find it on i.MX6UL evk board.
Regards,
Weidong
Hi Jiang,
我當初的問題是 I2C channel 設定的問題, 因我的 i2c 與參考設計不同, 除在 board file 裡定義外, 在 driver 也須調整, 請見下述斜體字部分::
static struct snd_soc_dai_link imx_dai[] = {
{
.name = "HiFi",
.stream_name = "HiFi",
.codec_dai_name = "wm8960-hifi",
.codec_name = "wm8960.1-001a",
/* wm8960.1-001a代表的是用I2C1来控制codec,其I2C地址为0x1a;I2CX, X代表的是0,1,2,开始 */
.cpu_dai_name = "imx-ssi.1",
/*
* 代表的是同一个声卡中的第一个设备与SSI1相连;I2SX X代表0,1,2;ssi.1代表SSI1。
* IMX6中的SSI接口有3对可以接着路I2S;三路SSI可以每路SSI 单独作为一个声卡,
* 也可以是一个声卡包含多个设备;
*/
.platform_name = "imx-pcm-audio.1",
/* 代表的连接接口与SSI来对应,用哪路SSI,其后面的数字就是几。 */
.init = imx_wm8960_init,
.ops = &imx_hifi_ops,
},
};
出處 詳細可參考這篇 :: http://www.bkjia.com/Androidjc/972723.html
BR.
David Wu
hi sun,
new BSP ,the wm8960 for the i.MX6UL board is the sai interface,but the imx6q/dl/solo must use the ssi interface.
so the wm8960 is not supported in imx6q/dl/solo.
Do you have the plan to port the wm8960 to the imx6q/dl/solo in the new kernel bsp?
thanks