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

Shawn Embedded programassem at gmail.com
Wed Mar 18 06:10:49 CET 2015


On Wed, Mar 18, 2015 at 12:58 PM, Nicolin Chen <nicoleotsuka at gmail.com> wrote:
> 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.

   yes, right.

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

   Ok, I understand.
   Maybe I'll patch it later.
   Thanks a lot for your big help.


Best Regards,
Shawn


More information about the Alsa-devel mailing list