[alsa-devel] [PATCH 2/3] ASoC: simple-card: make sysclk index configurable
Daniel Mack
daniel at zonque.org
Tue May 29 06:34:52 CEST 2018
On Tuesday, May 29, 2018 03:35 AM, Kuninori Morimoto wrote:
>> The simple-card driver currently hard-codes the clk_id parameter in
>> snd_soc_dai_set_sysclk() to 0. Make this configrable for both CPU and
>> codec dai sub-nodes.
>>
>> This still has the limitation that only one clk_id can be configured, but it
>> should help some more platforms to use simple-card in favor to a more
>> specific machine driver.
>>
>> Signed-off-by: Daniel Mack <daniel at zonque.org>
>> ---
>> Documentation/devicetree/bindings/sound/simple-card.txt | 3 +++
>> include/sound/simple_card_utils.h | 1 +
>> sound/soc/generic/simple-card-utils.c | 3 +++
>> sound/soc/generic/simple-card.c | 10 ++++++----
>> 4 files changed, 13 insertions(+), 4 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
>> index a4c72d09cd45..c8d268285a9e 100644
>> --- a/Documentation/devicetree/bindings/sound/simple-card.txt
>> +++ b/Documentation/devicetree/bindings/sound/simple-card.txt
>> @@ -94,6 +94,9 @@ Optional CPU/CODEC subnodes properties:
>> - system-clock-direction-out : specifies clock direction as 'out' on
>> initialization. It is useful for some aCPUs with
>> fixed clocks.
>> +- system-clock-index : index of the system clock to use when
>> + the mclk frequency is on the CPU/CODEC
>> + DAI. Defaults to 0.
>
> I'm not a DT guy, but I think DT doesn't want to have index directly ?
> I don't know detail, but I guess DT want to have like
>
> system-mclock = <&xxxx 3>
Hmm, no. That index doesn't describe a particular output of a clock
phandle but an internal detail of the CPU or CODEC DAI on the other end.
Most DAIs will use 0 here, like your code had it before.
The DAI can be both a producer and a consumer of a clock, depending on
the audio clocking setup, and these details are not exposed in DT.
Thanks,
Daniel
More information about the Alsa-devel
mailing list