Lines Matching refs:uac
38 struct snd_uac_chip *uac; /* parent chip */ member
155 struct snd_uac_chip *uac = prm->uac; in u_audio_iso_complete() local
195 req->length = uac->p_pktsize; in u_audio_iso_complete()
196 uac->p_residue += uac->p_pktsize_residue; in u_audio_iso_complete()
203 if (uac->p_residue / uac->p_interval >= uac->p_framesize) { in u_audio_iso_complete()
204 req->length += uac->p_framesize; in u_audio_iso_complete()
205 uac->p_residue -= uac->p_framesize * in u_audio_iso_complete()
206 uac->p_interval; in u_audio_iso_complete()
247 dev_err(uac->card->dev, "%d Error!\n", __LINE__); in u_audio_iso_complete()
254 struct snd_uac_chip *uac = prm->uac; in u_audio_iso_fback_complete() local
255 struct g_audio *audio_dev = uac->audio_dev; in u_audio_iso_fback_complete()
282 dev_err(uac->card->dev, "%d Error!\n", __LINE__); in u_audio_iso_fback_complete()
287 struct snd_uac_chip *uac = snd_pcm_substream_chip(substream); in uac_pcm_trigger() local
293 audio_dev = uac->audio_dev; in uac_pcm_trigger()
297 prm = &uac->p_prm; in uac_pcm_trigger()
299 prm = &uac->c_prm; in uac_pcm_trigger()
326 struct snd_uac_chip *uac = snd_pcm_substream_chip(substream); in uac_pcm_pointer() local
330 prm = &uac->p_prm; in uac_pcm_pointer()
332 prm = &uac->c_prm; in uac_pcm_pointer()
358 struct snd_uac_chip *uac = snd_pcm_substream_chip(substream); in uac_pcm_open() local
366 audio_dev = uac->audio_dev; in uac_pcm_open()
374 uac->p_residue = 0; in uac_pcm_open()
382 runtime->hw.period_bytes_min = 2 * uac->p_prm.max_psize in uac_pcm_open()
388 runtime->hw.period_bytes_min = 2 * uac->c_prm.max_psize in uac_pcm_open()
416 struct snd_uac_chip *uac = prm->uac; in free_ep() local
424 audio_dev = uac->audio_dev; in free_ep()
444 dev_err(uac->card->dev, "%s:%d Error!\n", __func__, __LINE__); in free_ep()
449 struct snd_uac_chip *uac = prm->uac; in free_ep_fback() local
465 dev_err(uac->card->dev, "%s:%d Error!\n", __func__, __LINE__); in free_ep_fback()
470 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_start_capture() local
480 prm = &uac->c_prm; in u_audio_start_capture()
549 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_stop_capture() local
552 free_ep_fback(&uac->c_prm, audio_dev->in_ep_fback); in u_audio_stop_capture()
553 free_ep(&uac->c_prm, audio_dev->out_ep); in u_audio_stop_capture()
559 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_start_playback() local
571 prm = &uac->p_prm; in u_audio_start_playback()
583 uac->p_framesize = params->p_ssize * in u_audio_start_playback()
585 uac->p_interval = factor / (1 << (ep_desc->bInterval - 1)); in u_audio_start_playback()
586 uac->p_pktsize = min_t(unsigned int, in u_audio_start_playback()
587 uac->p_framesize * in u_audio_start_playback()
588 (params->p_srate / uac->p_interval), in u_audio_start_playback()
591 if (uac->p_pktsize < ep->maxpacket) in u_audio_start_playback()
592 uac->p_pktsize_residue = uac->p_framesize * in u_audio_start_playback()
593 (params->p_srate % uac->p_interval); in u_audio_start_playback()
595 uac->p_pktsize_residue = 0; in u_audio_start_playback()
597 req_len = uac->p_pktsize; in u_audio_start_playback()
598 uac->p_residue = 0; in u_audio_start_playback()
628 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_stop_playback() local
630 free_ep(&uac->p_prm, audio_dev->in_ep); in u_audio_stop_playback()
636 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_get_volume() local
641 prm = &uac->p_prm; in u_audio_get_volume()
643 prm = &uac->c_prm; in u_audio_get_volume()
655 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_set_volume() local
661 prm = &uac->p_prm; in u_audio_set_volume()
663 prm = &uac->c_prm; in u_audio_set_volume()
674 snd_ctl_notify(uac->card, SNDRV_CTL_EVENT_MASK_VALUE, in u_audio_set_volume()
683 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_get_mute() local
688 prm = &uac->p_prm; in u_audio_get_mute()
690 prm = &uac->c_prm; in u_audio_get_mute()
702 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_set_mute() local
709 prm = &uac->p_prm; in u_audio_set_mute()
711 prm = &uac->c_prm; in u_audio_set_mute()
723 snd_ctl_notify(uac->card, SNDRV_CTL_EVENT_MASK_VALUE, in u_audio_set_mute()
735 struct snd_uac_chip *uac = prm->uac; in u_audio_pitch_info() local
736 struct g_audio *audio_dev = uac->audio_dev; in u_audio_pitch_info()
765 struct snd_uac_chip *uac = prm->uac; in u_audio_pitch_put() local
766 struct g_audio *audio_dev = uac->audio_dev; in u_audio_pitch_put()
819 struct snd_uac_chip *uac = prm->uac; in u_audio_mute_put() local
820 struct g_audio *audio_dev = uac->audio_dev; in u_audio_mute_put()
895 struct snd_uac_chip *uac = prm->uac; in u_audio_volume_put() local
896 struct g_audio *audio_dev = uac->audio_dev; in u_audio_volume_put()
947 struct snd_uac_chip *uac; in g_audio_setup() local
958 uac = kzalloc(sizeof(*uac), GFP_KERNEL); in g_audio_setup()
959 if (!uac) in g_audio_setup()
961 g_audio->uac = uac; in g_audio_setup()
962 uac->audio_dev = g_audio; in g_audio_setup()
969 struct uac_rtd_params *prm = &uac->c_prm; in g_audio_setup()
972 uac->c_prm.uac = uac; in g_audio_setup()
993 struct uac_rtd_params *prm = &uac->p_prm; in g_audio_setup()
996 uac->p_prm.uac = uac; in g_audio_setup()
1022 uac->card = card; in g_audio_setup()
1028 err = snd_pcm_new(uac->card, pcm_name, 0, in g_audio_setup()
1034 pcm->private_data = uac; in g_audio_setup()
1035 uac->pcm = pcm; in g_audio_setup()
1051 &uac->c_prm); in g_audio_setup()
1075 prm = &uac->p_prm; in g_audio_setup()
1079 prm = &uac->c_prm; in g_audio_setup()
1156 kfree(uac->p_prm.reqs); in g_audio_setup()
1157 kfree(uac->c_prm.reqs); in g_audio_setup()
1158 kfree(uac->p_prm.rbuf); in g_audio_setup()
1159 kfree(uac->c_prm.rbuf); in g_audio_setup()
1160 kfree(uac); in g_audio_setup()
1168 struct snd_uac_chip *uac; in g_audio_cleanup() local
1171 if (!g_audio || !g_audio->uac) in g_audio_cleanup()
1174 uac = g_audio->uac; in g_audio_cleanup()
1175 card = uac->card; in g_audio_cleanup()
1179 kfree(uac->p_prm.reqs); in g_audio_cleanup()
1180 kfree(uac->c_prm.reqs); in g_audio_cleanup()
1181 kfree(uac->p_prm.rbuf); in g_audio_cleanup()
1182 kfree(uac->c_prm.rbuf); in g_audio_cleanup()
1183 kfree(uac); in g_audio_cleanup()