erix5

ADL_SDK: fan control and Linux

Discussion created by erix5 on Mar 22, 2009
Latest reply on Apr 11, 2009 by erix5
ADL_Overdrive5_FanSpeed_Get() seems not working with 9.2

Hi

Publishing ADL_SDK is really great news!!! Thanks!

Today I had tried to get/set fan speed with ADL_Overdrive5_FanSpeed_Get/Set functions. Return value always is ADL_ERR...

It seems not working yet, isn't it?

Used latest driver - fglrx 8.58.2 (catalyst 9.2).

GPU: RV770 (4850)

Here is code:

...

typedef int ( *ADL_OVERDRIVE5_FAN_SPEED_GET ) (int, int, ADLFanSpeedValue *);
...
ADL_OVERDRIVE5_FAN_SPEED_GET ADL_ovd5_fanSpeed_Get;
ADLFanSpeedValue * lpFanSpeedVl = malloc(sizeof(ADLFanSpeedValue));
memset( lpFanSpeedVl, 0, sizeof(ADLFanSpeedValue));
ADL_ovd5_fanSpeed_Get = (ADL_OVERDRIVE5_FAN_SPEED_GET)GetProcAddress(pLib,"ADL_Overdrive5_FanSpeed_Get");

if ( NULL != ADL_ovd5_fanSpeed_Get ) {
int err;
lpFanSpeedVl->iSize = sizeof(ADLFanSpeedValue);
// Am I right setting iSpeedType to type RPM or percent would return different
// value in iFanSpeed field. So I set it...
lpFanSpeedVl->iSpeedType = ADL_DL_FANCTRL_SPEED_TYPE_RPM;

err = ADL_ovd5_fanSpeed_Get(adIdx, 0 /*zero_now*/, lpFanSpeedVl);
if (err != ADL_OK) {
printf ("Call ADL_ovd5_fanSpeed_Get filed with: %d code\n", err);
}

...

Thanks!

Outcomes