Lines Matching refs:adpt

164 	struct sound_adapter *adpt = iface->priv;  in get_channel()  local
167 list_for_each_entry(channel, &adpt->dev_list, list) { in get_channel()
487 static void release_adapter(struct sound_adapter *adpt) in release_adapter() argument
491 list_for_each_entry_safe(channel, tmp, &adpt->dev_list, list) { in release_adapter()
495 if (adpt->card) in release_adapter()
496 snd_card_free(adpt->card); in release_adapter()
497 list_del(&adpt->list); in release_adapter()
498 kfree(adpt); in release_adapter()
518 struct sound_adapter *adpt; in audio_probe_channel() local
537 list_for_each_entry(adpt, &adpt_list, list) { in audio_probe_channel()
538 if (adpt->iface != iface) in audio_probe_channel()
540 if (adpt->registered) in audio_probe_channel()
542 adpt->pcm_dev_idx++; in audio_probe_channel()
545 adpt = kzalloc(sizeof(*adpt), GFP_KERNEL); in audio_probe_channel()
546 if (!adpt) in audio_probe_channel()
549 adpt->iface = iface; in audio_probe_channel()
550 INIT_LIST_HEAD(&adpt->dev_list); in audio_probe_channel()
551 iface->priv = adpt; in audio_probe_channel()
552 list_add_tail(&adpt->list, &adpt_list); in audio_probe_channel()
554 sizeof(*channel), &adpt->card); in audio_probe_channel()
557 snprintf(adpt->card->driver, sizeof(adpt->card->driver), in audio_probe_channel()
559 snprintf(adpt->card->shortname, sizeof(adpt->card->shortname), in audio_probe_channel()
561 snprintf(adpt->card->longname, sizeof(adpt->card->longname), in audio_probe_channel()
562 "%s at %s", adpt->card->shortname, iface->description); in audio_probe_channel()
582 channel->card = adpt->card; in audio_probe_channel()
587 list_add_tail(&channel->list, &adpt->dev_list); in audio_probe_channel()
594 ret = snd_pcm_new(adpt->card, device_name, adpt->pcm_dev_idx, in audio_probe_channel()
607 release_adapter(adpt); in audio_probe_channel()
614 struct sound_adapter *adpt; in audio_create_sound_card() local
616 list_for_each_entry(adpt, &adpt_list, list) { in audio_create_sound_card()
617 if (!adpt->registered) in audio_create_sound_card()
622 ret = snd_card_register(adpt->card); in audio_create_sound_card()
624 release_adapter(adpt); in audio_create_sound_card()
627 adpt->registered = true; in audio_create_sound_card()
644 struct sound_adapter *adpt = iface->priv; in audio_disconnect_channel() local
653 if (list_empty(&adpt->dev_list)) in audio_disconnect_channel()
654 release_adapter(adpt); in audio_disconnect_channel()