From: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: broonie@kernel.org, lgirdwood@gmail.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, perex@perex.cz,
tiwai@suse.com, alsa-devel@alsa-project.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] ASoC: simple-card: Support custom DAI system clock IDs
Date: Mon, 24 Oct 2022 10:18:15 +0100 [thread overview]
Message-ID: <MXQXY4d7ZMjCu1ChI1EL7daeg1zENP5H@localhost> (raw)
In-Reply-To: <87fsfem6zd.wl-kuninori.morimoto.gx@renesas.com>
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> writes:
> Hi Aidan
>
> Thank you for your patch
>
>> Some DAIs have multiple system clock sources, which can be chosen
>> using the "clk_id" argument to snd_soc_dai_set_sysclk(). Currently
>> this is hardcoded to 0 when using simple cards, but that choice is
>> not always suitable.
>>
>> Add the "system-clock-id" property to allow selecting a different
>> clock ID on a per-DAI basis.
>>
>> To simplify the logic on DPCM cards, add a dummy "asoc_simple_dai"
>> instance and use that for the dummy components on DPCM links. This
>> ensures that when we're iterating over DAIs in the PCM runtime there
>> is always a matching "asoc_simple_dai" we can dereference.
>>
>> Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
>> ---
>
> I think adding "system-clock-id" and adding "dummy asoc_simple_dai" are
> different topics. This patch should be separated into 2 patches.
Sounds good to me.
> And I couldn't understand the reason why we need to add dummy asoc_simple_dai.
> In my understanding, we don't parse DT for dummy connection.
> Which process are you talking about specifically here?
>
> This ensures that when we're iterating over DAIs in the PCM runtime there
> is always a matching "asoc_simple_dai" we can dereference.
> -
> Thank you for your help !!
>
> Best regards
> ---
> Kuninori Morimoto
DPCM DAI links have some real DAIs and one dummy DAI. Each real DAI has
an asoc_simple_dai associated with it to contain the information parsed
from the DT. The dummy DAI does not have an asoc_simple_dai. I'm adding
a dummy asoc_simple_dai for these dummy DAIs to make the mapping of
snd_soc_dai to asoc_simple_dai 1-to-1.
The non 1-to-1 mapping is problematic, because if I have a snd_soc_dai
and want to look up a simple-card property I would need to check if the
matching asoc_simple_dai exists first, and have a special case for DPCM
dummy DAIs. With a 1-to-1 mapping I can handle all DAIs the same way.
Regards,
Aidan
next prev parent reply other threads:[~2022-10-25 0:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-22 16:27 [PATCH v1 1/2] ASoC: simple-card: Support custom DAI system clock IDs Aidan MacDonald
2022-10-22 16:27 ` [PATCH v1 2/2] dt-bindings: ASoC: simple-card: Add system-clock-id property Aidan MacDonald
2022-10-23 13:08 ` Krzysztof Kozlowski
2022-10-23 13:47 ` Aidan MacDonald
2022-10-24 20:46 ` Krzysztof Kozlowski
2022-10-24 23:38 ` Aidan MacDonald
2022-10-25 0:00 ` Krzysztof Kozlowski
2022-10-25 9:14 ` Aidan MacDonald
2022-10-25 12:19 ` Krzysztof Kozlowski
2022-10-26 14:48 ` Aidan MacDonald
2022-10-26 15:03 ` Krzysztof Kozlowski
2022-10-26 19:27 ` Aidan MacDonald
2022-10-26 15:05 ` Krzysztof Kozlowski
2022-10-23 23:54 ` [PATCH v1 1/2] ASoC: simple-card: Support custom DAI system clock IDs Kuninori Morimoto
2022-10-24 9:18 ` Aidan MacDonald [this message]
2022-10-24 11:49 ` Mark Brown
2022-10-24 23:17 ` Aidan MacDonald
2022-10-25 11:03 ` Mark Brown
2022-10-26 14:42 ` Aidan MacDonald
2022-10-26 15:11 ` Mark Brown
2022-10-26 19:22 ` Aidan MacDonald
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=MXQXY4d7ZMjCu1ChI1EL7daeg1zENP5H@localhost \
--to=aidanmacdonald.0x0@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.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