Lines Matching +full:lochnagar2 +full:- +full:clk
1 // SPDX-License-Identifier: GPL-2.0
5 // Copyright (c) 2017-2019 Cirrus Logic, Inc. and
11 #include <linux/clk.h>
20 struct clk *mclk;
62 .max = 24576000 / hw_param_interval(params, rule->deps[0])->max, in lochnagar_sc_hw_rule_rate()
65 return snd_interval_refine(hw_param_interval(params, rule->var), in lochnagar_sc_hw_rule_rate()
72 struct snd_soc_component *comp = dai->component; in lochnagar_sc_startup()
76 ret = snd_pcm_hw_constraint_list(substream->runtime, 0, in lochnagar_sc_startup()
82 return snd_pcm_hw_rule_add(substream->runtime, 0, in lochnagar_sc_startup()
85 SNDRV_PCM_HW_PARAM_FRAME_BITS, -1); in lochnagar_sc_startup()
91 struct snd_soc_component *comp = dai->component; in lochnagar_sc_line_startup()
95 ret = clk_prepare_enable(priv->mclk); in lochnagar_sc_line_startup()
97 dev_err(dai->dev, "Failed to enable MCLK: %d\n", ret); in lochnagar_sc_line_startup()
105 return snd_pcm_hw_constraint_list(substream->runtime, 0, in lochnagar_sc_line_startup()
113 struct snd_soc_component *comp = dai->component; in lochnagar_sc_line_shutdown()
116 clk_disable_unprepare(priv->mclk); in lochnagar_sc_line_shutdown()
125 return -EINVAL; in lochnagar_sc_check_fmt()
153 .name = "lochnagar-line",
173 .name = "lochnagar-usb1",
193 .name = "lochnagar-usb2",
228 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); in lochnagar_sc_probe()
230 return -ENOMEM; in lochnagar_sc_probe()
232 priv->mclk = devm_clk_get(&pdev->dev, "mclk"); in lochnagar_sc_probe()
233 if (IS_ERR(priv->mclk)) { in lochnagar_sc_probe()
234 ret = PTR_ERR(priv->mclk); in lochnagar_sc_probe()
235 dev_err(&pdev->dev, "Failed to get MCLK: %d\n", ret); in lochnagar_sc_probe()
241 return devm_snd_soc_register_component(&pdev->dev, in lochnagar_sc_probe()
248 { .compatible = "cirrus,lochnagar2-soundcard" },
255 .name = "lochnagar-soundcard",
266 MODULE_ALIAS("platform:lochnagar-soundcard");