Lines Matching refs:pcm

855 	struct hda_pcm *pcm = container_of(kref, struct hda_pcm, kref);  in release_pcm()  local
857 if (pcm->pcm) in release_pcm()
858 snd_device_free(pcm->codec->card, pcm->pcm); in release_pcm()
859 clear_bit(pcm->device, pcm->codec->bus->pcm_dev_bits); in release_pcm()
860 kfree(pcm->name); in release_pcm()
861 kfree(pcm); in release_pcm()
864 void snd_hda_codec_pcm_put(struct hda_pcm *pcm) in snd_hda_codec_pcm_put() argument
866 kref_put(&pcm->kref, release_pcm); in snd_hda_codec_pcm_put()
873 struct hda_pcm *pcm; in snd_hda_codec_pcm_new() local
876 pcm = kzalloc(sizeof(*pcm), GFP_KERNEL); in snd_hda_codec_pcm_new()
877 if (!pcm) in snd_hda_codec_pcm_new()
880 pcm->codec = codec; in snd_hda_codec_pcm_new()
881 kref_init(&pcm->kref); in snd_hda_codec_pcm_new()
883 pcm->name = kvasprintf(GFP_KERNEL, fmt, args); in snd_hda_codec_pcm_new()
885 if (!pcm->name) { in snd_hda_codec_pcm_new()
886 kfree(pcm); in snd_hda_codec_pcm_new()
890 list_add_tail(&pcm->list, &codec->pcm_list_head); in snd_hda_codec_pcm_new()
891 return pcm; in snd_hda_codec_pcm_new()
900 struct hda_pcm *pcm, *n; in codec_release_pcms() local
902 list_for_each_entry_safe(pcm, n, &codec->pcm_list_head, list) { in codec_release_pcms()
903 list_del_init(&pcm->list); in codec_release_pcms()
904 if (pcm->pcm) in codec_release_pcms()
905 snd_device_disconnect(codec->card, pcm->pcm); in codec_release_pcms()
906 snd_hda_codec_pcm_put(pcm); in codec_release_pcms()
1840 if (!cpcm->pcm) in snd_hda_lock_devices()
1842 if (cpcm->pcm->streams[0].substream_opened || in snd_hda_lock_devices()
1843 cpcm->pcm->streams[1].substream_opened) in snd_hda_lock_devices()
3216 struct hda_pcm *pcm; in hda_codec_runtime_suspend() local
3220 list_for_each_entry(pcm, &codec->pcm_list_head, list) in hda_codec_runtime_suspend()
3221 snd_pcm_suspend_all(pcm->pcm); in hda_codec_runtime_suspend()
3253 struct hda_pcm *pcm; in add_std_chmaps() local
3256 list_for_each_entry(pcm, &codec->pcm_list_head, list) { in add_std_chmaps()
3258 struct hda_pcm_stream *hinfo = &pcm->stream[str]; in add_std_chmaps()
3262 if (!pcm || !pcm->pcm || pcm->own_chmap || in add_std_chmaps()
3266 err = snd_pcm_add_chmap_ctls(pcm->pcm, str, elem, in add_std_chmaps()
3841 if (cpcm->pcm) in snd_hda_codec_build_pcms()
4548 void snd_print_pcm_bits(int pcm, char *buf, int buflen) in snd_print_pcm_bits() argument
4554 if (pcm & (AC_SUPPCM_BITS_8 << i)) in snd_print_pcm_bits()