mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 938809 - Support calling seeking/tuning functions off main thread in HAL, r=dhylands
This commit is contained in:
parent
f472e9759e
commit
2f673e6e18
@ -526,6 +526,8 @@ void DisableFMRadio();
|
||||
/**
|
||||
* Seek to an available FM radio station.
|
||||
*
|
||||
* This can be called off main thread, but all calls must be completed
|
||||
* before calling DisableFMRadio.
|
||||
*/
|
||||
void FMRadioSeek(const hal::FMRadioSeekDirection& aDirection);
|
||||
|
||||
@ -536,6 +538,9 @@ void GetFMRadioSettings(hal::FMRadioSettings* aInfo);
|
||||
|
||||
/**
|
||||
* Set the FM radio's frequency.
|
||||
*
|
||||
* This can be called off main thread, but all calls must be completed
|
||||
* before calling DisableFMRadio.
|
||||
*/
|
||||
void SetFMRadioFrequency(const uint32_t frequency);
|
||||
|
||||
|
@ -402,20 +402,18 @@ FMRadioSeek(const hal::FMRadioSeekDirection& aDirection)
|
||||
if (sMsmFMMode && rc >= 0)
|
||||
return;
|
||||
|
||||
hal::FMRadioOperationInformation info;
|
||||
info.operation() = hal::FM_RADIO_OPERATION_SEEK;
|
||||
info.status() = rc < 0 ? hal::FM_RADIO_OPERATION_STATUS_FAIL :
|
||||
hal::FM_RADIO_OPERATION_STATUS_SUCCESS;
|
||||
hal::NotifyFMRadioStatus(info);
|
||||
NS_DispatchToMainThread(new RadioUpdate(FM_RADIO_OPERATION_SEEK,
|
||||
rc < 0 ?
|
||||
FM_RADIO_OPERATION_STATUS_FAIL :
|
||||
FM_RADIO_OPERATION_STATUS_SUCCESS));
|
||||
|
||||
if (rc < 0) {
|
||||
HAL_LOG(("Could not initiate hardware seek"));
|
||||
return;
|
||||
}
|
||||
|
||||
info.operation() = hal::FM_RADIO_OPERATION_TUNE;
|
||||
info.status() = hal::FM_RADIO_OPERATION_STATUS_SUCCESS;
|
||||
hal::NotifyFMRadioStatus(info);
|
||||
NS_DispatchToMainThread(new RadioUpdate(FM_RADIO_OPERATION_TUNE,
|
||||
FM_RADIO_OPERATION_STATUS_SUCCESS));
|
||||
}
|
||||
|
||||
void
|
||||
@ -450,11 +448,10 @@ SetFMRadioFrequency(const uint32_t frequency)
|
||||
if (sMsmFMMode && rc >= 0)
|
||||
return;
|
||||
|
||||
hal::FMRadioOperationInformation info;
|
||||
info.operation() = hal::FM_RADIO_OPERATION_TUNE;
|
||||
info.status() = rc < 0 ? hal::FM_RADIO_OPERATION_STATUS_FAIL :
|
||||
hal::FM_RADIO_OPERATION_STATUS_SUCCESS;
|
||||
hal::NotifyFMRadioStatus(info);
|
||||
NS_DispatchToMainThread(new RadioUpdate(FM_RADIO_OPERATION_TUNE,
|
||||
rc < 0 ?
|
||||
FM_RADIO_OPERATION_STATUS_FAIL :
|
||||
FM_RADIO_OPERATION_STATUS_SUCCESS));
|
||||
}
|
||||
|
||||
uint32_t
|
||||
|
Loading…
Reference in New Issue
Block a user