alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
	alsa-devel@alsa-project.org, broonie@kernel.org
Subject: Re: [PATCH] ASoC: fsl-asoc-card: Allow to describe master or slave mode
Date: Sun, 21 Sep 2014 23:10:30 -0700	[thread overview]
Message-ID: <20140922061029.GA5124@Asurada> (raw)
In-Reply-To: <1411360854-16891-1-git-send-email-festevam@gmail.com>

Hi Fabio,

On Mon, Sep 22, 2014 at 01:40:54AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Provide a mechanism to describe whether the system runs in master or slave mode.
> 
> In order to keep compatibilty with existing dtb's let slave mode be default one.
> 
> Tested on a imx6q-sabresd board in both modes.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  Documentation/devicetree/bindings/sound/fsl-asoc-card.txt |  5 +++++
>  sound/soc/fsl/fsl-asoc-card.c                             | 15 ++++++++++++---
>  2 files changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> index a96774c..1bbc828 100644
> --- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> +++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> @@ -59,6 +59,10 @@ Optional properties:
>    - audio-asrc		: The phandle of ASRC. It can be absent if there's no
>  			  need to add ASRC support via DPCM.
>  
> +  - audio-cpu-mode	: The operating mode for the audio cpu interface.
> +			  "slave" - audio clock comes from the external codec
> +			  "master" -audio clock is generated from the audio cpu
> +

This could be a good idea to move the 'hardcode' into the DT binding
while maintaining the compatibility toward imx-sgtl5000 and imx-wm8962.
But at least, it still needs to separate the bit clock and frame sync
clock. Otherwise, the CBS_CFM and CBM_CFS cases will be expelled, as
AUDMUX part in the driver takes care of them even if they are pretty
rare.

And another question I's wondering myself: If they are really worth
adding. Because we may then need I2S/LEFT_J parsing code too while
we can't eradicate all the hard code such as pll_id and mclk_id. So
since the further compatible of the driver still needs some specific
configurations, why not just leave DAI formats configurations in the
driver as well -- So I didn't expect this driver will be enhanced to
become a Freescale Simple Card.


What do you think about it after seeing my idea.

One more thing: we may figure out a better and more explicit name,
rather than 'cpu-mode', if we decide to add DAI formats information
into DT.

Thank you
Nicolin

      parent reply	other threads:[~2014-09-22  6:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22  4:40 [PATCH] ASoC: fsl-asoc-card: Allow to describe master or slave mode Fabio Estevam
2014-09-22  5:44 ` Michael Trimarchi
2014-09-22  6:10 ` Nicolin Chen [this message]

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=20140922061029.GA5124@Asurada \
    --to=nicoleotsuka@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@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;
as well as URLs for NNTP newsgroup(s).