Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1713265

Re: [PATCH 2/9] ASoC: cygnus: Update bindings for audio clock changes

From Lori Hikichi <lori.hikichi@broadcom.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/9] ASoC: cygnus: Update bindings for audio clock changes
Date 2017-08-16 21:40 +0200
Message-ID <ufcky-2IV-19@gated-at.bofh.it> (permalink)
References <uevIC-1jj-3@gated-at.bofh.it> <uevIC-1jj-13@gated-at.bofh.it> <ueNFx-48q-47@gated-at.bofh.it> <uePHk-5pa-13@gated-at.bofh.it> <uf4n0-6hS-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 8/16/2017 3:59 AM, Mark Brown wrote:
> On Tue, Aug 15, 2017 at 12:29:44PM -0700, Lori Hikichi wrote:
>
>> I have put the mux assignment in DT because the assignment is a
>> static property and did not need run time programmability from the
>> machine driver.
> Why is this a static property, what prevents something wanting to change
> things at runtime?  You might be running with simpler setups now but
> perhaps you'll run into a more complex use case later?
The short answer is I have analyzed the possible use cases for Cygnus'
audio block, and nothing should need to change the assignments at
runtime.  The longer explanation follows.

The clocking configuration is this. There is one pll with its output run
through 3 post dividers. The audio ports can select one of these
outputs.  There are only 5 possible consumers of these 3 clocks.
The 3 i2s/tdm ports, 1 spdif port, and an exceptional case of another
"non-audio" IP block. For the i2s/tdm ports this clock is the MCLK.

By far the most common usage case for Cygnus is a configuration which
uses only the three i2s/tdm ports. In this case each port is assigned
a clock.  Each clock has the same capabilities so there would never be
a reason change the static mapping.

Now for the case when the "non-audio block" uses one of these clocks.
In this situation we will only need one i2s port because this
configuration of the chip is not audio intensive.  When the system
is designed we know if this non-audio block will be in use, it is not
a runtime configurable thing. Again, a static mapping is fine.

The only situation which could get more complex is with SPDIF.
First off, the SPDIF port is not actively used in any current
configuration and I do not think there are any plans for it to be used.
But, we are talking about possible future configurations.  The only
limitation the current static scheme would introduce is if SPDIF is
active along with all 3 i2s ports. Additionally, all 3 of the i2s ports
would need to be in master mode (slave mode would free up a clock for
SPDIF). In this case, two of the clock consumers would need to share a
clock. In this situation I envisioned that both consumers would agree on
a fixed rate and work within those limitation.  For example, the ports
would choose 24.576 MHz as their mclk and be limited to the the frame
rates that could be derived from that clock. 

At the time it did not seem necessary to make addition driver changes to
support a use case that will very likely never arise. As it turns out,
we are working on a new version of this audio block.  The clocking
configuration for this new version is more complex and I am already in
the process of creating clock bindings for all this this. I am hopeful
that the driver for this new version will be applicable to Cygnus.

Lori.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/9] ASoC: cygnus: Various improvements and fixes Lori Hikichi <lori.hikichi@broadcom.com> - 2017-08-15 00:10 +0200
  [PATCH 4/9] ASoC: cygnus: Only enable MCLK pins when in use Lori Hikichi <lori.hikichi@broadcom.com> - 2017-08-15 00:10 +0200
  [PATCH 2/9] ASoC: cygnus: Update bindings for audio clock changes Lori Hikichi <lori.hikichi@broadcom.com> - 2017-08-15 00:10 +0200
    Re: [PATCH 2/9] ASoC: cygnus: Update bindings for audio clock changes Mark Brown <broonie@kernel.org> - 2017-08-15 19:20 +0200
      Re: [PATCH 2/9] ASoC: cygnus: Update bindings for audio clock changes Lori Hikichi <lori.hikichi@broadcom.com> - 2017-08-15 21:30 +0200
        Re: [PATCH 2/9] ASoC: cygnus: Update bindings for audio clock changes Mark Brown <broonie@kernel.org> - 2017-08-16 13:10 +0200
          Re: [PATCH 2/9] ASoC: cygnus: Update bindings for audio clock changes Lori Hikichi <lori.hikichi@broadcom.com> - 2017-08-16 21:40 +0200
            Re: [PATCH 2/9] ASoC: cygnus: Update bindings for audio clock changes Mark Brown <broonie@kernel.org> - 2017-08-22 18:10 +0200
  [PATCH 3/9] ASoC: cygnus: Allow each port to select its clock source Lori Hikichi <lori.hikichi@broadcom.com> - 2017-08-15 00:10 +0200
  [PATCH 7/9] ASoC: cygnus: Remove set_fmt from SPDIF dai ops Lori Hikichi <lori.hikichi@broadcom.com> - 2017-08-15 00:10 +0200
  [PATCH 9/9] ASoC: cygnus: Tidy up of structure access Lori Hikichi <lori.hikichi@broadcom.com> - 2017-08-15 00:10 +0200
  [PATCH 5/9] ASoC: cygnus: Remove support for 8 bit audio and for mono Lori Hikichi <lori.hikichi@broadcom.com> - 2017-08-15 00:10 +0200
  [PATCH 6/9] ASoc: cygnus: Fix problems with multichannel transfers Lori Hikichi <lori.hikichi@broadcom.com> - 2017-08-15 00:10 +0200
  [PATCH 8/9] ASoC: cygnus: Add EXPORT_SYMBOL for helper function Lori Hikichi <lori.hikichi@broadcom.com> - 2017-08-15 00:10 +0200
  [PATCH 1/9] ASoC: cygnus: Add support for 384kHz frame rates Lori Hikichi <lori.hikichi@broadcom.com> - 2017-08-15 00:10 +0200
    Applied "ASoC: cygnus: Add support for 384kHz frame rates" to the asoc tree Mark Brown <broonie@kernel.org> - 2017-08-15 19:20 +0200

csiph-web