summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTzung-Bi Shih <tzungbi@google.com>2019-07-16 05:24:17 +0200
committerMark Brown <broonie@kernel.org>2019-07-22 14:26:12 +0200
commita962a809e5e45715081fa247726a562b8dbd082a (patch)
tree2b6545d43c2be1e1dd87c4763c8b8497825dc7f4 /sound
parentASoC: wcd9335: add irqflag IRQF_ONESHOT flag (diff)
downloadlinux-a962a809e5e45715081fa247726a562b8dbd082a.tar.xz
linux-a962a809e5e45715081fa247726a562b8dbd082a.zip
ASoC: mediatek: mt8183: make headset codec optional
Make headset codec optional because some variant machines may not have an audio jack. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20190716032417.19015-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index 887c932229d0..4c816c86844b 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -352,8 +352,6 @@ static struct snd_soc_card mt8183_mt6358_ts3a227_max98357_card = {
.owner = THIS_MODULE,
.dai_link = mt8183_mt6358_ts3a227_max98357_dai_links,
.num_links = ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_dai_links),
- .aux_dev = &mt8183_mt6358_ts3a227_max98357_headset_dev,
- .num_aux_devs = 1,
};
static int
@@ -404,10 +402,9 @@ mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev)
mt8183_mt6358_ts3a227_max98357_headset_dev.codec_of_node =
of_parse_phandle(pdev->dev.of_node,
"mediatek,headset-codec", 0);
- if (!mt8183_mt6358_ts3a227_max98357_headset_dev.codec_of_node) {
- dev_err(&pdev->dev,
- "Property 'mediatek,headset-codec' missing/invalid\n");
- return -EINVAL;
+ if (mt8183_mt6358_ts3a227_max98357_headset_dev.codec_of_node) {
+ card->aux_dev = &mt8183_mt6358_ts3a227_max98357_headset_dev;
+ card->num_aux_devs = 1;
}
default_pins =