[alsa-devel] Support two wm8962 codec in i.mx6 board.

Nicolin Chen nicoleotsuka at gmail.com
Wed Mar 18 02:33:01 CET 2015


On Wed, Mar 18, 2015 at 09:12:19AM +0800, Shawn Embedded wrote:

>    Yes, it's and old version, without support of device tree.
>    For AUDMUX configuration, is the code below enough, snippet 1 and 2?

I think so.

>     And here I have another question about clock source sharing
> between the two codecs.
>     The two wm8962 codecs use the same clock source from imx6, in my
> case, clko, as the code mentioned below,

> Since the two codecs share the same clock source, clko, and we donot
> know when mxc_wm8962_init() and wm8962_clk_enable() will be called by
> using the function pointer exactly, do you think it's necessary to
> make NULL to init, make wm8962_clk_enable_do_nothing to clock_enable,
> and manually calling mxc_wm8962_init() and wm8962_clk_enable() in the
> xxx_board_init() function instead?

I don't think you need to change this part.

> 2. In imx-wm8962.c:
> 
> static int __devinit imx_wm8962_probe(struct platform_device *pdev)
> {
>     ....
>     imx_audmux_config(src, ext);    // should keep the same, not need
> to change, right?
>     ....
> }

No, you don't need to.
 
>   But there is a question here.
>   How should I track the  card_priv and its copy for the two codecs repectively.
>   They are used heavily.
>    In order to make the functions run without problems, seems
> necessary to differentiate the function call is for which codec of the
> two, right?
>   The same situation may exist for other just copied global variables
> in imx-wm8962.c.

Each dai-link will create an individual sound card during system
boot-up. Use 'aplay -l', you will see they are different devices.



More information about the Alsa-devel mailing list