mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sameer Pujar <spujar@nvidia.com>
To: Rob Herring <robh@kernel.org>
Cc: Mark Brown <broonie@kernel.org>,
	Jon Hunter <jonathanh@nvidia.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	<devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 3/5] ASoC: audio-graph-card: Add bindings for sysclk and pll
Date: Tue, 2 Mar 2021 12:33:04 +0530	[thread overview]
Message-ID: <0ea5b885-2610-8f12-569d-15a8eff50c10@nvidia.com> (raw)
In-Reply-To: <CAL_Jsq+9esDGw7ZCLnZS_KLmLUFyVenz83ohgNKFK3bdPD2ouQ@mail.gmail.com>



On 3/2/2021 7:40 AM, Rob Herring wrote:
> External email: Use caution opening links or attachments
>
>
> On Thu, Feb 25, 2021 at 12:06 PM Sameer Pujar <spujar@nvidia.com> wrote:
>> ASoC core provides callbacks snd_soc_dai_set_sysclk() and
>> snd_soc_dai_set_pll() for system clock (sysclk) and pll configurations
>> respectively. Add bindings for flexible sysclk or pll configurations
>> which can be driven from CPU/Codec DAI or endpoint subnode from DT.
>> This in turn helps to avoid hard codings in driver and makes it more
>> generic.
>>
>> Also add system-clock related bindings, "system-clock-direction-out"
>> and "system-clock-frequency", which are already supported.
> This all looks like duplication of what the clock binding can provide.
> We don't need 2 ways to describe clocks in DT.

This was targetted for external audio codecs. Their internal clock 
management is not exposed with the clock framework. Instead ASoC 
provides callbacks to set this up on Codec side. There are many 
references where this is followed with some hardcoded settings in the 
drivers.

Are you suggesting to instead expose codec internal clocks and manage 
via generic clock bindings? Would this mean each codec driver has to 
implement these clock APIs (for ex: set_rate()) and program registers 
accordingly?
For a platform, different audio cards can be plugged in. In that case, 
each codec has to be updated to follow this. Wouldn't it be simpler to 
use available ASoC callbacks?

  reply	other threads:[~2021-03-02  8:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 18:05 [RFC PATCH 0/5] Flexible sysclk/pll configuration Sameer Pujar
2021-02-25 18:06 ` [RFC PATCH 1/5] ASoC: soc-component: Fix return value of snd_soc_component_set_pll() Sameer Pujar
2021-02-25 18:06 ` [RFC PATCH 2/5] ASoC: soc-dai: Add sysclk source to snd_soc_dai_set_sysclk() Sameer Pujar
2021-02-25 18:06 ` [RFC PATCH 3/5] ASoC: audio-graph-card: Add bindings for sysclk and pll Sameer Pujar
2021-03-02  2:10   ` Rob Herring
2021-03-02  7:03     ` Sameer Pujar [this message]
2021-03-02 16:12       ` Mark Brown
2021-02-25 18:06 ` [RFC PATCH 4/5] ASoC: simple-card-utils: Parse sysclk id and source Sameer Pujar
2021-02-25 18:06 ` [RFC PATCH 5/5] ASoC: simple-card-utils: Support pll configuration Sameer Pujar
2021-02-26  5:24 ` [RFC PATCH 0/5] Flexible sysclk/pll configuration Sameer Pujar

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=0ea5b885-2610-8f12-569d-15a8eff50c10@nvidia.com \
    --to=spujar@nvidia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /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

all inboxes | Powered by JetHome®