summaryrefslogtreecommitdiffstats
path: root/sound/soc/mediatek
diff options
context:
space:
mode:
authorTzung-Bi Shih <tzungbi@google.com>2019-07-15 23:24:17 -0400
committerMark Brown <broonie@kernel.org>2019-07-22 08:26:12 -0400
commita962a809e5e45715081fa247726a562b8dbd082a (patch)
tree2b6545d43c2be1e1dd87c4763c8b8497825dc7f4 /sound/soc/mediatek
parentaf62a3c8a872631e63833e2a99a8f43f81532fae (diff)
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/soc/mediatek')
-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 = {
352 .owner = THIS_MODULE, 352 .owner = THIS_MODULE,
353 .dai_link = mt8183_mt6358_ts3a227_max98357_dai_links, 353 .dai_link = mt8183_mt6358_ts3a227_max98357_dai_links,
354 .num_links = ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_dai_links), 354 .num_links = ARRAY_SIZE(mt8183_mt6358_ts3a227_max98357_dai_links),
355 .aux_dev = &mt8183_mt6358_ts3a227_max98357_headset_dev,
356 .num_aux_devs = 1,
357}; 355};
358 356
359static int 357static int
@@ -404,10 +402,9 @@ mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev)
404 mt8183_mt6358_ts3a227_max98357_headset_dev.codec_of_node = 402 mt8183_mt6358_ts3a227_max98357_headset_dev.codec_of_node =
405 of_parse_phandle(pdev->dev.of_node, 403 of_parse_phandle(pdev->dev.of_node,
406 "mediatek,headset-codec", 0); 404 "mediatek,headset-codec", 0);
407 if (!mt8183_mt6358_ts3a227_max98357_headset_dev.codec_of_node) { 405 if (mt8183_mt6358_ts3a227_max98357_headset_dev.codec_of_node) {
408 dev_err(&pdev->dev, 406 card->aux_dev = &mt8183_mt6358_ts3a227_max98357_headset_dev;
409 "Property 'mediatek,headset-codec' missing/invalid\n"); 407 card->num_aux_devs = 1;
410 return -EINVAL;
411 } 408 }
412 409
413 default_pins = 410 default_pins =