Lines Matching +full:asoc +full:- +full:wm8904
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * atmel_wm8904 - Atmel ASoC driver for boards with WM8904 codec.
16 #include "../codecs/wm8904.h"
35 pr_err("%s - failed to set wm8904 codec PLL.", __func__); in atmel_asoc_wm8904_hw_params()
40 * As here wm8904 use FLL output as its system clock in atmel_asoc_wm8904_hw_params()
47 pr_err("%s -failed to set wm8904 SYSCLK\n", __func__); in atmel_asoc_wm8904_hw_params()
60 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8904-hifi")),
64 .name = "WM8904",
65 .stream_name = "WM8904 PCM",
85 struct device_node *np = pdev->dev.of_node; in atmel_asoc_wm8904_dt_init()
92 dev_err(&pdev->dev, "only device tree supported\n"); in atmel_asoc_wm8904_dt_init()
93 return -EINVAL; in atmel_asoc_wm8904_dt_init()
98 dev_err(&pdev->dev, "failed to parse card name\n"); in atmel_asoc_wm8904_dt_init()
102 ret = snd_soc_of_parse_audio_routing(card, "atmel,audio-routing"); in atmel_asoc_wm8904_dt_init()
104 dev_err(&pdev->dev, "failed to parse audio routing\n"); in atmel_asoc_wm8904_dt_init()
108 cpu_np = of_parse_phandle(np, "atmel,ssc-controller", 0); in atmel_asoc_wm8904_dt_init()
110 dev_err(&pdev->dev, "failed to get dai and pcm info\n"); in atmel_asoc_wm8904_dt_init()
111 ret = -EINVAL; in atmel_asoc_wm8904_dt_init()
114 dailink->cpus->of_node = cpu_np; in atmel_asoc_wm8904_dt_init()
115 dailink->platforms->of_node = cpu_np; in atmel_asoc_wm8904_dt_init()
118 codec_np = of_parse_phandle(np, "atmel,audio-codec", 0); in atmel_asoc_wm8904_dt_init()
120 dev_err(&pdev->dev, "failed to get codec info\n"); in atmel_asoc_wm8904_dt_init()
121 ret = -EINVAL; in atmel_asoc_wm8904_dt_init()
124 dailink->codecs->of_node = codec_np; in atmel_asoc_wm8904_dt_init()
136 card->dev = &pdev->dev; in atmel_asoc_wm8904_probe()
139 dev_err(&pdev->dev, "failed to init dt info\n"); in atmel_asoc_wm8904_probe()
143 id = of_alias_get_id((struct device_node *)dailink->cpus->of_node, "ssc"); in atmel_asoc_wm8904_probe()
146 dev_err(&pdev->dev, "failed to set SSC %d for audio\n", id); in atmel_asoc_wm8904_probe()
152 dev_err(&pdev->dev, "snd_soc_register_card failed\n"); in atmel_asoc_wm8904_probe()
169 id = of_alias_get_id((struct device_node *)dailink->cpus->of_node, "ssc"); in atmel_asoc_wm8904_remove()
177 { .compatible = "atmel,asoc-wm8904", },
185 .name = "atmel-wm8904-audio",
197 MODULE_DESCRIPTION("ALSA SoC machine driver for Atmel EK with WM8904 codec");