Lines Matching refs:card
46 static struct snd_hwdep *snd_hwdep_search(struct snd_card *card, int device)
51 if (hwdep->card == card && hwdep->device == device)
102 if (!try_module_get(hw->card->module))
138 err = snd_card_file_add(hw->card, file);
149 module_put(hw->card->module);
157 struct module *mod = hw->card->module;
167 snd_card_file_remove(hw->card, file);
186 info.card = hw->card->number;
263 static int snd_hwdep_control_ioctl(struct snd_card *card,
277 if (snd_hwdep_search(card, device))
297 hwdep = snd_hwdep_search(card, device);
335 * @card: the card instance
340 * Creates a new hwdep instance with the given index on the card.
346 int snd_hwdep_new(struct snd_card *card, char *id, int device,
357 if (snd_BUG_ON(!card))
366 hwdep->card = card;
373 if ((err = snd_device_new(card, SNDRV_DEV_HWDEP, hwdep, &ops)) < 0) {
407 if (snd_hwdep_search(hwdep->card, hwdep->device)) {
412 sprintf(name, "hwC%iD%i", hwdep->card->number, hwdep->device);
414 hwdep->card, hwdep->device,
417 hwdep->card->number, hwdep->device);
429 hwdep->card, hwdep->device,
433 hwdep->card->number, hwdep->device);
450 if (snd_hwdep_search(hwdep->card, hwdep->device) != hwdep) {
456 snd_unregister_oss_device(hwdep->oss_type, hwdep->card, hwdep->device);
458 snd_unregister_device(SNDRV_DEVICE_TYPE_HWDEP, hwdep->card, hwdep->device);
477 hwdep->card->number, hwdep->device, hwdep->name);