18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * vivid-radio-common.h - common radio rx/tx support functions.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright 2014 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef _VIVID_RADIO_COMMON_H_
98c2ecf20Sopenharmony_ci#define _VIVID_RADIO_COMMON_H_
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci/* The supported radio frequency ranges in kHz */
128c2ecf20Sopenharmony_ci#define FM_FREQ_RANGE_LOW       (64000U * 16U)
138c2ecf20Sopenharmony_ci#define FM_FREQ_RANGE_HIGH      (108000U * 16U)
148c2ecf20Sopenharmony_ci#define AM_FREQ_RANGE_LOW       (520U * 16U)
158c2ecf20Sopenharmony_ci#define AM_FREQ_RANGE_HIGH      (1710U * 16U)
168c2ecf20Sopenharmony_ci#define SW_FREQ_RANGE_LOW       (2300U * 16U)
178c2ecf20Sopenharmony_ci#define SW_FREQ_RANGE_HIGH      (26100U * 16U)
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_cienum { BAND_FM, BAND_AM, BAND_SW, TOT_BANDS };
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciextern const struct v4l2_frequency_band vivid_radio_bands[TOT_BANDS];
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciint vivid_radio_g_frequency(struct file *file, const unsigned *freq, struct v4l2_frequency *vf);
248c2ecf20Sopenharmony_ciint vivid_radio_s_frequency(struct file *file, unsigned *freq, const struct v4l2_frequency *vf);
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_civoid vivid_radio_rds_init(struct vivid_dev *dev);
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci#endif
29