Lines Matching refs:pcm

650 	struct hda_pcm *pcm = container_of(kref, struct hda_pcm, kref);  in release_pcm()  local
652 if (pcm->pcm) in release_pcm()
653 snd_device_free(pcm->codec->card, pcm->pcm); in release_pcm()
654 clear_bit(pcm->device, pcm->codec->bus->pcm_dev_bits); in release_pcm()
655 kfree(pcm->name); in release_pcm()
656 kfree(pcm); in release_pcm()
659 void snd_hda_codec_pcm_put(struct hda_pcm *pcm) in snd_hda_codec_pcm_put() argument
661 kref_put(&pcm->kref, release_pcm); in snd_hda_codec_pcm_put()
668 struct hda_pcm *pcm; in snd_hda_codec_pcm_new() local
671 pcm = kzalloc(sizeof(*pcm), GFP_KERNEL); in snd_hda_codec_pcm_new()
672 if (!pcm) in snd_hda_codec_pcm_new()
675 pcm->codec = codec; in snd_hda_codec_pcm_new()
676 kref_init(&pcm->kref); in snd_hda_codec_pcm_new()
678 pcm->name = kvasprintf(GFP_KERNEL, fmt, args); in snd_hda_codec_pcm_new()
680 if (!pcm->name) { in snd_hda_codec_pcm_new()
681 kfree(pcm); in snd_hda_codec_pcm_new()
685 list_add_tail(&pcm->list, &codec->pcm_list_head); in snd_hda_codec_pcm_new()
686 return pcm; in snd_hda_codec_pcm_new()
695 struct hda_pcm *pcm, *n; in codec_release_pcms() local
697 list_for_each_entry_safe(pcm, n, &codec->pcm_list_head, list) { in codec_release_pcms()
698 list_del_init(&pcm->list); in codec_release_pcms()
699 if (pcm->pcm) in codec_release_pcms()
700 snd_device_disconnect(codec->card, pcm->pcm); in codec_release_pcms()
701 snd_hda_codec_pcm_put(pcm); in codec_release_pcms()
1637 if (!cpcm->pcm) in snd_hda_lock_devices()
1639 if (cpcm->pcm->streams[0].substream_opened || in snd_hda_lock_devices()
1640 cpcm->pcm->streams[1].substream_opened) in snd_hda_lock_devices()
3013 struct hda_pcm *pcm; in hda_codec_runtime_suspend() local
3017 list_for_each_entry(pcm, &codec->pcm_list_head, list) in hda_codec_runtime_suspend()
3018 snd_pcm_suspend_all(pcm->pcm); in hda_codec_runtime_suspend()
3052 struct hda_pcm *pcm; in add_std_chmaps() local
3055 list_for_each_entry(pcm, &codec->pcm_list_head, list) { in add_std_chmaps()
3057 struct hda_pcm_stream *hinfo = &pcm->stream[str]; in add_std_chmaps()
3061 if (!pcm->pcm || pcm->own_chmap || !hinfo->substreams) in add_std_chmaps()
3064 err = snd_pcm_add_chmap_ctls(pcm->pcm, str, elem, in add_std_chmaps()
3331 if (cpcm->pcm) in snd_hda_codec_build_pcms()
4040 void snd_print_pcm_bits(int pcm, char *buf, int buflen) in snd_print_pcm_bits() argument
4046 if (pcm & (AC_SUPPCM_BITS_8 << i)) in snd_print_pcm_bits()