All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@google.com>
To: Rob Herring <robh@kernel.org>
Cc: Gwendal Grignou <gwendal@google.com>,
	devicetree@vger.kernel.org,
	ALSA development <alsa-devel@alsa-project.org>,
	Jimmy Cheng-Yi Chiang <cychiang@google.com>,
	Nicolas Boichat <drinkcat@google.com>,
	Mark Brown <broonie@kernel.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Benson Leung <bleung@google.com>, Dylan Reid <dgreid@google.com>
Subject: Re: [PATCH v2 09/10] ASoC: dt-bindings: mt8183: add ec-codec
Date: Sat, 12 Oct 2019 23:15:22 +0800	[thread overview]
Message-ID: <CA+Px+wWRSyL4fHg_9VE1xu5ToP7dG+o+ooVKj3ucp8rB9Td_kw@mail.gmail.com> (raw)
In-Reply-To: <20191011152029.GA18877@bogus>

On Fri, Oct 11, 2019 at 11:20 PM Rob Herring <robh@kernel.org> wrote:
>
> On Sat, Oct 05, 2019 at 04:55:08PM +0800, Tzung-Bi Shih wrote:
> > Add an optional property "ec-codec".  If specified, mt8183 could use the
> > "wake on voice" feature offered by EC codec.
> >
> > Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
> > ---
> >  .../bindings/sound/mt8183-mt6358-ts3a227-max98357.txt          | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt b/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt
> > index 17ff3892f439..decaa013a07e 100644
> > --- a/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt
> > +++ b/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt
> > @@ -6,12 +6,15 @@ Required properties:
> >
> >  Optional properties:
> >  - mediatek,headset-codec: the phandles of ts3a227 codecs
> > +- mediatek,ec-codec: the phandle of EC codecs.
> > +                     See google,cros-ec-codec.txt for more details.
>
> Not the best designed audio binding here. We really should just have
> links to codecs and then you can look at the codec nodes to determine
> the type.

Did you mean: we should use an "audio-codec" array.  In the machine
driver, we should maintain a table of correspondence of compatible
string and the related context.  And use of_device_is_compatible( ) to
determine their types?  Something similar to
https://elixir.bootlin.com/linux/v5.3.5/source/sound/soc/rockchip/rk3399_gru_sound.c#L436

>
> >
> >  Example:
> >
> >       sound {
> >               compatible = "mediatek,mt8183_mt6358_ts3a227_max98357";
>
> Don't you need to add EC codec to this? Just kidding. Just highlighting
> the weirdness of this binding.

Could you explain some?  I cannot understand the "weird" here.  I
thought add the property "mediatek,ec-codec" could be enough.
Or did you mean: the compatible string should reflect the EC codec presence?

>
> >               mediatek,headset-codec = <&ts3a227>;
> > +             mediatek,ec-codec = <&ec_codec>;
> >               mediatek,platform = <&afe>;
> >       };
> >
> > --
> > 2.23.0.581.g78d2f28ef7-goog
> >

WARNING: multiple messages have this Message-ID (diff)
From: Tzung-Bi Shih <tzungbi@google.com>
To: Rob Herring <robh@kernel.org>
Cc: Gwendal Grignou <gwendal@google.com>,
	devicetree@vger.kernel.org,
	ALSA development <alsa-devel@alsa-project.org>,
	Jimmy Cheng-Yi Chiang <cychiang@google.com>,
	Nicolas Boichat <drinkcat@google.com>,
	Mark Brown <broonie@kernel.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Benson Leung <bleung@google.com>, Dylan Reid <dgreid@google.com>
Subject: Re: [alsa-devel] [PATCH v2 09/10] ASoC: dt-bindings: mt8183: add ec-codec
Date: Sat, 12 Oct 2019 23:15:22 +0800	[thread overview]
Message-ID: <CA+Px+wWRSyL4fHg_9VE1xu5ToP7dG+o+ooVKj3ucp8rB9Td_kw@mail.gmail.com> (raw)
In-Reply-To: <20191011152029.GA18877@bogus>

On Fri, Oct 11, 2019 at 11:20 PM Rob Herring <robh@kernel.org> wrote:
>
> On Sat, Oct 05, 2019 at 04:55:08PM +0800, Tzung-Bi Shih wrote:
> > Add an optional property "ec-codec".  If specified, mt8183 could use the
> > "wake on voice" feature offered by EC codec.
> >
> > Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
> > ---
> >  .../bindings/sound/mt8183-mt6358-ts3a227-max98357.txt          | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt b/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt
> > index 17ff3892f439..decaa013a07e 100644
> > --- a/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt
> > +++ b/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt
> > @@ -6,12 +6,15 @@ Required properties:
> >
> >  Optional properties:
> >  - mediatek,headset-codec: the phandles of ts3a227 codecs
> > +- mediatek,ec-codec: the phandle of EC codecs.
> > +                     See google,cros-ec-codec.txt for more details.
>
> Not the best designed audio binding here. We really should just have
> links to codecs and then you can look at the codec nodes to determine
> the type.

Did you mean: we should use an "audio-codec" array.  In the machine
driver, we should maintain a table of correspondence of compatible
string and the related context.  And use of_device_is_compatible( ) to
determine their types?  Something similar to
https://elixir.bootlin.com/linux/v5.3.5/source/sound/soc/rockchip/rk3399_gru_sound.c#L436

>
> >
> >  Example:
> >
> >       sound {
> >               compatible = "mediatek,mt8183_mt6358_ts3a227_max98357";
>
> Don't you need to add EC codec to this? Just kidding. Just highlighting
> the weirdness of this binding.

Could you explain some?  I cannot understand the "weird" here.  I
thought add the property "mediatek,ec-codec" could be enough.
Or did you mean: the compatible string should reflect the EC codec presence?

>
> >               mediatek,headset-codec = <&ts3a227>;
> > +             mediatek,ec-codec = <&ec_codec>;
> >               mediatek,platform = <&afe>;
> >       };
> >
> > --
> > 2.23.0.581.g78d2f28ef7-goog
> >
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2019-10-12 15:15 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-05  8:54 [PATCH v2 00/10] ASoC: mediatek: mt8183-mt6358-ts3a227-max98357: support WoV Tzung-Bi Shih
2019-10-05  8:54 ` [alsa-devel] " Tzung-Bi Shih
2019-10-05  8:55 ` [PATCH v2 01/10] platform/chrome: cros_ec: remove unused EC feature Tzung-Bi Shih
2019-10-05  8:55   ` [alsa-devel] " Tzung-Bi Shih
2019-10-05  8:55 ` [PATCH v2 02/10] ASoC: cros_ec_codec: refactor I2S RX Tzung-Bi Shih
2019-10-05  8:55   ` [alsa-devel] " Tzung-Bi Shih
2019-10-05  8:55 ` [PATCH v2 03/10] ASoC: cros_ec_codec: extract DMIC EC command from " Tzung-Bi Shih
2019-10-05  8:55   ` [alsa-devel] " Tzung-Bi Shih
2019-10-05  8:55 ` [PATCH v2 04/10] platform/chrome: cros_ec: add common commands for EC codec Tzung-Bi Shih
2019-10-05  8:55   ` [alsa-devel] " Tzung-Bi Shih
2019-10-05  8:55 ` [PATCH v2 05/10] ASoC: cros_ec_codec: read max DMIC gain from " Tzung-Bi Shih
2019-10-05  8:55   ` [alsa-devel] " Tzung-Bi Shih
2019-10-11 15:14   ` Rob Herring
2019-10-11 15:14     ` [alsa-devel] " Rob Herring
2019-10-05  8:55 ` [PATCH v2 06/10] ASoC: dt-bindings: cros_ec_codec: add SHM bindings Tzung-Bi Shih
2019-10-05  8:55   ` [alsa-devel] " Tzung-Bi Shih
2019-10-11 15:13   ` Rob Herring
2019-10-11 15:13     ` [alsa-devel] " Rob Herring
2019-10-05  8:55 ` [PATCH v2 07/10] ASoC: cros_ec_codec: support WoV Tzung-Bi Shih
2019-10-05  8:55   ` [alsa-devel] " Tzung-Bi Shih
2019-10-05 16:53   ` kbuild test robot
2019-10-05 16:53     ` [alsa-devel] " kbuild test robot
2019-10-05 16:53     ` kbuild test robot
2019-10-07  7:04     ` Tzung-Bi Shih
2019-10-07  7:04       ` [alsa-devel] " Tzung-Bi Shih
2019-10-07  7:04       ` Tzung-Bi Shih
2019-10-09  7:25       ` [kbuild-all] " Rong Chen
2019-10-09  7:28         ` [alsa-devel] " Rong Chen
2019-10-09  7:25         ` [alsa-devel] [kbuild-all] " Rong Chen
2019-10-14 10:26         ` Tzung-Bi Shih
2019-10-14 10:26           ` [alsa-devel] " Tzung-Bi Shih
2019-10-14 10:26           ` [alsa-devel] [kbuild-all] " Tzung-Bi Shih
2019-10-05  8:55 ` [PATCH v2 08/10] ASoC: mediatek: mt6358: " Tzung-Bi Shih
2019-10-05  8:55   ` [alsa-devel] " Tzung-Bi Shih
2019-10-05  8:55 ` [PATCH v2 09/10] ASoC: dt-bindings: mt8183: add ec-codec Tzung-Bi Shih
2019-10-05  8:55   ` [alsa-devel] " Tzung-Bi Shih
2019-10-11 15:20   ` Rob Herring
2019-10-11 15:20     ` [alsa-devel] " Rob Herring
2019-10-12 15:15     ` Tzung-Bi Shih [this message]
2019-10-12 15:15       ` Tzung-Bi Shih
2019-10-05  8:55 ` [PATCH v2 10/10] ASoC: mediatek: mt8183: support WoV Tzung-Bi Shih
2019-10-05  8:55   ` [alsa-devel] " Tzung-Bi Shih

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=CA+Px+wWRSyL4fHg_9VE1xu5ToP7dG+o+ooVKj3ucp8rB9Td_kw@mail.gmail.com \
    --to=tzungbi@google.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bleung@google.com \
    --cc=broonie@kernel.org \
    --cc=cychiang@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dgreid@google.com \
    --cc=drinkcat@google.com \
    --cc=enric.balletbo@collabora.com \
    --cc=gwendal@google.com \
    --cc=robh@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.