Lines Matching full:card

3 // soc-card.c
12 static inline int _soc_card_ret(struct snd_soc_card *card, in _soc_card_ret() argument
21 dev_err(card->dev, in _soc_card_ret()
23 func, card->name, ret); in _soc_card_ret()
32 struct snd_card *card = soc_card->snd_card; in snd_soc_card_get_kcontrol() local
38 list_for_each_entry(kctl, &card->controls, list) in snd_soc_card_get_kcontrol()
45 static int jack_new(struct snd_soc_card *card, const char *id, int type, in jack_new() argument
49 jack->card = card; in jack_new()
54 return snd_jack_new(card->snd_card, id, type, &jack->jack, initial_kctl, false); in jack_new()
59 * @card: ASoC card
72 int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type, in snd_soc_card_jack_new() argument
75 return soc_card_ret(card, jack_new(card, id, type, jack, true)); in snd_soc_card_jack_new()
81 * @card: ASoC card
95 int snd_soc_card_jack_new_pins(struct snd_soc_card *card, const char *id, in snd_soc_card_jack_new_pins() argument
102 ret = jack_new(card, id, type, jack, false); in snd_soc_card_jack_new_pins()
109 return soc_card_ret(card, ret); in snd_soc_card_jack_new_pins()
113 int snd_soc_card_suspend_pre(struct snd_soc_card *card) in snd_soc_card_suspend_pre() argument
117 if (card->suspend_pre) in snd_soc_card_suspend_pre()
118 ret = card->suspend_pre(card); in snd_soc_card_suspend_pre()
120 return soc_card_ret(card, ret); in snd_soc_card_suspend_pre()
123 int snd_soc_card_suspend_post(struct snd_soc_card *card) in snd_soc_card_suspend_post() argument
127 if (card->suspend_post) in snd_soc_card_suspend_post()
128 ret = card->suspend_post(card); in snd_soc_card_suspend_post()
130 return soc_card_ret(card, ret); in snd_soc_card_suspend_post()
133 int snd_soc_card_resume_pre(struct snd_soc_card *card) in snd_soc_card_resume_pre() argument
137 if (card->resume_pre) in snd_soc_card_resume_pre()
138 ret = card->resume_pre(card); in snd_soc_card_resume_pre()
140 return soc_card_ret(card, ret); in snd_soc_card_resume_pre()
143 int snd_soc_card_resume_post(struct snd_soc_card *card) in snd_soc_card_resume_post() argument
147 if (card->resume_post) in snd_soc_card_resume_post()
148 ret = card->resume_post(card); in snd_soc_card_resume_post()
150 return soc_card_ret(card, ret); in snd_soc_card_resume_post()
153 int snd_soc_card_probe(struct snd_soc_card *card) in snd_soc_card_probe() argument
155 if (card->probe) { in snd_soc_card_probe()
156 int ret = card->probe(card); in snd_soc_card_probe()
159 return soc_card_ret(card, ret); in snd_soc_card_probe()
162 * It has "card->probe" and "card->late_probe" callbacks. in snd_soc_card_probe()
170 card->probed = 1; in snd_soc_card_probe()
176 int snd_soc_card_late_probe(struct snd_soc_card *card) in snd_soc_card_late_probe() argument
178 if (card->late_probe) { in snd_soc_card_late_probe()
179 int ret = card->late_probe(card); in snd_soc_card_late_probe()
182 return soc_card_ret(card, ret); in snd_soc_card_late_probe()
186 * It has "card->probe" and "card->late_probe" callbacks, in snd_soc_card_late_probe()
188 * This means, we can set "card->probed" flag afer "late_probe" in snd_soc_card_late_probe()
195 card->probed = 1; in snd_soc_card_late_probe()
200 void snd_soc_card_fixup_controls(struct snd_soc_card *card) in snd_soc_card_fixup_controls() argument
202 if (card->fixup_controls) in snd_soc_card_fixup_controls()
203 card->fixup_controls(card); in snd_soc_card_fixup_controls()
206 int snd_soc_card_remove(struct snd_soc_card *card) in snd_soc_card_remove() argument
210 if (card->probed && in snd_soc_card_remove()
211 card->remove) in snd_soc_card_remove()
212 ret = card->remove(card); in snd_soc_card_remove()
214 card->probed = 0; in snd_soc_card_remove()
216 return soc_card_ret(card, ret); in snd_soc_card_remove()
219 int snd_soc_card_set_bias_level(struct snd_soc_card *card, in snd_soc_card_set_bias_level() argument
225 if (card && card->set_bias_level) in snd_soc_card_set_bias_level()
226 ret = card->set_bias_level(card, dapm, level); in snd_soc_card_set_bias_level()
228 return soc_card_ret(card, ret); in snd_soc_card_set_bias_level()
231 int snd_soc_card_set_bias_level_post(struct snd_soc_card *card, in snd_soc_card_set_bias_level_post() argument
237 if (card && card->set_bias_level_post) in snd_soc_card_set_bias_level_post()
238 ret = card->set_bias_level_post(card, dapm, level); in snd_soc_card_set_bias_level_post()
240 return soc_card_ret(card, ret); in snd_soc_card_set_bias_level_post()
243 int snd_soc_card_add_dai_link(struct snd_soc_card *card, in snd_soc_card_add_dai_link() argument
248 if (card->add_dai_link) in snd_soc_card_add_dai_link()
249 ret = card->add_dai_link(card, dai_link); in snd_soc_card_add_dai_link()
251 return soc_card_ret(card, ret); in snd_soc_card_add_dai_link()
255 void snd_soc_card_remove_dai_link(struct snd_soc_card *card, in snd_soc_card_remove_dai_link() argument
258 if (card->remove_dai_link) in snd_soc_card_remove_dai_link()
259 card->remove_dai_link(card, dai_link); in snd_soc_card_remove_dai_link()