Lines Matching defs:card
15 * @card: the card instance
21 * The device will be assigned to the card and managed together
22 * by the card.
29 int snd_device_new(struct snd_card *card, enum snd_device_type type,
35 if (snd_BUG_ON(!card || !device_data || !ops))
41 dev->card = card;
48 list_for_each_prev(p, &card->devices) {
64 dev_err(dev->card->dev, "device disconnect failure\n");
77 dev_err(dev->card->dev, "device free failure\n");
82 static struct snd_device *look_for_dev(struct snd_card *card, void *device_data)
86 list_for_each_entry(dev, &card->devices, list)
95 * @card: the card instance
106 void snd_device_disconnect(struct snd_card *card, void *device_data)
110 if (snd_BUG_ON(!card || !device_data))
112 dev = look_for_dev(card, device_data);
116 dev_dbg(card->dev, "device disconnect %p (from %pS), not found\n",
122 * snd_device_free - release the device from the card
123 * @card: the card instance
126 * Removes the device from the list on the card and invokes the
130 void snd_device_free(struct snd_card *card, void *device_data)
134 if (snd_BUG_ON(!card || !device_data))
136 dev = look_for_dev(card, device_data);
140 dev_dbg(card->dev, "device free %p (from %pS), not found\n",
160 * @card: the card instance
171 int snd_device_register(struct snd_card *card, void *device_data)
175 if (snd_BUG_ON(!card || !device_data))
177 dev = look_for_dev(card, device_data);
186 * register all the devices on the card.
189 int snd_device_register_all(struct snd_card *card)
194 if (snd_BUG_ON(!card))
196 list_for_each_entry(dev, &card->devices, list) {
205 * disconnect all the devices on the card.
208 void snd_device_disconnect_all(struct snd_card *card)
212 if (snd_BUG_ON(!card))
214 list_for_each_entry_reverse(dev, &card->devices, list)
219 * release all the devices on the card.
222 void snd_device_free_all(struct snd_card *card)
226 if (snd_BUG_ON(!card))
228 list_for_each_entry_safe_reverse(dev, next, &card->devices, list) {
237 list_for_each_entry_safe_reverse(dev, next, &card->devices, list)
243 * @card: the card instance
251 int snd_device_get_state(struct snd_card *card, void *device_data)
255 dev = look_for_dev(card, device_data);