Lines Matching refs:sd
46 struct speaker_data *sd = calloc(1, sizeof(struct speaker_data)); in open_speaker_bundle() local
48 sd->speaker_bundle = dlopen(LIB_SPEAKER_BUNDLE, RTLD_NOW); in open_speaker_bundle()
49 if (sd->speaker_bundle == NULL) { in open_speaker_bundle()
55 sd->set_mode = (set_mode_t)dlsym(sd->speaker_bundle, in open_speaker_bundle()
57 if (sd->set_mode == NULL) { in open_speaker_bundle()
62 sd->set_speaker_on = (set_speaker_on_t)dlsym(sd->speaker_bundle, in open_speaker_bundle()
64 if (sd->set_speaker_on == NULL) { in open_speaker_bundle()
69 sd->set_earpiece_on = (set_earpiece_on_t)dlsym(sd->speaker_bundle, in open_speaker_bundle()
71 if (sd->set_earpiece_on == NULL) { in open_speaker_bundle()
76 sd->set_voice_vol = (set_voice_vol_t)dlsym(sd->speaker_bundle, in open_speaker_bundle()
78 if (sd->set_voice_vol == NULL) { in open_speaker_bundle()
84 return sd; in open_speaker_bundle()
87 free(sd); in open_speaker_bundle()
91 static void close_speaker_bundle(struct speaker_data *sd) in close_speaker_bundle() argument
93 if (sd != NULL) { in close_speaker_bundle()
94 dlclose(sd->speaker_bundle); in close_speaker_bundle()
95 free(sd); in close_speaker_bundle()
96 sd = NULL; in close_speaker_bundle()