Lines Matching refs:sd
79 struct speaker_data *sd = calloc(1, sizeof(struct speaker_data)); in open_speaker_bundle() local
81 sd->speaker_bundle = dlopen(LIB_SPEAKER_BUNDLE, RTLD_NOW); in open_speaker_bundle()
82 if (sd->speaker_bundle == NULL) { in open_speaker_bundle()
88 sd->set_speaker_on = (set_speaker_on_t)dlsym(sd->speaker_bundle, in open_speaker_bundle()
90 if (sd->set_speaker_on == NULL) { in open_speaker_bundle()
95 sd->set_speaker_off = (set_speaker_off_t)dlsym(sd->speaker_bundle, in open_speaker_bundle()
97 if (sd->set_speaker_off == NULL) { in open_speaker_bundle()
102 sd->set_speaker_volume_step = (set_speaker_volume_step_t)dlsym(sd->speaker_bundle, in open_speaker_bundle()
104 if (sd->set_speaker_volume_step == NULL) { in open_speaker_bundle()
109 sd->set_speaker_calibration = (set_speaker_calibration_t)dlsym(sd->speaker_bundle, in open_speaker_bundle()
111 if (sd->set_speaker_calibration == NULL) { in open_speaker_bundle()
117 return sd; in open_speaker_bundle()
120 free(sd); in open_speaker_bundle()
124 static void close_speaker_bundle(struct speaker_data *sd) in close_speaker_bundle() argument
126 if (sd != NULL) { in close_speaker_bundle()
127 dlclose(sd->speaker_bundle); in close_speaker_bundle()
128 free(sd); in close_speaker_bundle()
129 sd = NULL; in close_speaker_bundle()