- if (sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE)) {
- samplerate = *((uint64_t *) o->dev->plugin->dev_info_get(
- o->dev->plugin_index, SR_DI_CUR_SAMPLERATE));
- if (!(frequency_s = sr_samplerate_string(samplerate))) {
+ if (sr_dev_has_hwcap(o->sdi, SR_HWCAP_SAMPLERATE)) {
+ o->sdi->driver->info_get(SR_DI_CUR_SAMPLERATE,
+ (const void **)&samplerate, o->sdi);
+ if (!(frequency_s = sr_samplerate_string(*samplerate))) {