Lines Matching full:card

3 // soc-card.c
15 static inline int _soc_card_ret(struct snd_soc_card *card, in _soc_card_ret() argument
24 dev_err(card->dev, in _soc_card_ret()
26 func, card->name, ret); in _soc_card_ret()
35 struct snd_card *card = soc_card->snd_card; in snd_soc_card_get_kcontrol_locked() local
39 lockdep_assert_held(&card->controls_rwsem); in snd_soc_card_get_kcontrol_locked()
44 list_for_each_entry(kctl, &card->controls, list) in snd_soc_card_get_kcontrol_locked()
54 struct snd_card *card = soc_card->snd_card; in snd_soc_card_get_kcontrol() local
57 down_read(&card->controls_rwsem); in snd_soc_card_get_kcontrol()
59 up_read(&card->controls_rwsem); in snd_soc_card_get_kcontrol()
65 static int jack_new(struct snd_soc_card *card, const char *id, int type, in jack_new() argument
69 jack->card = card; in jack_new()
74 return snd_jack_new(card->snd_card, id, type, &jack->jack, initial_kctl, false); in jack_new()
79 * @card: ASoC card
92 int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type, in snd_soc_card_jack_new() argument
95 return soc_card_ret(card, jack_new(card, id, type, jack, true)); in snd_soc_card_jack_new()
101 * @card: ASoC card
115 int snd_soc_card_jack_new_pins(struct snd_soc_card *card, const char *id, in snd_soc_card_jack_new_pins() argument
122 ret = jack_new(card, id, type, jack, false); in snd_soc_card_jack_new_pins()
129 return soc_card_ret(card, ret); in snd_soc_card_jack_new_pins()
133 int snd_soc_card_suspend_pre(struct snd_soc_card *card) in snd_soc_card_suspend_pre() argument
137 if (card->suspend_pre) in snd_soc_card_suspend_pre()
138 ret = card->suspend_pre(card); in snd_soc_card_suspend_pre()
140 return soc_card_ret(card, ret); in snd_soc_card_suspend_pre()
143 int snd_soc_card_suspend_post(struct snd_soc_card *card) in snd_soc_card_suspend_post() argument
147 if (card->suspend_post) in snd_soc_card_suspend_post()
148 ret = card->suspend_post(card); in snd_soc_card_suspend_post()
150 return soc_card_ret(card, ret); in snd_soc_card_suspend_post()
153 int snd_soc_card_resume_pre(struct snd_soc_card *card) in snd_soc_card_resume_pre() argument
157 if (card->resume_pre) in snd_soc_card_resume_pre()
158 ret = card->resume_pre(card); in snd_soc_card_resume_pre()
160 return soc_card_ret(card, ret); in snd_soc_card_resume_pre()
163 int snd_soc_card_resume_post(struct snd_soc_card *card) in snd_soc_card_resume_post() argument
167 if (card->resume_post) in snd_soc_card_resume_post()
168 ret = card->resume_post(card); in snd_soc_card_resume_post()
170 return soc_card_ret(card, ret); in snd_soc_card_resume_post()
173 int snd_soc_card_probe(struct snd_soc_card *card) in snd_soc_card_probe() argument
175 if (card->probe) { in snd_soc_card_probe()
176 int ret = card->probe(card); in snd_soc_card_probe()
179 return soc_card_ret(card, ret); in snd_soc_card_probe()
182 * It has "card->probe" and "card->late_probe" callbacks. in snd_soc_card_probe()
190 card->probed = 1; in snd_soc_card_probe()
196 int snd_soc_card_late_probe(struct snd_soc_card *card) in snd_soc_card_late_probe() argument
198 if (card->late_probe) { in snd_soc_card_late_probe()
199 int ret = card->late_probe(card); in snd_soc_card_late_probe()
202 return soc_card_ret(card, ret); in snd_soc_card_late_probe()
206 * It has "card->probe" and "card->late_probe" callbacks, in snd_soc_card_late_probe()
208 * This means, we can set "card->probed" flag afer "late_probe" in snd_soc_card_late_probe()
215 card->probed = 1; in snd_soc_card_late_probe()
220 void snd_soc_card_fixup_controls(struct snd_soc_card *card) in snd_soc_card_fixup_controls() argument
222 if (card->fixup_controls) in snd_soc_card_fixup_controls()
223 card->fixup_controls(card); in snd_soc_card_fixup_controls()
226 int snd_soc_card_remove(struct snd_soc_card *card) in snd_soc_card_remove() argument
230 if (card->probed && in snd_soc_card_remove()
231 card->remove) in snd_soc_card_remove()
232 ret = card->remove(card); in snd_soc_card_remove()
234 card->probed = 0; in snd_soc_card_remove()
236 return soc_card_ret(card, ret); in snd_soc_card_remove()
239 int snd_soc_card_set_bias_level(struct snd_soc_card *card, in snd_soc_card_set_bias_level() argument
245 if (card && card->set_bias_level) in snd_soc_card_set_bias_level()
246 ret = card->set_bias_level(card, dapm, level); in snd_soc_card_set_bias_level()
248 return soc_card_ret(card, ret); in snd_soc_card_set_bias_level()
251 int snd_soc_card_set_bias_level_post(struct snd_soc_card *card, in snd_soc_card_set_bias_level_post() argument
257 if (card && card->set_bias_level_post) in snd_soc_card_set_bias_level_post()
258 ret = card->set_bias_level_post(card, dapm, level); in snd_soc_card_set_bias_level_post()
260 return soc_card_ret(card, ret); in snd_soc_card_set_bias_level_post()
263 int snd_soc_card_add_dai_link(struct snd_soc_card *card, in snd_soc_card_add_dai_link() argument
268 if (card->add_dai_link) in snd_soc_card_add_dai_link()
269 ret = card->add_dai_link(card, dai_link); in snd_soc_card_add_dai_link()
271 return soc_card_ret(card, ret); in snd_soc_card_add_dai_link()
275 void snd_soc_card_remove_dai_link(struct snd_soc_card *card, in snd_soc_card_remove_dai_link() argument
278 if (card->remove_dai_link) in snd_soc_card_remove_dai_link()
279 card->remove_dai_link(card, dai_link); in snd_soc_card_remove_dai_link()