Porting WM8960 to Android jb4.2.2

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Porting WM8960 to Android jb4.2.2

Porting WM8960 to Android jb4.2.2

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

ラベル(5)
添付
コメント

This document is so wonderful!But Can you write a document introduce how to port the driver to android4.4.3?

OK, thank you for your high praise!

porting to android4.4.3 wil be arranged to be next work.

Regards,

weidong

looking forward to your new document!

Thandks

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.

static const struct snd_soc_dapm_route imx6_audio_map[] = {

    { "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.

Screenshot from 2016-02-16 11_33_32.png

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

请问,您的问题解决了吗?我也遇到了类似问题,ALSA device list:里找不到wm8960。若已经解决,介意告诉我解决方法吗?

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

非常感谢!在您的帮助下,wm8960终于被识别了。

只是似乎和hdmi有些冲突,在设置-》声音-》音量中修改音量时,偶尔会导致黑屏(hdmi接口的显示器)。而且声音播放也不正常。不知您是否遇到了类似问题?

你好,在David Wu的帮助下,wm8960终于被识别了。但是似乎和hdmi有些冲突,在设置-》声音-》音量中修改音量时,偶尔会导致黑屏(hdmi接口的显示器)。而且声音播放也不正常。这大概是哪里的问题?有解决的办法吗?

Hi Jiang,

 我是沒有碰到你說的現象.. 但有發生開機時 HDMI 異常而造成 I2C 無法讀取 (我的 HDMI 與 Wm8960 接同一組 i2c).. .. 因為 我量了 i2c 發現是被  HDMI 拉到 low .. 以致同一 i2c channel 上的 devices 都不能用.. 我沒有繼續追查... 因我預計這是解不了了 (HDMI 本身造成)... 最後我把他們兩組分開了 ~

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

評価なし
バージョン履歴
最終更新日:
‎08-12-2015 11:14 PM
更新者: