[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56AA2301.9070604@imgtec.com>
Date: Thu, 28 Jan 2016 14:17:37 +0000
From: Damien Horsley <Damien.Horsley@...tec.com>
To: Mark Brown <broonie@...nel.org>
CC: <alsa-devel@...a-project.org>, Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
James Hartley <james.hartley@...tec.com>
Subject: Re: [RFC V2 1/2] ASoC: img: Add binding document for Pistachio audio
card
On 27/01/16 20:14, Mark Brown wrote:
> On Wed, Jan 27, 2016 at 05:13:09PM +0000, Damien Horsley wrote:
>
>> audio_pll is referenced exclusively by the card device
>
> That one *may* be plausible.
>
>> i2s_mclk and dac_mclk can also be referenced by other devices. The i2s
>> out controller references i2s_mclk, and codec devices can reference
>> i2s_mclk/dac_mclk dependent on their system clock requirements
>
> The clock API copes perfectly happily with this.
>
>> without a reference to i2s_mclk and dac_mclk in the card driver, it
>> would not be possible to control the divisors and gates for these clocks
>> in the following cases:
>
>> Simplistic codecs that do not have drivers
>
>> Codec drivers that do not call clk_set_rate and clk_enable/clk_disable
>
> Nonsense, if there is no driver or the driver doesn't do what you want
> then fix that. Don't bodge things at the wrong abstraction layer, that
> just creates problems later on when someone comes along and does things
> properly or tries to use the device tree outside of your particular
> implementation (eg, when working with a differnet OS).
>
Okay. If it can be expected that the codec driver will call these then
the references will not be required in the card driver for the codecs.
The i2s out controller also uses i2s_mclk, and calls clk_set_rate in
hw_params at present. Would creating a set_sysclk callback for the i2s
out controller, then calling snd_soc_dai_set_sysclk on the cpu dai in
addition to the codec dais in the card driver be the correct way to
manage this?
Powered by blists - more mailing lists