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()
306 if (c == chmap->channels) in convert_chmap()
313 chmap->map[c++] = SNDRV_CHMAP_MONO; in convert_chmap()
316 chmap->map[c++] = *maps; in convert_chmap()
320 chmap->map[c] = SNDRV_CHMAP_UNKNOWN; in convert_chmap()
322 return chmap; in convert_chmap()
331 struct snd_pcm_chmap_elem *chmap; in convert_chmap_v3() local
335 if (channels > ARRAY_SIZE(chmap->map)) in convert_chmap_v3()
338 chmap = kzalloc(sizeof(*chmap), GFP_KERNEL); in convert_chmap_v3()
339 if (!chmap) in convert_chmap_v3()
456 chmap->map[c++] = map; in convert_chmap_v3()
464 chmap->channels = channels; in convert_chmap_v3()
467 chmap->map[c] = SNDRV_CHMAP_UNKNOWN; in convert_chmap_v3()
469 return chmap; in convert_chmap_v3()
858 fp->chmap = convert_chmap(fp->channels, chconfig, protocol); in snd_usb_get_audioformat_uac12()
877 struct snd_pcm_chmap_elem *chmap; in snd_usb_get_audioformat_uac3() local
922 chmap = kzalloc(sizeof(*chmap), GFP_KERNEL); in snd_usb_get_audioformat_uac3()
923 if (!chmap) in snd_usb_get_audioformat_uac3()
927 chmap->map[0] = SNDRV_CHMAP_MONO; in snd_usb_get_audioformat_uac3()
929 chmap->map[0] = SNDRV_CHMAP_FL; in snd_usb_get_audioformat_uac3()
930 chmap->map[1] = SNDRV_CHMAP_FR; in snd_usb_get_audioformat_uac3()
933 chmap->channels = num_channels; in snd_usb_get_audioformat_uac3()
1012 chmap = convert_chmap_v3(cluster); in snd_usb_get_audioformat_uac3()
1037 kfree(chmap); in snd_usb_get_audioformat_uac3()
1044 kfree(chmap); in snd_usb_get_audioformat_uac3()
1048 fp->chmap = chmap; in snd_usb_get_audioformat_uac3()