#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/math64.h>
#include <linux/videodev2.h>
#include <linux/v4l2-dv-timings.h>
#include <media/v4l2-common.h>
#include <media/v4l2-event.h>
#include <media/v4l2-dv-timings.h>
#include <linux/fixp-arith.h>
#include <linux/jiffies.h>
#include "vivid-core.h"
#include "vivid-ctrls.h"
#include "vivid-sdr-cap.h"
struct vivid_format { … };
static const struct vivid_format formats[] = …;
static const struct v4l2_frequency_band bands_adc[] = …;
#define BAND_ADC_0 …
#define BAND_ADC_1 …
static const struct v4l2_frequency_band bands_fm[] = …;
static void vivid_thread_sdr_cap_tick(struct vivid_dev *dev)
{ … }
static int vivid_thread_sdr_cap(void *data)
{ … }
static int sdr_cap_queue_setup(struct vb2_queue *vq,
unsigned *nbuffers, unsigned *nplanes,
unsigned sizes[], struct device *alloc_devs[])
{ … }
static int sdr_cap_buf_prepare(struct vb2_buffer *vb)
{ … }
static void sdr_cap_buf_queue(struct vb2_buffer *vb)
{ … }
static int sdr_cap_start_streaming(struct vb2_queue *vq, unsigned count)
{ … }
static void sdr_cap_stop_streaming(struct vb2_queue *vq)
{ … }
static void sdr_cap_buf_request_complete(struct vb2_buffer *vb)
{ … }
const struct vb2_ops vivid_sdr_cap_qops = …;
int vivid_sdr_enum_freq_bands(struct file *file, void *fh,
struct v4l2_frequency_band *band)
{ … }
int vivid_sdr_g_frequency(struct file *file, void *fh,
struct v4l2_frequency *vf)
{ … }
int vivid_sdr_s_frequency(struct file *file, void *fh,
const struct v4l2_frequency *vf)
{ … }
int vivid_sdr_g_tuner(struct file *file, void *fh, struct v4l2_tuner *vt)
{ … }
int vivid_sdr_s_tuner(struct file *file, void *fh, const struct v4l2_tuner *vt)
{ … }
int vidioc_enum_fmt_sdr_cap(struct file *file, void *fh, struct v4l2_fmtdesc *f)
{ … }
int vidioc_g_fmt_sdr_cap(struct file *file, void *fh, struct v4l2_format *f)
{ … }
int vidioc_s_fmt_sdr_cap(struct file *file, void *fh, struct v4l2_format *f)
{ … }
int vidioc_try_fmt_sdr_cap(struct file *file, void *fh, struct v4l2_format *f)
{ … }
#define FIXP_N …
#define FIXP_FRAC …
#define FIXP_2PI …
#define M_100000PI …
void vivid_sdr_cap_process(struct vivid_dev *dev, struct vivid_buffer *buf)
{ … }