universal7885: fm-aidl: Remove next_freq/before_freq helpers

This code is working, but it will query the H/W next channel everytime resulting in different freq than the list
This commit is contained in:
roynatech2544 2022-10-20 17:44:17 +09:00
commit a87aa48ec4
2 changed files with 4 additions and 2 deletions

View file

@ -113,6 +113,7 @@ static int channel_search(const int fd, unsigned int upward,
return ret; return ret;
} }
/*
int next_channel(const int fd) { int next_channel(const int fd) {
int ret; int ret;
channel_search(fd, 1, 0, FM_CHANNEL_SPACING_100KHZ, &ret); channel_search(fd, 1, 0, FM_CHANNEL_SPACING_100KHZ, &ret);
@ -123,6 +124,7 @@ int before_channel(const int fd) {
channel_search(fd, 0, 0, FM_CHANNEL_SPACING_100KHZ, &ret); channel_search(fd, 0, 0, FM_CHANNEL_SPACING_100KHZ, &ret);
return ret; return ret;
} }
*/
int set_mute(const int fd, bool mute) { int set_mute(const int fd, bool mute) {
int ret = set_control(fd, V4L2_CID_AUDIO_MUTE, !mute); int ret = set_control(fd, V4L2_CID_AUDIO_MUTE, !mute);
if (ret < 0) { if (ret < 0) {

View file

@ -7,8 +7,8 @@ namespace fm_radio_slsi {
int open_device(void); int open_device(void);
int get_frequency(const int fd, int *channel); int get_frequency(const int fd, int *channel);
int set_frequency(const int fd, int channel); int set_frequency(const int fd, int channel);
int next_channel(const int fd); //int next_channel(const int fd);
int before_channel(const int fd); //int before_channel(const int fd);
int set_mute(const int fd, bool mute); int set_mute(const int fd, bool mute);
int set_volume(int fd, int volume); int set_volume(int fd, int volume);
std::vector<int> get_freqs(const int fd); std::vector<int> get_freqs(const int fd);