Lines Matching refs:uac
40 struct snd_uac_chip *uac; /* parent chip */ member
157 struct snd_uac_chip *uac = prm->uac; in u_audio_iso_complete() local
200 unsigned long long p_interval_mil = uac->p_interval * 1000000ULL; in u_audio_iso_complete()
204 do_div(div_result, uac->p_interval); in u_audio_iso_complete()
212 uac->p_framesize * frames, in u_audio_iso_complete()
217 p_pktsize_residue_mil = uac->p_framesize * residue_frames_mil; in u_audio_iso_complete()
222 uac->p_residue_mil += p_pktsize_residue_mil; in u_audio_iso_complete()
229 div_result = uac->p_residue_mil; in u_audio_iso_complete()
230 do_div(div_result, uac->p_interval); in u_audio_iso_complete()
232 if ((unsigned int) div_result >= uac->p_framesize) { in u_audio_iso_complete()
233 req->length += uac->p_framesize; in u_audio_iso_complete()
234 uac->p_residue_mil -= uac->p_framesize * p_interval_mil; in u_audio_iso_complete()
237 pr_debug("remains uac->p_residue_mil %llu\n", uac->p_residue_mil); in u_audio_iso_complete()
277 dev_err(uac->card->dev, "%d Error!\n", __LINE__); in u_audio_iso_complete()
284 struct snd_uac_chip *uac = prm->uac; in u_audio_iso_fback_complete() local
285 struct g_audio *audio_dev = uac->audio_dev; in u_audio_iso_fback_complete()
311 dev_err(uac->card->dev, "%d Error!\n", __LINE__); in u_audio_iso_fback_complete()
316 struct snd_uac_chip *uac = snd_pcm_substream_chip(substream); in uac_pcm_trigger() local
322 audio_dev = uac->audio_dev; in uac_pcm_trigger()
326 prm = &uac->p_prm; in uac_pcm_trigger()
328 prm = &uac->c_prm; in uac_pcm_trigger()
355 struct snd_uac_chip *uac = snd_pcm_substream_chip(substream); in uac_pcm_pointer() local
359 prm = &uac->p_prm; in uac_pcm_pointer()
361 prm = &uac->c_prm; in uac_pcm_pointer()
387 struct snd_uac_chip *uac = snd_pcm_substream_chip(substream); in uac_pcm_open() local
395 audio_dev = uac->audio_dev; in uac_pcm_open()
401 uac->p_residue_mil = 0; in uac_pcm_open()
408 prm = &uac->p_prm; in uac_pcm_open()
412 prm = &uac->c_prm; in uac_pcm_open()
442 struct snd_uac_chip *uac = prm->uac; in free_ep() local
450 audio_dev = uac->audio_dev; in free_ep()
470 dev_err(uac->card->dev, "%s:%d Error!\n", __func__, __LINE__); in free_ep()
475 struct snd_uac_chip *uac = prm->uac; in free_ep_fback() local
491 dev_err(uac->card->dev, "%s:%d Error!\n", __func__, __LINE__); in free_ep_fback()
503 snd_ctl_notify(prm->uac->card, SNDRV_CTL_EVENT_MASK_VALUE, in set_active()
512 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_set_capture_srate() local
518 prm = &uac->c_prm; in u_audio_set_capture_srate()
536 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_get_capture_srate() local
540 prm = &uac->c_prm; in u_audio_get_capture_srate()
551 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_set_playback_srate() local
557 prm = &uac->p_prm; in u_audio_set_playback_srate()
575 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_get_playback_srate() local
579 prm = &uac->p_prm; in u_audio_get_playback_srate()
589 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_start_capture() local
598 prm = &uac->c_prm; in u_audio_start_capture()
626 set_active(&uac->c_prm, true); in u_audio_start_capture()
671 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_stop_capture() local
673 set_active(&uac->c_prm, false); in u_audio_stop_capture()
675 free_ep_fback(&uac->c_prm, audio_dev->in_ep_fback); in u_audio_stop_capture()
676 free_ep(&uac->c_prm, audio_dev->out_ep); in u_audio_stop_capture()
682 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_start_playback() local
694 prm = &uac->p_prm; in u_audio_start_playback()
712 uac->p_framesize = params->p_ssize * in u_audio_start_playback()
714 uac->p_interval = factor / (1 << (ep_desc->bInterval - 1)); in u_audio_start_playback()
716 uac->p_framesize * in u_audio_start_playback()
717 (prm->srate / uac->p_interval), in u_audio_start_playback()
721 uac->p_residue_mil = 0; in u_audio_start_playback()
745 set_active(&uac->p_prm, true); in u_audio_start_playback()
753 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_stop_playback() local
755 set_active(&uac->p_prm, false); in u_audio_stop_playback()
756 free_ep(&uac->p_prm, audio_dev->in_ep); in u_audio_stop_playback()
762 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_suspend() local
764 set_active(&uac->p_prm, false); in u_audio_suspend()
765 set_active(&uac->c_prm, false); in u_audio_suspend()
771 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_get_volume() local
776 prm = &uac->p_prm; in u_audio_get_volume()
778 prm = &uac->c_prm; in u_audio_get_volume()
790 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_set_volume() local
796 prm = &uac->p_prm; in u_audio_set_volume()
798 prm = &uac->c_prm; in u_audio_set_volume()
809 snd_ctl_notify(uac->card, SNDRV_CTL_EVENT_MASK_VALUE, in u_audio_set_volume()
818 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_get_mute() local
823 prm = &uac->p_prm; in u_audio_get_mute()
825 prm = &uac->c_prm; in u_audio_get_mute()
837 struct snd_uac_chip *uac = audio_dev->uac; in u_audio_set_mute() local
844 prm = &uac->p_prm; in u_audio_set_mute()
846 prm = &uac->c_prm; in u_audio_set_mute()
858 snd_ctl_notify(uac->card, SNDRV_CTL_EVENT_MASK_VALUE, in u_audio_set_mute()
870 struct snd_uac_chip *uac = prm->uac; in u_audio_pitch_info() local
871 struct g_audio *audio_dev = uac->audio_dev; in u_audio_pitch_info()
900 struct snd_uac_chip *uac = prm->uac; in u_audio_pitch_put() local
901 struct g_audio *audio_dev = uac->audio_dev; in u_audio_pitch_put()
954 struct snd_uac_chip *uac = prm->uac; in u_audio_mute_put() local
955 struct g_audio *audio_dev = uac->audio_dev; in u_audio_mute_put()
1030 struct snd_uac_chip *uac = prm->uac; in u_audio_volume_put() local
1031 struct g_audio *audio_dev = uac->audio_dev; in u_audio_volume_put()
1085 struct snd_uac_chip *uac = prm->uac; in u_audio_rate_info() local
1086 struct g_audio *audio_dev = uac->audio_dev; in u_audio_rate_info()
1092 if (prm == &uac->c_prm) in u_audio_rate_info()
1158 struct snd_uac_chip *uac; in g_audio_setup() local
1169 uac = kzalloc(sizeof(*uac), GFP_KERNEL); in g_audio_setup()
1170 if (!uac) in g_audio_setup()
1172 g_audio->uac = uac; in g_audio_setup()
1173 uac->audio_dev = g_audio; in g_audio_setup()
1180 struct uac_rtd_params *prm = &uac->c_prm; in g_audio_setup()
1183 uac->c_prm.uac = uac; in g_audio_setup()
1205 struct uac_rtd_params *prm = &uac->p_prm; in g_audio_setup()
1208 uac->p_prm.uac = uac; in g_audio_setup()
1235 uac->card = card; in g_audio_setup()
1241 err = snd_pcm_new(uac->card, pcm_name, 0, in g_audio_setup()
1247 pcm->private_data = uac; in g_audio_setup()
1248 uac->pcm = pcm; in g_audio_setup()
1264 &uac->c_prm); in g_audio_setup()
1280 &uac->p_prm); in g_audio_setup()
1304 prm = &uac->p_prm; in g_audio_setup()
1308 prm = &uac->c_prm; in g_audio_setup()
1404 kfree(uac->p_prm.reqs); in g_audio_setup()
1405 kfree(uac->c_prm.reqs); in g_audio_setup()
1406 kfree(uac->p_prm.rbuf); in g_audio_setup()
1407 kfree(uac->c_prm.rbuf); in g_audio_setup()
1408 kfree(uac); in g_audio_setup()
1416 struct snd_uac_chip *uac; in g_audio_cleanup() local
1419 if (!g_audio || !g_audio->uac) in g_audio_cleanup()
1422 uac = g_audio->uac; in g_audio_cleanup()
1423 card = uac->card; in g_audio_cleanup()
1427 kfree(uac->p_prm.reqs); in g_audio_cleanup()
1428 kfree(uac->c_prm.reqs); in g_audio_cleanup()
1429 kfree(uac->p_prm.rbuf); in g_audio_cleanup()
1430 kfree(uac->c_prm.rbuf); in g_audio_cleanup()
1431 kfree(uac); in g_audio_cleanup()