Lines Matching +full:invert +full:- +full:ext

1 // SPDX-License-Identifier: GPL-2.0+
14 #include "imx-audmux.h"
30 .name = "headset-gpio",
32 .invert = 0,
51 struct imx_es8328_data *data = container_of(rtd->card, in imx_es8328_dai_init()
55 if (data->jack_gpiod) { in imx_es8328_dai_init()
57 ret = snd_soc_card_jack_new_pins(rtd->card, "Headphone", in imx_es8328_dai_init()
65 headset_jack_gpios[0].desc = data->jack_gpiod; in imx_es8328_dai_init()
78 SND_SOC_DAPM_REGULATOR_SUPPLY("audio-amp", 1, 0),
88 struct device_node *np = pdev->dev.of_node; in imx_es8328_probe()
95 struct device *dev = &pdev->dev; in imx_es8328_probe()
97 ret = of_property_read_u32(np, "mux-int-port", &int_port); in imx_es8328_probe()
99 dev_err(dev, "mux-int-port missing or invalid\n"); in imx_es8328_probe()
103 dev_err(dev, "mux-int-port: hardware only has %d mux ports\n", in imx_es8328_probe()
105 ret = -EINVAL; in imx_es8328_probe()
109 ret = of_property_read_u32(np, "mux-ext-port", &ext_port); in imx_es8328_probe()
111 dev_err(dev, "mux-ext-port missing or invalid\n"); in imx_es8328_probe()
115 dev_err(dev, "mux-ext-port: hardware only has %d mux ports\n", in imx_es8328_probe()
117 ret = -EINVAL; in imx_es8328_probe()
125 int_port--; in imx_es8328_probe()
126 ext_port--; in imx_es8328_probe()
146 ssi_np = of_parse_phandle(pdev->dev.of_node, "ssi-controller", 0); in imx_es8328_probe()
147 codec_np = of_parse_phandle(pdev->dev.of_node, "audio-codec", 0); in imx_es8328_probe()
150 ret = -EINVAL; in imx_es8328_probe()
157 ret = -EINVAL; in imx_es8328_probe()
163 ret = -ENOMEM; in imx_es8328_probe()
169 ret = -ENOMEM; in imx_es8328_probe()
173 data->dev = dev; in imx_es8328_probe()
175 data->jack_gpiod = devm_gpiod_get_optional(dev, "jack", GPIOD_IN); in imx_es8328_probe()
176 if (IS_ERR(data->jack_gpiod)) { in imx_es8328_probe()
177 ret = PTR_ERR(data->jack_gpiod); in imx_es8328_probe()
183 * platform is using soc-generic-dmaengine-pcm in imx_es8328_probe()
185 data->dai.cpus = in imx_es8328_probe()
186 data->dai.platforms = &comp[0]; in imx_es8328_probe()
187 data->dai.codecs = &comp[1]; in imx_es8328_probe()
189 data->dai.num_cpus = 1; in imx_es8328_probe()
190 data->dai.num_codecs = 1; in imx_es8328_probe()
191 data->dai.num_platforms = 1; in imx_es8328_probe()
193 data->dai.name = "hifi"; in imx_es8328_probe()
194 data->dai.stream_name = "hifi"; in imx_es8328_probe()
195 data->dai.codecs->dai_name = "es8328-hifi-analog"; in imx_es8328_probe()
196 data->dai.codecs->of_node = codec_np; in imx_es8328_probe()
197 data->dai.cpus->of_node = ssi_np; in imx_es8328_probe()
198 data->dai.init = &imx_es8328_dai_init; in imx_es8328_probe()
199 data->dai.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | in imx_es8328_probe()
202 data->card.dev = dev; in imx_es8328_probe()
203 data->card.dapm_widgets = imx_es8328_dapm_widgets; in imx_es8328_probe()
204 data->card.num_dapm_widgets = ARRAY_SIZE(imx_es8328_dapm_widgets); in imx_es8328_probe()
205 data->card.controls = imx_es8328_controls; in imx_es8328_probe()
206 data->card.num_controls = ARRAY_SIZE(imx_es8328_controls); in imx_es8328_probe()
207 ret = snd_soc_of_parse_card_name(&data->card, "model"); in imx_es8328_probe()
212 ret = snd_soc_of_parse_audio_routing(&data->card, "audio-routing"); in imx_es8328_probe()
217 data->card.num_links = 1; in imx_es8328_probe()
218 data->card.owner = THIS_MODULE; in imx_es8328_probe()
219 data->card.dai_link = &data->dai; in imx_es8328_probe()
221 ret = devm_snd_soc_register_card(&pdev->dev, &data->card); in imx_es8328_probe()
229 put_device(&ssi_pdev->dev); in imx_es8328_probe()
238 { .compatible = "fsl,imx-audio-es8328", },
245 .name = "imx-es8328",
255 MODULE_ALIAS("platform:imx-audio-es8328");