From: Judy Hsiao <judyhsiao@chromium.org>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Douglas Anderson <dianders@chromium.org>,
Dylan Reid <dgreid@chromium.org>,
Jimmy Cheng-Yi Chiang <cychiang@google.com>,
Judy Hsiao <judyhsiao@google.com>,
Tzung-Bi Shih <tzungbi@chromium.org>,
Stephen Boyd <swboyd@chromium.org>,
linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: snd-soc-dummy: add Device Tree support
Date: Wed, 23 Jun 2021 22:29:15 +0800 [thread overview]
Message-ID: <CAJXt+b_15SEFW9ztg=CaYHfVJk-q+u46eLVgdPm+2ugjwajc1g@mail.gmail.com> (raw)
In-Reply-To: <20210622162307.GF4574@sirena.org.uk>
On Wed, Jun 23, 2021 at 12:23 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Wed, Jun 23, 2021 at 12:10:53AM +0800, Judy Hsiao wrote:
>
> > Thanks for your review comment.
> > This patch is used to support multi-channel where we want one codec to
> > control the only GPIO shared by 4 amps.
>
> So you've got 4 instances of the same CODEC? Then I'd expect to see
> those all individually represented in DT. Or if there's a single
> physical CODEC then I'm not sure what the dummies are for?
>
> > In snd_soc_runtime_calc_hw(), by creating dummy codecs that share a
> > DAI link with a real codec:
> > 1. The min/ max channel of CPU DAI will be directly adopted.
> > 2. The formats and sample rates of the DAI link will be determined
> > by the real codec unless the real codec supports the rate
> > and format that do not intersect with the rate and format of
> > snd-soc-dummy.
> > That is the reason why we don’t specify the format and sample rates of
> > the dummy codec with the real codec determining the properties .
>
> It's not clear to me why you'd not just describe the actual CODECs here
> rather than using a dummy CODEC, the fact that the dummy CODEC is doing
> what you want is just an accident of the implementation rather than a
> description of the hardware.
Thanks for your inputs. Specifying four codes for the multi-channel works fine.
We have not thought of specifying four codes before as we want to avoid loading
the codec driver multiple times, but actually loading the
snd-soc-dummy just has the
similar cost. By specifying four codes, the dtsi file describes the
real hardware schematic.
I will specify four codec in the dtsi file to support the four channel
use case and this
snd-soc-dummy patch is not needed. Thanks for the discussion!
prev parent reply other threads:[~2021-06-23 14:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 7:41 [PATCH] ASoC: snd-soc-dummy: add Device Tree support Judy Hsiao
2021-06-21 11:45 ` Mark Brown
2021-06-22 16:10 ` Judy Hsiao
2021-06-22 16:23 ` Mark Brown
2021-06-23 14:29 ` Judy Hsiao [this message]
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='CAJXt+b_15SEFW9ztg=CaYHfVJk-q+u46eLVgdPm+2ugjwajc1g@mail.gmail.com' \
--to=judyhsiao@chromium.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cychiang@google.com \
--cc=devicetree@vger.kernel.org \
--cc=dgreid@chromium.org \
--cc=dianders@chromium.org \
--cc=judyhsiao@google.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=swboyd@chromium.org \
--cc=tiwai@suse.com \
--cc=tzungbi@chromium.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;
as well as URLs for NNTP newsgroup(s).