Lines Matching +full:speaker +full:- +full:codecs
1 // SPDX-License-Identifier: GPL-2.0-only
17 #include "../codecs/wm8731.h"
23 struct snd_soc_card *card = rtd->card; in snd_proto_init()
30 dev_err(card->dev, "Failed to set WM8731 SYSCLK: %d\n", in snd_proto_init()
44 /* speaker connected to LHPOUT/RHPOUT */
67 struct device_node *np = pdev->dev.of_node; in snd_proto_probe()
75 dev_err(&pdev->dev, "No device node supplied\n"); in snd_proto_probe()
76 return -EINVAL; in snd_proto_probe()
79 snd_proto.dev = &pdev->dev; in snd_proto_probe()
84 dai = devm_kzalloc(&pdev->dev, sizeof(*dai), GFP_KERNEL); in snd_proto_probe()
86 return -ENOMEM; in snd_proto_probe()
88 /* for cpus/codecs/platforms */ in snd_proto_probe()
89 comp = devm_kzalloc(&pdev->dev, 3 * sizeof(*comp), GFP_KERNEL); in snd_proto_probe()
91 return -ENOMEM; in snd_proto_probe()
96 dai->cpus = &comp[0]; in snd_proto_probe()
97 dai->num_cpus = 1; in snd_proto_probe()
98 dai->codecs = &comp[1]; in snd_proto_probe()
99 dai->num_codecs = 1; in snd_proto_probe()
100 dai->platforms = &comp[2]; in snd_proto_probe()
101 dai->num_platforms = 1; in snd_proto_probe()
103 dai->name = "WM8731"; in snd_proto_probe()
104 dai->stream_name = "WM8731 HiFi"; in snd_proto_probe()
105 dai->codecs->dai_name = "wm8731-hifi"; in snd_proto_probe()
106 dai->init = &snd_proto_init; in snd_proto_probe()
108 codec_np = of_parse_phandle(np, "audio-codec", 0); in snd_proto_probe()
110 dev_err(&pdev->dev, "audio-codec node missing\n"); in snd_proto_probe()
111 return -EINVAL; in snd_proto_probe()
113 dai->codecs->of_node = codec_np; in snd_proto_probe()
115 cpu_np = of_parse_phandle(np, "i2s-controller", 0); in snd_proto_probe()
117 dev_err(&pdev->dev, "i2s-controller missing\n"); in snd_proto_probe()
118 ret = -EINVAL; in snd_proto_probe()
121 dai->cpus->of_node = cpu_np; in snd_proto_probe()
122 dai->platforms->of_node = cpu_np; in snd_proto_probe()
128 dev_err(&pdev->dev, "Must be the same bitclock and frame master\n"); in snd_proto_probe()
129 ret = -EINVAL; in snd_proto_probe()
142 dai->dai_fmt = dai_fmt; in snd_proto_probe()
143 ret = devm_snd_soc_register_card(&pdev->dev, &snd_proto); in snd_proto_probe()
145 dev_err_probe(&pdev->dev, ret, in snd_proto_probe()
159 { .compatible = "mikroe,mikroe-proto", },
166 .name = "snd-mikroe-proto",