Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Shawn Embedded <programassem@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Support two wm8962 codec in i.mx6 board.
Date: Tue, 17 Mar 2015 21:58:33 -0700	[thread overview]
Message-ID: <20150318045832.GA5380@Asurada> (raw)
In-Reply-To: <CAOaGyfUWROtRSfYf5JLbSWqJMUbqmEpyDE6SuELkcvZ2SHidJw@mail.gmail.com>

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.

  reply	other threads:[~2015-03-18  4:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16  7:30 Support two wm8962 codec in i.mx6 board Shawn Embedded
2015-03-17  0:55 ` Nicolin Chen
2015-03-17  1:51   ` Shawn Embedded
2015-03-17 18:00     ` Nicolin Chen
2015-03-18  1:12       ` Shawn Embedded
2015-03-18  1:33         ` Nicolin Chen
2015-03-18  4:48           ` Shawn Embedded
2015-03-18  4:58             ` Nicolin Chen [this message]
2015-03-18  5:10               ` Shawn Embedded

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150318045832.GA5380@Asurada \
    --to=nicoleotsuka@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=programassem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox