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

Nicolin Chen nicoleotsuka at gmail.com
Wed Mar 18 05:58:33 CET 2015


On Wed, Mar 18, 2015 at 12:48:24PM +0800, Shawn Embedded wrote:

> >> 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.
> 
>    If donot change it, what will happen to the working codec if the
> clock_enable is called caused by stopping the other codec? the working
> codec will not be affected?

Before stopping, the other one has been opened once. So the reference
count is 2 when the second clock_enable(); the clock_disable() that
you worry about only decreases the count.

>    But let me paste a snippet of code here, for two codecs on board,
> do'not you think it's necessary to setup 2 structure imx_priv to track
> the two codecs respectively?

You can try whatever you think it's right. A better solution should be
to modify the driver to get rid of that hard code. So there's no need
to add any of structure in the imx-wm8962.c but only to register an
extra platform driver in board level file.


More information about the Alsa-devel mailing list