Lines Matching refs:adpt

162 	struct sound_adapter *adpt = iface->priv;  in get_channel()  local
165 list_for_each_entry(channel, &adpt->dev_list, list) { in get_channel()
485 static void release_adapter(struct sound_adapter *adpt) in release_adapter() argument
489 list_for_each_entry_safe(channel, tmp, &adpt->dev_list, list) { in release_adapter()
493 if (adpt->card) in release_adapter()
494 snd_card_free(adpt->card); in release_adapter()
495 list_del(&adpt->list); in release_adapter()
496 kfree(adpt); in release_adapter()
516 struct sound_adapter *adpt; in audio_probe_channel() local
535 list_for_each_entry(adpt, &adpt_list, list) { in audio_probe_channel()
536 if (adpt->iface != iface) in audio_probe_channel()
538 if (adpt->registered) in audio_probe_channel()
540 adpt->pcm_dev_idx++; in audio_probe_channel()
543 adpt = kzalloc(sizeof(*adpt), GFP_KERNEL); in audio_probe_channel()
544 if (!adpt) in audio_probe_channel()
547 adpt->iface = iface; in audio_probe_channel()
548 INIT_LIST_HEAD(&adpt->dev_list); in audio_probe_channel()
549 iface->priv = adpt; in audio_probe_channel()
550 list_add_tail(&adpt->list, &adpt_list); in audio_probe_channel()
552 sizeof(*channel), &adpt->card); in audio_probe_channel()
555 snprintf(adpt->card->driver, sizeof(adpt->card->driver), in audio_probe_channel()
557 snprintf(adpt->card->shortname, sizeof(adpt->card->shortname), in audio_probe_channel()
559 snprintf(adpt->card->longname, sizeof(adpt->card->longname), in audio_probe_channel()
560 "%s at %s", adpt->card->shortname, iface->description); in audio_probe_channel()
580 channel->card = adpt->card; in audio_probe_channel()
585 list_add_tail(&channel->list, &adpt->dev_list); in audio_probe_channel()
592 ret = snd_pcm_new(adpt->card, device_name, adpt->pcm_dev_idx, in audio_probe_channel()
605 release_adapter(adpt); in audio_probe_channel()
612 struct sound_adapter *adpt; in audio_create_sound_card() local
614 list_for_each_entry(adpt, &adpt_list, list) { in audio_create_sound_card()
615 if (!adpt->registered) in audio_create_sound_card()
620 ret = snd_card_register(adpt->card); in audio_create_sound_card()
622 release_adapter(adpt); in audio_create_sound_card()
625 adpt->registered = true; in audio_create_sound_card()
642 struct sound_adapter *adpt = iface->priv; in audio_disconnect_channel() local
651 if (list_empty(&adpt->dev_list)) in audio_disconnect_channel()
652 release_adapter(adpt); in audio_disconnect_channel()