Lines Matching refs:drv

23 static int sst_fill_byte_control(struct sst_data *drv,  in sst_fill_byte_control()  argument
28 struct snd_sst_bytes_v2 *byte_data = drv->byte_stream; in sst_fill_byte_control()
37 dev_err(&drv->pdev->dev, "command length too big (%u)", len); in sst_fill_byte_control()
47 static int sst_fill_and_send_cmd_unlocked(struct sst_data *drv, in sst_fill_and_send_cmd_unlocked() argument
53 WARN_ON(!mutex_is_locked(&drv->lock)); in sst_fill_and_send_cmd_unlocked()
55 ret = sst_fill_byte_control(drv, ipc_msg, in sst_fill_and_send_cmd_unlocked()
59 return sst->ops->send_byte_stream(sst->dev, drv->byte_stream); in sst_fill_and_send_cmd_unlocked()
72 static int sst_fill_and_send_cmd(struct sst_data *drv, in sst_fill_and_send_cmd() argument
78 mutex_lock(&drv->lock); in sst_fill_and_send_cmd()
79 ret = sst_fill_and_send_cmd_unlocked(drv, ipc_msg, block, in sst_fill_and_send_cmd()
81 mutex_unlock(&drv->lock); in sst_fill_and_send_cmd()
112 static int sst_send_slot_map(struct sst_data *drv) in sst_send_slot_map() argument
129 return sst_fill_and_send_cmd_unlocked(drv, SST_IPC_IA_SET_PARAMS, in sst_send_slot_map()
164 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_slot_get() local
170 mutex_lock(&drv->lock); in sst_slot_get()
178 mutex_unlock(&drv->lock); in sst_slot_get()
191 static int sst_check_and_send_slot_map(struct sst_data *drv, struct snd_kcontrol *kcontrol) in sst_check_and_send_slot_map() argument
197 ret = sst_send_slot_map(drv); in sst_check_and_send_slot_map()
199 dev_err(&drv->pdev->dev, "Slot control: %s doesn't have DAPM widget!!!\n", in sst_check_and_send_slot_map()
222 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_slot_put() local
238 mutex_lock(&drv->lock); in sst_slot_put()
245 ret = sst_check_and_send_slot_map(drv, kcontrol); in sst_slot_put()
247 mutex_unlock(&drv->lock); in sst_slot_put()
259 ret = sst_check_and_send_slot_map(drv, kcontrol); in sst_slot_put()
261 mutex_unlock(&drv->lock); in sst_slot_put()
265 static int sst_send_algo_cmd(struct sst_data *drv, in sst_send_algo_cmd() argument
282 ret = sst_fill_and_send_cmd_unlocked(drv, SST_IPC_IA_SET_PARAMS, in sst_send_algo_cmd()
297 static int sst_find_and_send_pipe_algo(struct sst_data *drv, in sst_find_and_send_pipe_algo() argument
304 dev_dbg(&drv->pdev->dev, "Enter: widget=%s\n", pipe); in sst_find_and_send_pipe_algo()
309 dev_dbg(&drv->pdev->dev, "Found algo control name=%s pipe=%s\n", in sst_find_and_send_pipe_algo()
311 ret = sst_send_algo_cmd(drv, bc); in sst_find_and_send_pipe_algo()
353 struct sst_data *drv = snd_soc_component_get_drvdata(cmpnt); in sst_algo_control_set() local
357 mutex_lock(&drv->lock); in sst_algo_control_set()
363 mutex_unlock(&drv->lock); in sst_algo_control_set()
370 ret = sst_send_algo_cmd(drv, bc); in sst_algo_control_set()
371 mutex_unlock(&drv->lock); in sst_algo_control_set()
407 static int sst_send_gain_cmd(struct sst_data *drv, struct sst_gain_value *gv, in sst_send_gain_cmd() argument
412 dev_dbg(&drv->pdev->dev, "Enter\n"); in sst_send_gain_cmd()
434 return sst_fill_and_send_cmd_unlocked(drv, SST_IPC_IA_SET_PARAMS, in sst_send_gain_cmd()
474 struct sst_data *drv = snd_soc_component_get_drvdata(cmpnt); in sst_gain_put() local
478 mutex_lock(&drv->lock); in sst_gain_put()
500 mutex_unlock(&drv->lock); in sst_gain_put()
507 ret = sst_send_gain_cmd(drv, gv, mc->task_id, in sst_gain_put()
509 mutex_unlock(&drv->lock); in sst_gain_put()
515 struct sst_data *drv, int mute);
521 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_send_pipe_module_params() local
524 mutex_lock(&drv->lock); in sst_send_pipe_module_params()
525 sst_find_and_send_pipe_algo(drv, w->name, ids); in sst_send_pipe_module_params()
526 sst_set_pipe_gain(ids, drv, 0); in sst_send_pipe_module_params()
527 mutex_unlock(&drv->lock); in sst_send_pipe_module_params()
600 struct sst_data *drv, int mute) in sst_set_pipe_gain() argument
610 dev_dbg(&drv->pdev->dev, "control name=%s\n", kctl->id.name); in sst_set_pipe_gain()
614 ret = sst_send_gain_cmd(drv, gv, mc->task_id, in sst_set_pipe_gain()
627 struct sst_data *drv = snd_soc_component_get_drvdata(cmpnt); in sst_swm_mixer_event() local
680 return sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, in sst_swm_mixer_event()
746 struct sst_data *drv = snd_soc_dai_get_drvdata(dai); in sst_handle_vb_timer() local
764 mutex_lock(&drv->lock); in sst_handle_vb_timer()
776 ret = sst_fill_and_send_cmd_unlocked(drv, SST_IPC_IA_CMD, in sst_handle_vb_timer()
784 mutex_unlock(&drv->lock); in sst_handle_vb_timer()
945 struct sst_data *drv = snd_soc_dai_get_drvdata(dai); in send_ssp_cmd() local
959 SST_FILL_DEFAULT_DESTINATION(drv->ssp_cmd.header.dst); in send_ssp_cmd()
960 drv->ssp_cmd.header.command_id = SBA_HW_SET_SSP; in send_ssp_cmd()
961 drv->ssp_cmd.header.length = sizeof(struct sst_cmd_sba_hw_set_ssp) in send_ssp_cmd()
964 drv->ssp_cmd.selection = ssp_id; in send_ssp_cmd()
968 drv->ssp_cmd.switch_state = SST_SWITCH_ON; in send_ssp_cmd()
970 drv->ssp_cmd.switch_state = SST_SWITCH_OFF; in send_ssp_cmd()
972 return sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, in send_ssp_cmd()
973 SST_TASK_SBA, 0, &drv->ssp_cmd, in send_ssp_cmd()
974 sizeof(drv->ssp_cmd.header) + drv->ssp_cmd.header.length); in send_ssp_cmd()
982 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_set_be_modules() local
987 mutex_lock(&drv->lock); in sst_set_be_modules()
988 ret = sst_send_slot_map(drv); in sst_set_be_modules()
989 mutex_unlock(&drv->lock); in sst_set_be_modules()
1003 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_set_media_path() local
1023 ret = sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, in sst_set_media_path()
1040 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_set_media_loop() local
1061 ret = sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, in sst_set_media_loop()
1329 struct sst_data *drv = snd_soc_dai_get_drvdata(dai); in sst_send_pipe_gains() local
1347 mutex_lock(&drv->lock); in sst_send_pipe_gains()
1348 sst_set_pipe_gain(ids, drv, mute); in sst_send_pipe_gains()
1349 mutex_unlock(&drv->lock); in sst_send_pipe_gains()
1363 mutex_lock(&drv->lock); in sst_send_pipe_gains()
1364 sst_set_pipe_gain(ids, drv, mute); in sst_send_pipe_gains()
1365 mutex_unlock(&drv->lock); in sst_send_pipe_gains()
1535 struct sst_data *drv = snd_soc_component_get_drvdata(component); in sst_dsp_init_v2_dpcm() local
1538 drv->byte_stream = devm_kzalloc(component->dev, in sst_dsp_init_v2_dpcm()
1540 if (!drv->byte_stream) in sst_dsp_init_v2_dpcm()