• Home
  • Raw
  • Download

Lines Matching refs:cdev

101 catpt_stream_find(struct catpt_dev *cdev, u8 stream_hw_id)  in catpt_stream_find()  argument
105 spin_lock(&cdev->list_lock); in catpt_stream_find()
106 list_for_each_entry(pos, &cdev->stream_list, node) { in catpt_stream_find()
113 spin_unlock(&cdev->list_lock); in catpt_stream_find()
117 static u32 catpt_stream_read_position(struct catpt_dev *cdev, in catpt_stream_read_position() argument
122 memcpy_fromio(&pos, cdev->lpe_ba + stream->info.read_pos_regaddr, in catpt_stream_read_position()
127 static u32 catpt_stream_volume(struct catpt_dev *cdev, in catpt_stream_volume() argument
136 memcpy_fromio(&volume, cdev->lpe_ba + offset, sizeof(volume)); in catpt_stream_volume()
140 static u32 catpt_mixer_volume(struct catpt_dev *cdev, in catpt_mixer_volume() argument
149 memcpy_fromio(&volume, cdev->lpe_ba + offset, sizeof(volume)); in catpt_mixer_volume()
264 struct catpt_dev *cdev = dev_get_drvdata(dai->dev); in catpt_dai_startup() local
274 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, cdev->dev, PAGE_SIZE, in catpt_dai_startup()
279 res = catpt_request_region(&cdev->dram, template->persistent_size); in catpt_dai_startup()
285 catpt_dsp_update_srampge(cdev, &cdev->dram, cdev->spec->dram_mask); in catpt_dai_startup()
293 spin_lock(&cdev->list_lock); in catpt_dai_startup()
294 list_add_tail(&stream->node, &cdev->stream_list); in catpt_dai_startup()
295 spin_unlock(&cdev->list_lock); in catpt_dai_startup()
310 struct catpt_dev *cdev = dev_get_drvdata(dai->dev); in catpt_dai_shutdown() local
314 spin_lock(&cdev->list_lock); in catpt_dai_shutdown()
316 spin_unlock(&cdev->list_lock); in catpt_dai_shutdown()
320 catpt_dsp_update_srampge(cdev, &cdev->dram, cdev->spec->dram_mask); in catpt_dai_shutdown()
327 static int catpt_set_dspvol(struct catpt_dev *cdev, u8 stream_id, long *ctlvol);
334 struct catpt_dev *cdev = dev_get_drvdata(dai->dev); in catpt_dai_apply_usettings() local
366 return catpt_set_dspvol(cdev, id, (long *)pos->private_value); in catpt_dai_apply_usettings()
367 ret = catpt_ipc_mute_loopback(cdev, id, *(bool *)pos->private_value); in catpt_dai_apply_usettings()
382 struct catpt_dev *cdev = dev_get_drvdata(dai->dev); in catpt_dai_hw_params() local
408 ret = catpt_ipc_alloc_stream(cdev, stream->template->path_id, in catpt_dai_hw_params()
414 cdev->scratch, in catpt_dai_hw_params()
431 struct catpt_dev *cdev = dev_get_drvdata(dai->dev); in catpt_dai_hw_free() local
437 catpt_ipc_reset_stream(cdev, stream->info.stream_hw_id); in catpt_dai_hw_free()
438 catpt_ipc_free_stream(cdev, stream->info.stream_hw_id); in catpt_dai_hw_free()
448 struct catpt_dev *cdev = dev_get_drvdata(dai->dev); in catpt_dai_prepare() local
455 ret = catpt_ipc_reset_stream(cdev, stream->info.stream_hw_id); in catpt_dai_prepare()
459 ret = catpt_ipc_pause_stream(cdev, stream->info.stream_hw_id); in catpt_dai_prepare()
472 struct catpt_dev *cdev = dev_get_drvdata(dai->dev); in catpt_dai_trigger() local
489 ret = catpt_ipc_set_write_pos(cdev, stream->info.stream_hw_id, in catpt_dai_trigger()
497 catpt_dsp_update_lpclock(cdev); in catpt_dai_trigger()
498 ret = catpt_ipc_resume_stream(cdev, stream->info.stream_hw_id); in catpt_dai_trigger()
508 ret = catpt_ipc_pause_stream(cdev, stream->info.stream_hw_id); in catpt_dai_trigger()
509 catpt_dsp_update_lpclock(cdev); in catpt_dai_trigger()
521 void catpt_stream_update_position(struct catpt_dev *cdev, in catpt_stream_update_position() argument
546 ret = catpt_ipc_set_write_pos(cdev, stream->info.stream_hw_id, in catpt_stream_update_position()
550 dev_err(cdev->dev, "update position for stream %d failed: %d\n", in catpt_stream_update_position()
583 struct catpt_dev *cdev = dev_get_drvdata(component->dev); in catpt_component_pcm_construct() local
586 cdev->dev, in catpt_component_pcm_construct()
610 struct catpt_dev *cdev = dev_get_drvdata(component->dev); in catpt_component_pointer() local
617 pos = catpt_stream_read_position(cdev, stream); in catpt_component_pointer()
636 struct catpt_dev *cdev = dev_get_drvdata(dai->dev); in catpt_dai_pcm_new() local
667 if (!memcmp(&cdev->devfmt[devfmt.iface], &devfmt, sizeof(devfmt))) in catpt_dai_pcm_new()
670 ret = pm_runtime_resume_and_get(cdev->dev); in catpt_dai_pcm_new()
674 ret = catpt_ipc_set_device_format(cdev, &devfmt); in catpt_dai_pcm_new()
676 pm_runtime_mark_last_busy(cdev->dev); in catpt_dai_pcm_new()
677 pm_runtime_put_autosuspend(cdev->dev); in catpt_dai_pcm_new()
683 memcpy(&cdev->devfmt[devfmt.iface], &devfmt, sizeof(devfmt)); in catpt_dai_pcm_new()
809 static int catpt_set_dspvol(struct catpt_dev *cdev, u8 stream_id, long *ctlvol) in catpt_set_dspvol() argument
821 ret = catpt_ipc_set_volume(cdev, stream_id, in catpt_set_dspvol()
828 ret = catpt_ipc_set_volume(cdev, stream_id, in catpt_set_dspvol()
856 struct catpt_dev *cdev = dev_get_drvdata(component->dev); in catpt_mixer_volume_get() local
861 ret = pm_runtime_resume_and_get(cdev->dev); in catpt_mixer_volume_get()
866 dspvol = catpt_mixer_volume(cdev, &cdev->mixer, i); in catpt_mixer_volume_get()
870 pm_runtime_mark_last_busy(cdev->dev); in catpt_mixer_volume_get()
871 pm_runtime_put_autosuspend(cdev->dev); in catpt_mixer_volume_get()
881 struct catpt_dev *cdev = dev_get_drvdata(component->dev); in catpt_mixer_volume_put() local
884 ret = pm_runtime_resume_and_get(cdev->dev); in catpt_mixer_volume_put()
888 ret = catpt_set_dspvol(cdev, cdev->mixer.mixer_hw_id, in catpt_mixer_volume_put()
891 pm_runtime_mark_last_busy(cdev->dev); in catpt_mixer_volume_put()
892 pm_runtime_put_autosuspend(cdev->dev); in catpt_mixer_volume_put()
904 struct catpt_dev *cdev = dev_get_drvdata(component->dev); in catpt_stream_volume_get() local
910 stream = catpt_stream_find(cdev, pin_id); in catpt_stream_volume_get()
917 ret = pm_runtime_resume_and_get(cdev->dev); in catpt_stream_volume_get()
922 dspvol = catpt_stream_volume(cdev, stream, i); in catpt_stream_volume_get()
926 pm_runtime_mark_last_busy(cdev->dev); in catpt_stream_volume_get()
927 pm_runtime_put_autosuspend(cdev->dev); in catpt_stream_volume_get()
939 struct catpt_dev *cdev = dev_get_drvdata(component->dev); in catpt_stream_volume_put() local
943 stream = catpt_stream_find(cdev, pin_id); in catpt_stream_volume_put()
950 ret = pm_runtime_resume_and_get(cdev->dev); in catpt_stream_volume_put()
954 ret = catpt_set_dspvol(cdev, stream->info.stream_hw_id, in catpt_stream_volume_put()
957 pm_runtime_mark_last_busy(cdev->dev); in catpt_stream_volume_put()
958 pm_runtime_put_autosuspend(cdev->dev); in catpt_stream_volume_put()
1017 struct catpt_dev *cdev = dev_get_drvdata(component->dev); in catpt_loopback_switch_put() local
1022 stream = catpt_stream_find(cdev, CATPT_PIN_ID_REFERENCE); in catpt_loopback_switch_put()
1028 ret = pm_runtime_resume_and_get(cdev->dev); in catpt_loopback_switch_put()
1032 ret = catpt_ipc_mute_loopback(cdev, stream->info.stream_hw_id, mute); in catpt_loopback_switch_put()
1034 pm_runtime_mark_last_busy(cdev->dev); in catpt_loopback_switch_put()
1035 pm_runtime_put_autosuspend(cdev->dev); in catpt_loopback_switch_put()
1139 int catpt_arm_stream_templates(struct catpt_dev *cdev) in catpt_arm_stream_templates() argument
1155 type = &cdev->modules[entry->module_id]; in catpt_arm_stream_templates()
1169 res = catpt_request_region(&cdev->dram, scratch_size); in catpt_arm_stream_templates()
1172 cdev->scratch = res; in catpt_arm_stream_templates()
1178 int catpt_register_plat_component(struct catpt_dev *cdev) in catpt_register_plat_component() argument
1183 component = devm_kzalloc(cdev->dev, sizeof(*component), GFP_KERNEL); in catpt_register_plat_component()
1188 cdev->dev); in catpt_register_plat_component()