Lines Matching +full:mt7986 +full:- +full:wm8960 +full:- +full:sound
1 // SPDX-License-Identifier: GPL-2.0
3 * mt7986-wm8960.c -- MT7986-WM8960 ALSA SoC machine driver
11 #include <sound/soc.h>
13 #include "mt7986-afe-common.h"
37 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8960-hifi")),
43 .name = "wm8960-playback",
44 .stream_name = "wm8960-playback",
52 .name = "wm8960-capture",
53 .stream_name = "wm8960-capture",
62 .name = "wm8960-codec",
75 .name = "mt7986-wm8960",
93 card->dev = &pdev->dev; in mt7986_wm8960_machine_probe()
95 platform = of_get_child_by_name(pdev->dev.of_node, "platform"); in mt7986_wm8960_machine_probe()
98 platform_dai_node = of_parse_phandle(platform, "sound-dai", 0); in mt7986_wm8960_machine_probe()
102 dev_err(&pdev->dev, "Failed to parse platform/sound-dai property\n"); in mt7986_wm8960_machine_probe()
103 return -EINVAL; in mt7986_wm8960_machine_probe()
106 dev_err(&pdev->dev, "Property 'platform' missing or invalid\n"); in mt7986_wm8960_machine_probe()
107 return -EINVAL; in mt7986_wm8960_machine_probe()
111 if (dai_link->platforms->name) in mt7986_wm8960_machine_probe()
113 dai_link->platforms->of_node = platform_dai_node; in mt7986_wm8960_machine_probe()
116 codec = of_get_child_by_name(pdev->dev.of_node, "codec"); in mt7986_wm8960_machine_probe()
119 codec_dai_node = of_parse_phandle(codec, "sound-dai", 0); in mt7986_wm8960_machine_probe()
124 dev_err(&pdev->dev, "Failed to parse codec/sound-dai property\n"); in mt7986_wm8960_machine_probe()
125 return -EINVAL; in mt7986_wm8960_machine_probe()
129 dev_err(&pdev->dev, "Property 'codec' missing or invalid\n"); in mt7986_wm8960_machine_probe()
130 return -EINVAL; in mt7986_wm8960_machine_probe()
134 if (dai_link->codecs->name) in mt7986_wm8960_machine_probe()
136 dai_link->codecs->of_node = codec_dai_node; in mt7986_wm8960_machine_probe()
139 ret = snd_soc_of_parse_audio_routing(card, "audio-routing"); in mt7986_wm8960_machine_probe()
141 dev_err(&pdev->dev, "Failed to parse audio-routing: %d\n", ret); in mt7986_wm8960_machine_probe()
145 ret = devm_snd_soc_register_card(&pdev->dev, card); in mt7986_wm8960_machine_probe()
147 dev_err_probe(&pdev->dev, ret, "%s snd_soc_register_card fail\n", __func__); in mt7986_wm8960_machine_probe()
158 {.compatible = "mediatek,mt7986-wm8960-sound"},
165 .name = "mt7986-wm8960",
174 MODULE_DESCRIPTION("MT7986 WM8960 ALSA SoC machine driver");
177 MODULE_ALIAS("mt7986 wm8960 soc card");