From: Tzung-Bi Shih <tzungbi@google.com>
To: broonie@kernel.org, robh+dt@kernel.org
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
tzungbi@google.com
Subject: [PATCH 5/6] ASoC: mediatek: mt8183-da7219: use hdmi-codec
Date: Fri, 10 Jul 2020 13:25:04 +0800 [thread overview]
Message-ID: <20200710052505.3664118-6-tzungbi@google.com> (raw)
In-Reply-To: <20200710052505.3664118-1-tzungbi@google.com>
Adds DAI link to use hdmi-codec.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
index bc551a4af25f..cbef4a538224 100644
--- a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
@@ -354,7 +354,7 @@ SND_SOC_DAILINK_DEFS(i2s5,
SND_SOC_DAILINK_DEFS(tdm,
DAILINK_COMP_ARRAY(COMP_CPU("TDM")),
- DAILINK_COMP_ARRAY(COMP_DUMMY()),
+ DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "i2s-hifi")),
DAILINK_COMP_ARRAY(COMP_EMPTY()));
static struct snd_soc_dai_link mt8183_da7219_dai_links[] = {
@@ -627,7 +627,7 @@ static struct snd_soc_card mt8183_da7219_rt1015_card = {
static int mt8183_da7219_max98357_dev_probe(struct platform_device *pdev)
{
struct snd_soc_card *card;
- struct device_node *platform_node;
+ struct device_node *platform_node, *hdmi_codec;
struct snd_soc_dai_link *dai_link;
struct mt8183_da7219_max98357_priv *priv;
struct pinctrl *pinctrl;
@@ -648,6 +648,9 @@ static int mt8183_da7219_max98357_dev_probe(struct platform_device *pdev)
card = (struct snd_soc_card *)match->data;
card->dev = &pdev->dev;
+ hdmi_codec = of_parse_phandle(pdev->dev.of_node,
+ "mediatek,hdmi-codec", 0);
+
for_each_card_prelinks(card, i, dai_link) {
if (strcmp(dai_link->name, "I2S3") == 0) {
if (card == &mt8183_da7219_max98357_card) {
@@ -679,6 +682,9 @@ static int mt8183_da7219_max98357_dev_probe(struct platform_device *pdev)
}
}
+ if (hdmi_codec && strcmp(dai_link->name, "TDM") == 0)
+ dai_link->codecs->of_node = hdmi_codec;
+
if (!dai_link->platforms->name)
dai_link->platforms->of_node = platform_node;
}
--
2.27.0.383.g050319c2ae-goog
next prev parent reply other threads:[~2020-07-10 5:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-10 5:24 [PATCH 0/6] ASoC: mediatek: mt8183: support DP audio Tzung-Bi Shih
2020-07-10 5:25 ` [PATCH 1/6] ASoC: dt-bindings: mt8183: add a property "mediatek, hdmi-codec" Tzung-Bi Shih
2020-07-10 5:25 ` [PATCH 2/6] ASoC: mediatek: mt8183: use hdmi-codec Tzung-Bi Shih
2020-07-10 5:25 ` [PATCH 3/6] ASoC: mediatek: mt8183: support HDMI jack reporting Tzung-Bi Shih
2020-07-10 5:25 ` [PATCH 4/6] ASoC: dt-bindings: mt8183-da7219: add a property "mediatek, hdmi-codec" Tzung-Bi Shih
2020-07-10 5:25 ` Tzung-Bi Shih [this message]
2020-07-10 5:25 ` [PATCH 6/6] ASoC: mediatek: mt8183-da7219: support HDMI jack reporting Tzung-Bi Shih
2020-07-10 15:39 ` [PATCH 0/6] ASoC: mediatek: mt8183: support DP audio Mark Brown
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=20200710052505.3664118-6-tzungbi@google.com \
--to=tzungbi@google.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh+dt@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 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).