Lines Matching refs:chmap
35 kfree(fp->chmap); in audioformat_free()
139 if (prev->chmap && in have_dup_chmap()
140 !memcmp(prev->chmap, fp->chmap, sizeof(*fp->chmap))) in have_dup_chmap()
164 if (!fp->chmap) in usb_chmap_ctl_tlv()
169 ch_bytes = fp->chmap->channels * 4; in usb_chmap_ctl_tlv()
176 for (i = 0; i < fp->chmap->channels; i++, dst++) { in usb_chmap_ctl_tlv()
177 if (put_user(fp->chmap->map[i], dst)) in usb_chmap_ctl_tlv()
194 struct snd_pcm_chmap_elem *chmap = NULL; in usb_chmap_ctl_get() local
198 chmap = subs->cur_audiofmt->chmap; in usb_chmap_ctl_get()
199 if (chmap) { in usb_chmap_ctl_get()
200 for (i = 0; i < chmap->channels; i++) in usb_chmap_ctl_get()
201 ucontrol->value.integer.value[i] = chmap->map[i]; in usb_chmap_ctl_get()
213 struct snd_pcm_chmap *chmap; in add_chmap() local
218 if (fp->chmap) in add_chmap()
224 err = snd_pcm_add_chmap_ctls(pcm, stream, NULL, 0, 0, &chmap); in add_chmap()
229 chmap->private_data = subs; in add_chmap()
230 kctl = chmap->kctl; in add_chmap()
287 struct snd_pcm_chmap_elem *chmap; in convert_chmap() local
291 if (channels > ARRAY_SIZE(chmap->map)) in convert_chmap()
294 chmap = kzalloc(sizeof(*chmap), GFP_KERNEL); in convert_chmap()
295 if (!chmap) in convert_chmap()
299 chmap->channels = channels; in convert_chmap()
305 chmap->map[c++] = *maps; in convert_chmap()
310 chmap->map[c++] = SNDRV_CHMAP_MONO; in convert_chmap()
313 chmap->map[c++] = *maps; in convert_chmap()
317 chmap->map[c] = SNDRV_CHMAP_UNKNOWN; in convert_chmap()
319 return chmap; in convert_chmap()
328 struct snd_pcm_chmap_elem *chmap; in convert_chmap_v3() local
332 if (channels > ARRAY_SIZE(chmap->map)) in convert_chmap_v3()
335 chmap = kzalloc(sizeof(*chmap), GFP_KERNEL); in convert_chmap_v3()
336 if (!chmap) in convert_chmap_v3()
453 chmap->map[c++] = map; in convert_chmap_v3()
461 chmap->channels = channels; in convert_chmap_v3()
464 chmap->map[c] = SNDRV_CHMAP_UNKNOWN; in convert_chmap_v3()
466 return chmap; in convert_chmap_v3()
851 fp->chmap = convert_chmap(fp->channels, chconfig, protocol); in snd_usb_get_audioformat_uac12()
869 struct snd_pcm_chmap_elem *chmap; in snd_usb_get_audioformat_uac3() local
913 chmap = kzalloc(sizeof(*chmap), GFP_KERNEL); in snd_usb_get_audioformat_uac3()
914 if (!chmap) in snd_usb_get_audioformat_uac3()
918 chmap->map[0] = SNDRV_CHMAP_MONO; in snd_usb_get_audioformat_uac3()
920 chmap->map[0] = SNDRV_CHMAP_FL; in snd_usb_get_audioformat_uac3()
921 chmap->map[1] = SNDRV_CHMAP_FR; in snd_usb_get_audioformat_uac3()
924 chmap->channels = num_channels; in snd_usb_get_audioformat_uac3()
1003 chmap = convert_chmap_v3(cluster); in snd_usb_get_audioformat_uac3()
1028 kfree(chmap); in snd_usb_get_audioformat_uac3()
1035 kfree(chmap); in snd_usb_get_audioformat_uac3()
1039 fp->chmap = chmap; in snd_usb_get_audioformat_uac3()