Lines Matching refs:sd
47 struct speaker_data *sd = calloc(1, sizeof(struct speaker_data)); in open_speaker_bundle() local
49 sd->speaker_bundle = dlopen(LIB_SPEAKER_BUNDLE, RTLD_NOW); in open_speaker_bundle()
50 if (sd->speaker_bundle == NULL) { in open_speaker_bundle()
56 sd->set_mode = (set_mode_t)dlsym(sd->speaker_bundle, in open_speaker_bundle()
58 if (sd->set_mode == NULL) { in open_speaker_bundle()
63 sd->set_speaker_on = (set_speaker_on_t)dlsym(sd->speaker_bundle, in open_speaker_bundle()
65 if (sd->set_speaker_on == NULL) { in open_speaker_bundle()
70 sd->set_earpiece_on = (set_earpiece_on_t)dlsym(sd->speaker_bundle, in open_speaker_bundle()
72 if (sd->set_earpiece_on == NULL) { in open_speaker_bundle()
77 sd->set_voice_vol = (set_voice_vol_t)dlsym(sd->speaker_bundle, in open_speaker_bundle()
79 if (sd->set_voice_vol == NULL) { in open_speaker_bundle()
85 return sd; in open_speaker_bundle()
88 free(sd); in open_speaker_bundle()
92 static void close_speaker_bundle(struct speaker_data *sd) in close_speaker_bundle() argument
94 if (sd != NULL) { in close_speaker_bundle()
95 dlclose(sd->speaker_bundle); in close_speaker_bundle()
96 free(sd); in close_speaker_bundle()
97 sd = NULL; in close_speaker_bundle()