• Home
  • Raw
  • Download

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()
590 struct sst_data *drv, int mute) in sst_set_pipe_gain() argument
600 dev_dbg(&drv->pdev->dev, "control name=%s\n", kctl->id.name); in sst_set_pipe_gain()
604 ret = sst_send_gain_cmd(drv, gv, mc->task_id, in sst_set_pipe_gain()
617 struct sst_data *drv = snd_soc_component_get_drvdata(cmpnt); in sst_swm_mixer_event() local
670 return sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, in sst_swm_mixer_event()
736 struct sst_data *drv = snd_soc_dai_get_drvdata(dai); in sst_handle_vb_timer() local
754 mutex_lock(&drv->lock); in sst_handle_vb_timer()
766 ret = sst_fill_and_send_cmd_unlocked(drv, SST_IPC_IA_CMD, in sst_handle_vb_timer()
774 mutex_unlock(&drv->lock); in sst_handle_vb_timer()
937 struct sst_data *drv = snd_soc_dai_get_drvdata(dai); in send_ssp_cmd() local
951 SST_FILL_DEFAULT_DESTINATION(drv->ssp_cmd.header.dst); in send_ssp_cmd()
952 drv->ssp_cmd.header.command_id = SBA_HW_SET_SSP; in send_ssp_cmd()
953 drv->ssp_cmd.header.length = sizeof(struct sst_cmd_sba_hw_set_ssp) in send_ssp_cmd()
956 drv->ssp_cmd.selection = ssp_id; in send_ssp_cmd()
960 drv->ssp_cmd.switch_state = SST_SWITCH_ON; in send_ssp_cmd()
962 drv->ssp_cmd.switch_state = SST_SWITCH_OFF; in send_ssp_cmd()
964 return sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, in send_ssp_cmd()
965 SST_TASK_SBA, 0, &drv->ssp_cmd, in send_ssp_cmd()
966 sizeof(drv->ssp_cmd.header) + drv->ssp_cmd.header.length); in send_ssp_cmd()
974 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_set_be_modules() local
979 ret = sst_send_slot_map(drv); in sst_set_be_modules()
993 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_set_media_path() local
1013 ret = sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, in sst_set_media_path()
1030 struct sst_data *drv = snd_soc_component_get_drvdata(c); in sst_set_media_loop() local
1051 ret = sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, in sst_set_media_loop()
1316 struct sst_data *drv = snd_soc_dai_get_drvdata(dai); in sst_send_pipe_gains() local
1336 mutex_lock(&drv->lock); in sst_send_pipe_gains()
1337 sst_set_pipe_gain(ids, drv, mute); in sst_send_pipe_gains()
1338 mutex_unlock(&drv->lock); in sst_send_pipe_gains()
1355 mutex_lock(&drv->lock); in sst_send_pipe_gains()
1356 sst_set_pipe_gain(ids, drv, mute); in sst_send_pipe_gains()
1357 mutex_unlock(&drv->lock); in sst_send_pipe_gains()
1521 struct sst_data *drv = snd_soc_platform_get_drvdata(platform); in sst_dsp_init_v2_dpcm() local
1524 drv->byte_stream = devm_kzalloc(platform->dev, in sst_dsp_init_v2_dpcm()
1526 if (!drv->byte_stream) in sst_dsp_init_v2_dpcm()