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()
42 static int jack_new(struct snd_soc_card *card, const char *id, int type, in jack_new() argument
46 jack->card = card; in jack_new()
51 return snd_jack_new(card->snd_card, id, type, &jack->jack, initial_kctl, false); in jack_new()
56 * @card: ASoC card
69 int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type, in snd_soc_card_jack_new() argument
72 return soc_card_ret(card, jack_new(card, id, type, jack, true)); in snd_soc_card_jack_new()
78 * @card: ASoC card
92 int snd_soc_card_jack_new_pins(struct snd_soc_card *card, const char *id, in snd_soc_card_jack_new_pins() argument
99 ret = jack_new(card, id, type, jack, false); in snd_soc_card_jack_new_pins()
106 return soc_card_ret(card, ret); in snd_soc_card_jack_new_pins()
110 int snd_soc_card_suspend_pre(struct snd_soc_card *card) in snd_soc_card_suspend_pre() argument
114 if (card->suspend_pre) in snd_soc_card_suspend_pre()
115 ret = card->suspend_pre(card); in snd_soc_card_suspend_pre()
117 return soc_card_ret(card, ret); in snd_soc_card_suspend_pre()
120 int snd_soc_card_suspend_post(struct snd_soc_card *card) in snd_soc_card_suspend_post() argument
124 if (card->suspend_post) in snd_soc_card_suspend_post()
125 ret = card->suspend_post(card); in snd_soc_card_suspend_post()
127 return soc_card_ret(card, ret); in snd_soc_card_suspend_post()
130 int snd_soc_card_resume_pre(struct snd_soc_card *card) in snd_soc_card_resume_pre() argument
134 if (card->resume_pre) in snd_soc_card_resume_pre()
135 ret = card->resume_pre(card); in snd_soc_card_resume_pre()
137 return soc_card_ret(card, ret); in snd_soc_card_resume_pre()
140 int snd_soc_card_resume_post(struct snd_soc_card *card) in snd_soc_card_resume_post() argument
144 if (card->resume_post) in snd_soc_card_resume_post()
145 ret = card->resume_post(card); in snd_soc_card_resume_post()
147 return soc_card_ret(card, ret); in snd_soc_card_resume_post()
150 int snd_soc_card_probe(struct snd_soc_card *card) in snd_soc_card_probe() argument
152 if (card->probe) { in snd_soc_card_probe()
153 int ret = card->probe(card); in snd_soc_card_probe()
156 return soc_card_ret(card, ret); in snd_soc_card_probe()
159 * It has "card->probe" and "card->late_probe" callbacks. in snd_soc_card_probe()
167 card->probed = 1; in snd_soc_card_probe()
173 int snd_soc_card_late_probe(struct snd_soc_card *card) in snd_soc_card_late_probe() argument
175 if (card->late_probe) { in snd_soc_card_late_probe()
176 int ret = card->late_probe(card); in snd_soc_card_late_probe()
179 return soc_card_ret(card, ret); in snd_soc_card_late_probe()
183 * It has "card->probe" and "card->late_probe" callbacks, in snd_soc_card_late_probe()
185 * This means, we can set "card->probed" flag afer "late_probe" in snd_soc_card_late_probe()
192 card->probed = 1; in snd_soc_card_late_probe()
197 void snd_soc_card_fixup_controls(struct snd_soc_card *card) in snd_soc_card_fixup_controls() argument
199 if (card->fixup_controls) in snd_soc_card_fixup_controls()
200 card->fixup_controls(card); in snd_soc_card_fixup_controls()
203 int snd_soc_card_remove(struct snd_soc_card *card) in snd_soc_card_remove() argument
207 if (card->probed && in snd_soc_card_remove()
208 card->remove) in snd_soc_card_remove()
209 ret = card->remove(card); in snd_soc_card_remove()
211 card->probed = 0; in snd_soc_card_remove()
213 return soc_card_ret(card, ret); in snd_soc_card_remove()
216 int snd_soc_card_set_bias_level(struct snd_soc_card *card, in snd_soc_card_set_bias_level() argument
222 if (card && card->set_bias_level) in snd_soc_card_set_bias_level()
223 ret = card->set_bias_level(card, dapm, level); in snd_soc_card_set_bias_level()
225 return soc_card_ret(card, ret); in snd_soc_card_set_bias_level()
228 int snd_soc_card_set_bias_level_post(struct snd_soc_card *card, in snd_soc_card_set_bias_level_post() argument
234 if (card && card->set_bias_level_post) in snd_soc_card_set_bias_level_post()
235 ret = card->set_bias_level_post(card, dapm, level); in snd_soc_card_set_bias_level_post()
237 return soc_card_ret(card, ret); in snd_soc_card_set_bias_level_post()
240 int snd_soc_card_add_dai_link(struct snd_soc_card *card, in snd_soc_card_add_dai_link() argument
245 if (card->add_dai_link) in snd_soc_card_add_dai_link()
246 ret = card->add_dai_link(card, dai_link); in snd_soc_card_add_dai_link()
248 return soc_card_ret(card, ret); in snd_soc_card_add_dai_link()
252 void snd_soc_card_remove_dai_link(struct snd_soc_card *card, in snd_soc_card_remove_dai_link() argument
255 if (card->remove_dai_link) in snd_soc_card_remove_dai_link()
256 card->remove_dai_link(card, dai_link); in snd_soc_card_remove_dai_link()