Lines Matching refs:drv

31 static int sst_fill_byte_control(struct sst_data *drv,  in sst_fill_byte_control()  argument
36 struct snd_sst_bytes_v2 *byte_data = drv->byte_stream; in sst_fill_byte_control()
45 dev_err(&drv->pdev->dev, "command length too big (%u)", len); in sst_fill_byte_control()
55 static int sst_fill_and_send_cmd_unlocked(struct sst_data *drv, in sst_fill_and_send_cmd_unlocked() argument
61 ret = sst_fill_byte_control(drv, ipc_msg, in sst_fill_and_send_cmd_unlocked()
65 return sst->ops->send_byte_stream(sst->dev, drv->byte_stream); in sst_fill_and_send_cmd_unlocked()
73 static int sst_fill_and_send_cmd(struct sst_data *drv, in sst_fill_and_send_cmd() argument
79 mutex_lock(&drv->lock); in sst_fill_and_send_cmd()
80 ret = sst_fill_and_send_cmd_unlocked(drv, ipc_msg, block, in sst_fill_and_send_cmd()
82 mutex_unlock(&drv->lock); in sst_fill_and_send_cmd()
113 static int sst_send_slot_map(struct sst_data *drv) in sst_send_slot_map() argument
130 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()
221 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_slot_put() local
237 mutex_lock(&drv->lock); in sst_slot_put()
244 ret = sst_check_and_send_slot_map(drv, kcontrol); in sst_slot_put()
246 mutex_unlock(&drv->lock); in sst_slot_put()
258 ret = sst_check_and_send_slot_map(drv, kcontrol); in sst_slot_put()
260 mutex_unlock(&drv->lock); in sst_slot_put()
264 static int sst_send_algo_cmd(struct sst_data *drv, in sst_send_algo_cmd() argument
281 ret = sst_fill_and_send_cmd_unlocked(drv, SST_IPC_IA_SET_PARAMS, in sst_send_algo_cmd()
294 static int sst_find_and_send_pipe_algo(struct sst_data *drv, in sst_find_and_send_pipe_algo() argument
301 dev_dbg(&drv->pdev->dev, "Enter: widget=%s\n", pipe); in sst_find_and_send_pipe_algo()
306 dev_dbg(&drv->pdev->dev, "Found algo control name=%s pipe=%s\n", in sst_find_and_send_pipe_algo()
308 ret = sst_send_algo_cmd(drv, bc); in sst_find_and_send_pipe_algo()
350 struct sst_data *drv = snd_soc_component_get_drvdata(cmpnt); in sst_algo_control_set() local
354 mutex_lock(&drv->lock); in sst_algo_control_set()
360 mutex_unlock(&drv->lock); in sst_algo_control_set()
367 ret = sst_send_algo_cmd(drv, bc); in sst_algo_control_set()
368 mutex_unlock(&drv->lock); in sst_algo_control_set()
400 static int sst_send_gain_cmd(struct sst_data *drv, struct sst_gain_value *gv, in sst_send_gain_cmd() argument
405 dev_dbg(&drv->pdev->dev, "Enter\n"); in sst_send_gain_cmd()
427 return sst_fill_and_send_cmd_unlocked(drv, SST_IPC_IA_SET_PARAMS, in sst_send_gain_cmd()
467 struct sst_data *drv = snd_soc_component_get_drvdata(cmpnt); in sst_gain_put() local
471 mutex_lock(&drv->lock); in sst_gain_put()
493 mutex_unlock(&drv->lock); in sst_gain_put()
500 ret = sst_send_gain_cmd(drv, gv, mc->task_id, in sst_gain_put()
502 mutex_unlock(&drv->lock); in sst_gain_put()
508 struct sst_data *drv, int mute);
514 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_send_pipe_module_params() local
517 mutex_lock(&drv->lock); in sst_send_pipe_module_params()
518 sst_find_and_send_pipe_algo(drv, w->name, ids); in sst_send_pipe_module_params()
519 sst_set_pipe_gain(ids, drv, 0); in sst_send_pipe_module_params()
520 mutex_unlock(&drv->lock); in sst_send_pipe_module_params()
589 struct sst_data *drv, int mute) in sst_set_pipe_gain() argument
599 dev_dbg(&drv->pdev->dev, "control name=%s\n", kctl->id.name); in sst_set_pipe_gain()
603 ret = sst_send_gain_cmd(drv, gv, mc->task_id, in sst_set_pipe_gain()
616 struct sst_data *drv = snd_soc_component_get_drvdata(cmpnt); in sst_swm_mixer_event() local
669 return sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, in sst_swm_mixer_event()
732 struct sst_data *drv = snd_soc_dai_get_drvdata(dai); in sst_handle_vb_timer() local
750 mutex_lock(&drv->lock); in sst_handle_vb_timer()
762 ret = sst_fill_and_send_cmd_unlocked(drv, SST_IPC_IA_CMD, in sst_handle_vb_timer()
770 mutex_unlock(&drv->lock); in sst_handle_vb_timer()
797 struct sst_data *drv = snd_soc_dai_get_drvdata(dai); in send_ssp_cmd() local
830 return sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, in send_ssp_cmd()
840 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_set_be_modules() local
845 ret = sst_send_slot_map(drv); in sst_set_be_modules()
859 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_set_media_path() local
879 ret = sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, in sst_set_media_path()
896 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_set_media_loop() local
917 ret = sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, in sst_set_media_loop()
1170 struct sst_data *drv = snd_soc_dai_get_drvdata(dai); in sst_send_pipe_gains() local
1190 mutex_lock(&drv->lock); in sst_send_pipe_gains()
1191 sst_set_pipe_gain(ids, drv, mute); in sst_send_pipe_gains()
1192 mutex_unlock(&drv->lock); in sst_send_pipe_gains()
1209 mutex_lock(&drv->lock); in sst_send_pipe_gains()
1210 sst_set_pipe_gain(ids, drv, mute); in sst_send_pipe_gains()
1211 mutex_unlock(&drv->lock); in sst_send_pipe_gains()
1379 struct sst_data *drv = snd_soc_platform_get_drvdata(platform); in sst_dsp_init_v2_dpcm() local
1382 drv->byte_stream = devm_kzalloc(platform->dev, in sst_dsp_init_v2_dpcm()
1384 if (!drv->byte_stream) in sst_dsp_init_v2_dpcm()