alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	kuninori.morimoto.gx@renesas.com, Xiubo Li <Xiubo.Lee@gmail.com>,
	Fabio Estevam <festevam@gmail.com>,
	Shengjiu Wang <shengjiu.wang@gmail.com>,
	Delio Brignoli <dbrignoli@audioscience.com>,
	Nicolin Chen <nicoleotsuka@gmail.com>,
	daniel.baluta@nxp.com, Linus Walleij <linus.walleij@linaro.org>
Subject: Re: ASoC: simple-card, fsl-sai, ak4458, imx-ak4458
Date: Wed, 20 Jan 2021 19:07:59 +0000	[thread overview]
Message-ID: <20210120190759.GH6794@sirena.org.uk> (raw)
In-Reply-To: <935820c1-0c96-6c85-26e7-ce0b741737dc@blennerhassett.gen.nz>

[-- Attachment #1: Type: text/plain, Size: 3204 bytes --]

On Wed, Jan 20, 2021 at 12:41:18PM +1300, Eliot Blennerhassett wrote:

It would be a bit easier to have one discussion per mail rather than
mixing several different topics in a single mail, you should also CC the
maintainers for the relevant drivers so they can comment on any issues
in their drivers.  I've copied in a bunch of people for the Freescale
drivers and gpiolib.

> 1) Reset polarity of ak4458.
> 
> When imx-ak4458 is used, the platform driver handles the codec reset
> specified in DT
> 	compatible = "fsl,imx-audio-ak4458";
> 	ak4458,pdn-gpio = <&gpio4 20 GPIO_ACTIVE_LOW>;
> 
> Used here. Afaics gpio_set_value sets the raw value given, ignoring the
> polarity specified by the DT?

This is supposed to be handled by gpiolib I thought, I don't know off
the top of my head if you need to convert the driver to use descriptors
rather than numbers for that to happen.  It's obviously not ideal if we
force all drivers to implement custom inversion logic.

> 2) Clock rate setting with simple-card
> 
> When simple-card is used and DT specifies mclk fs:
> 	simple-audio-card,mclk-fs = <256>;
> 
> asoc_simple_hw_params() calls snd_soc_dai_set_sysclk(..., clk_id=0, ...)
> 
> The hard-coded clk_id=0 doesn't work with fsl-sai, which requires clk_id==1.
> 
> For my testing purposes I changed the hard-coded value, but I think the
> proper solution could be to add a DT property to specify the clk_id
> (default=0) ?

That would make the clock an ABI.  If it's getting to the point of
needing to specify multiple clocks then we really should be looking at
using the clock bindings to specify which one to use, that's a bit
involved though.

> ------------------------------------------------------------------------
> 3) Memory mapped stream access by aplay does not work.
> This precludes use of alsa plugins e.g. dmix
> 
> I have found no reason or solution for this so far

In what way does it not work - what errors or other problems do you see?

> ------------------------------------------------------------------------
> 4) Unable to get multiple source clocks working with fsl-sai
> 
> With a single assigned-clock, switching between 48k and 44k1 clock rate
> families is accomplished by reparenting the root clock to the
> appropriate audio pll clock.
> 
> &sai2 {
> 	assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
> 	assigned-clocks        = <&clk IMX8MM_CLK_SAI2>;
> 	assigned-clock-rates   = <12288000>;
> 	...
> };
> 
> 
> 
> However if two of the sai mclks could be set to 48k and 44k1 derived
> rates respectively, the clock reparenting would not be required, and
> fsl_sai_set_bclk() would search the mclks and choose the appropriate
> mclk for the requested rate.
> 
> DT would be something like this:
> 
> &sai2 {
> 	assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>, <&clk
> IMX8MM_AUDIO_PLL2_OUT>;
> 	assigned-clocks        = <&clk IMX8MM_CLK_SAI2>,       <&clk
> IMX8MM_CLK_SAI1>;
> 	assigned-clock-rates   = <12288000>,                   <11289600>;
> };
> 
> This setup doesn't work as I hoped it would, don't know why not.
> 
> regards
> 
> -- 
> Eliot Blennerhassett
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-01-20 19:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19 23:41 ASoC: simple-card, fsl-sai, ak4458, imx-ak4458 Eliot Blennerhassett
2021-01-20 19:07 ` Mark Brown [this message]
2021-01-22  7:57   ` ASoC: ak4458 reset polarity Eliot Blennerhassett
2021-01-22  8:27     ` [PATCH] ASoC: ak4458: correct " Eliot Blennerhassett
2021-01-22 22:56       ` Linus Walleij
2021-01-25 14:17       ` Mark Brown

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=20210120190759.GH6794@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Xiubo.Lee@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=daniel.baluta@nxp.com \
    --cc=dbrignoli@audioscience.com \
    --cc=eliot@blennerhassett.gen.nz \
    --cc=festevam@gmail.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linus.walleij@linaro.org \
    --cc=nicoleotsuka@gmail.com \
    --cc=shengjiu.wang@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).