Lines Matching refs:cmd
131 struct thread_command *cmd = (struct thread_command *)calloc(1, sizeof(struct thread_command)); in send_command_l() local
134 if (cmd == NULL) in send_command_l()
139 cmd->type = type; in send_command_l()
141 if (cmd->type == CMD_CONFIG) { in send_command_l()
142 cmd->config = *(radio_hal_band_config_t *)param; in send_command_l()
143 ALOGV("%s CMD_CONFIG type %d", __func__, cmd->config.type); in send_command_l()
145 cmd->param = *(unsigned int *)param; in send_command_l()
156 cmd->ts = ts; in send_command_l()
157 list_add_tail(&tuner->command_list, &cmd->node); in send_command_l()
269 struct thread_command *cmd = NULL; in callback_thread_loop() local
292 cmd = node_to_item(item, struct thread_command, node); in callback_thread_loop()
294 if (got_cancel && (cmd->type == CMD_STEP || cmd->type == CMD_SCAN || in callback_thread_loop()
295 cmd->type == CMD_TUNE || cmd->type == CMD_METADATA || in callback_thread_loop()
296 cmd->type == CMD_ANNOUNCEMENTS)) { in callback_thread_loop()
298 free(cmd); in callback_thread_loop()
302 if ((cmd->ts.tv_sec < cur_ts.tv_sec) || in callback_thread_loop()
303 ((cmd->ts.tv_sec == cur_ts.tv_sec) && (cmd->ts.tv_nsec < cur_ts.tv_nsec))) { in callback_thread_loop()
310 ALOGV("%s processing command %d time %ld.%ld", __func__, cmd->type, cmd->ts.tv_sec, in callback_thread_loop()
311 cmd->ts.tv_nsec); in callback_thread_loop()
313 switch (cmd->type) { in callback_thread_loop()
316 free(cmd); in callback_thread_loop()
320 tuner->config = cmd->config; in callback_thread_loop()
340 if (cmd->param == RADIO_DIRECTION_UP) { in callback_thread_loop()
366 if (cmd->param == RADIO_DIRECTION_UP) { in callback_thread_loop()
391 tuner->program.channel = cmd->param; in callback_thread_loop()
460 ALOGV("%s processed command %d", __func__, cmd->type); in callback_thread_loop()
461 free(cmd); in callback_thread_loop()
464 (cmd->ts.tv_sec < ts.tv_sec) || in callback_thread_loop()
465 ((cmd->ts.tv_sec == ts.tv_sec) && (cmd->ts.tv_nsec < ts.tv_nsec))) { in callback_thread_loop()
466 ts.tv_sec = cmd->ts.tv_sec; in callback_thread_loop()
467 ts.tv_nsec = cmd->ts.tv_nsec; in callback_thread_loop()
474 cmd = node_to_item(item, struct thread_command, node); in callback_thread_loop()
475 if (cmd->type == CMD_METADATA) { in callback_thread_loop()
477 free(cmd); in callback_thread_loop()
530 struct thread_command *cmd = node_to_item(item, struct thread_command, node); in tuner_get_configuration() local
531 if (cmd->type == CMD_CONFIG) { in tuner_get_configuration()
532 src_config = &cmd->config; in tuner_get_configuration()