Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84286b47 authored by Sami Masad's avatar Sami Masad Committed by Nimesh Madhavan
Browse files

Fix the frequncy unit mismatch between the FM app and the driver.

This change was part of Sami Masad's change Iec40b6ab, but it has lot of
other changes and that has been on hold for some time.

Submitting this seperately as this will fix the tuning issues.
This wont fix the audio routiung issues though.

Change-Id: Ia0333e6d86321b694278eaef045b231baaff9afc
parent afffa0f2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -281,6 +281,9 @@ int setFreq(int freq, int fd)
{
    LOGV("%s", __func__);

    //The driver expects the frequency to be in a different unit
    freq = freq / 10;

    int ret;

    ret = ioctl(fd, Si4709_IOC_CHAN_SELECT, &freq);
@@ -464,6 +467,9 @@ static jint android_hardware_fmradio_FmReceiverJNI_getFreqNative
        return FM_JNI_FAILURE;
    }

    //convert the frquency to khz units for the application
    freq = freq * 10;

    return freq;
}