mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-23 12:35:33 -04:00
universal7885: fm-aidl-support: Cleanup logs
- __func__ macros in lambda is useless, nuke it - Append function name on impl lib - Remove useless logging
This commit is contained in:
parent
2d2a1ed08f
commit
111f3529ae
2 changed files with 4 additions and 8 deletions
|
|
@ -149,15 +149,13 @@ namespace aidl::vendor::eureka::hardware::fmradio {
|
||||||
client_observe_thread = std::thread([=] {
|
client_observe_thread = std::thread([=] {
|
||||||
pid_t pid = value;
|
pid_t pid = value;
|
||||||
|
|
||||||
LOG_D("%s: FM_APP_PID: recieved value %d", __func__, pid);
|
LOG_D("FM_APP_PID: received value %d", pid);
|
||||||
while (true) {
|
while (true) {
|
||||||
if (kill(pid, 0) < 0 && errno == ESRCH) break;
|
if (kill(pid, 0) < 0 && errno == ESRCH) break;
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(2));
|
std::this_thread::sleep_for(std::chrono::seconds(2));
|
||||||
}
|
}
|
||||||
LOG_W("%s: FM_APP_PID: Starting client death receiver", __func__);
|
LOG_W("FM_APP_PID: Starting client death receiver");
|
||||||
fm_radio_slsi::fm_thread_set(fd, 0);
|
fm_radio_slsi::fm_thread_set(fd, 0);
|
||||||
auto svc = IAudioRoute::fromBinder(ndk::SpAIBinder(AServiceManager_waitForService("vendor.eureka.hardware.audio_route.IAudioRoute/default")));
|
|
||||||
svc->setParam("l_fmradio_mode=off");
|
|
||||||
close();
|
close();
|
||||||
});
|
});
|
||||||
client_observe_thread.detach();
|
client_observe_thread.detach();
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ int get_frequency(const int fd, int *channel) {
|
||||||
|
|
||||||
*channel = static_cast<int>(freq.frequency) / 16000;
|
*channel = static_cast<int>(freq.frequency) / 16000;
|
||||||
|
|
||||||
LOG_D("Channel freq: %d", *channel);
|
LOG_D("%s: Channel freq: %d", __func__, *channel);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,7 +73,7 @@ void set_frequency(const int fd, int channel) {
|
||||||
struct v4l2_frequency freq {};
|
struct v4l2_frequency freq {};
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
LOG_D("Channel freq: %d", channel);
|
LOG_D("%s: Channel freq: %d", __func__, channel);
|
||||||
|
|
||||||
freq.tuner = 0;
|
freq.tuner = 0;
|
||||||
freq.type = V4L2_TUNER_RADIO;
|
freq.type = V4L2_TUNER_RADIO;
|
||||||
|
|
@ -89,8 +89,6 @@ static int set_control(const int fd, unsigned int id, int val) {
|
||||||
int ret;
|
int ret;
|
||||||
ctrl.id = id;
|
ctrl.id = id;
|
||||||
|
|
||||||
LOG_D("Control value: %d", val);
|
|
||||||
|
|
||||||
if (val)
|
if (val)
|
||||||
ctrl.value = static_cast<unsigned int>(val);
|
ctrl.value = static_cast<unsigned int>(val);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue