Home | History | Annotate | Download | only in radio

Lines Matching full:rdev

666     struct stub_radio_device *rdev = (struct stub_radio_device *)dev;
669 ALOGI("%s rdev %p", __func__, rdev);
670 pthread_mutex_lock(&rdev->lock);
672 if (rdev->tuner != NULL) {
683 rdev->tuner = (struct stub_radio_tuner *)calloc(1, sizeof(struct stub_radio_tuner));
684 if (rdev->tuner == NULL) {
689 rdev->tuner->interface.set_configuration = tuner_set_configuration;
690 rdev->tuner->interface.get_configuration = tuner_get_configuration;
691 rdev->tuner->interface.scan = tuner_scan;
692 rdev->tuner->interface.step = tuner_step;
693 rdev->tuner->interface.tune = tuner_tune;
694 rdev->tuner->interface.cancel = tuner_cancel;
695 rdev->tuner->interface.get_program_information = tuner_get_program_information;
697 rdev->tuner->audio = audio;
698 rdev->tuner->callback = callback;
699 rdev->tuner->cookie = cookie;
701 rdev->tuner->dev = rdev;
703 pthread_mutex_init(&rdev->tuner->lock, (const pthread_mutexattr_t *) NULL);
704 pthread_cond_init(&rdev->tuner->cond, (const pthread_condattr_t *) NULL);
705 pthread_create(&rdev->tuner->callback_thread, (const pthread_attr_t *) NULL,
706 callback_thread_loop, rdev->tuner);
707 list_init(&rdev->tuner->command_list);
709 pthread_mutex_lock(&rdev->tuner->lock);
710 send_command_l(rdev->tuner, CMD_CONFIG, thread_cmd_delay_ms[CMD_CONFIG], (void *)config);
711 pthread_mutex_unlock(&rdev->tuner->lock);
713 *tuner = &rdev->tuner->interface;
716 pthread_mutex_unlock(&rdev->lock);
724 struct stub_radio_device *rdev = (struct stub_radio_device *)dev;
729 pthread_mutex_lock(&rdev->lock);
746 rdev->tuner = NULL;
749 pthread_mutex_unlock(&rdev->lock);
755 struct stub_radio_device *rdev = (struct stub_radio_device *)device;
756 if (rdev != NULL) {
757 free(rdev->tuner);
759 free(rdev);
766 struct stub_radio_device *rdev;
771 rdev = calloc(1, sizeof(struct stub_radio_device));
772 if (!rdev)
775 rdev->device.common.tag = HARDWARE_DEVICE_TAG;
776 rdev->device.common.version = RADIO_DEVICE_API_VERSION_1_0;
777 rdev->device.common.module = (struct hw_module_t *) module;
778 rdev->device.common.close = rdev_close;
779 rdev->device.get_properties = rdev_get_properties;
780 rdev->device.open_tuner = rdev_open_tuner;
781 rdev->device.close_tuner = rdev_close_tuner;
783 pthread_mutex_init(&rdev->lock, (const pthread_mutexattr_t *) NULL);
785 *device = &rdev->device.common;