#include <media/videobuf2-vmalloc.h>
#include <linux/spi/spi.h>
-static bool msi3101_emulated_fmt;
-module_param_named(emulated_formats, msi3101_emulated_fmt, bool, 0644);
+static bool msi2500_emulated_fmt;
+module_param_named(emulated_formats, msi2500_emulated_fmt, bool, 0644);
MODULE_PARM_DESC(emulated_formats, "enable emulated formats (disappears in future)");
/*
};
/* stream formats */
-struct msi3101_format {
+struct msi2500_format {
char *name;
u32 pixelformat;
u32 buffersize;
};
/* format descriptions for capture and preview */
-static struct msi3101_format formats[] = {
+static struct msi2500_format formats[] = {
{
.name = "Complex S8",
.pixelformat = V4L2_SDR_FMT_CS8,
static const unsigned int NUM_FORMATS = ARRAY_SIZE(formats);
/* intermediate buffers with raw data from the USB device */
-struct msi3101_frame_buf {
+struct msi2500_frame_buf {
struct vb2_buffer vb; /* common v4l buffer stuff -- must be first */
struct list_head list;
};
-struct msi3101_state {
+struct msi2500_state {
struct video_device vdev;
struct v4l2_device v4l2_dev;
struct v4l2_subdev *v4l2_subdev;
};
/* Private functions */
-static struct msi3101_frame_buf *msi3101_get_next_fill_buf(
- struct msi3101_state *s)
+static struct msi2500_frame_buf *msi2500_get_next_fill_buf(
+ struct msi2500_state *s)
{
unsigned long flags = 0;
- struct msi3101_frame_buf *buf = NULL;
+ struct msi2500_frame_buf *buf = NULL;
spin_lock_irqsave(&s->queued_bufs_lock, flags);
if (list_empty(&s->queued_bufs))
goto leave;
- buf = list_entry(s->queued_bufs.next, struct msi3101_frame_buf, list);
+ buf = list_entry(s->queued_bufs.next, struct msi2500_frame_buf, list);
list_del(&buf->list);
leave:
spin_unlock_irqrestore(&s->queued_bufs_lock, flags);
* signed 14-bit sample
*/
-static int msi3101_convert_stream(struct msi3101_state *s, u8 *dst, u8 *src,
+static int msi2500_convert_stream(struct msi2500_state *s, u8 *dst, u8 *src,
unsigned int src_len)
{
unsigned int i, j, transactions, dst_len = 0;
* This gets called for the Isochronous pipe (stream). This is done in interrupt
* time, so it has to be fast, not crash, and not stall. Neat.
*/
-static void msi3101_isoc_handler(struct urb *urb)
+static void msi2500_isoc_handler(struct urb *urb)
{
- struct msi3101_state *s = (struct msi3101_state *)urb->context;
+ struct msi2500_state *s = (struct msi2500_state *)urb->context;
int i, flen, fstatus;
unsigned char *iso_buf = NULL;
- struct msi3101_frame_buf *fbuf;
+ struct msi2500_frame_buf *fbuf;
if (unlikely(urb->status == -ENOENT || urb->status == -ECONNRESET ||
urb->status == -ESHUTDOWN)) {
if (unlikely(urb->status != 0)) {
dev_dbg(&s->udev->dev,
- "msi3101_isoc_handler() called with status %d\n",
+ "msi2500_isoc_handler() called with status %d\n",
urb->status);
/* Give up after a number of contiguous errors */
if (++s->isoc_errors > MAX_ISOC_ERRORS)
iso_buf = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
/* Get free framebuffer */
- fbuf = msi3101_get_next_fill_buf(s);
+ fbuf = msi2500_get_next_fill_buf(s);
if (unlikely(fbuf == NULL)) {
s->vb_full++;
dev_dbg_ratelimited(&s->udev->dev,
/* fill framebuffer */
ptr = vb2_plane_vaddr(&fbuf->vb, 0);
- flen = msi3101_convert_stream(s, ptr, iso_buf, flen);
+ flen = msi2500_convert_stream(s, ptr, iso_buf, flen);
vb2_set_plane_payload(&fbuf->vb, 0, flen);
vb2_buffer_done(&fbuf->vb, VB2_BUF_STATE_DONE);
}
i = usb_submit_urb(urb, GFP_ATOMIC);
if (unlikely(i != 0))
dev_dbg(&s->udev->dev,
- "Error (%d) re-submitting urb in msi3101_isoc_handler\n",
+ "Error (%d) re-submitting urb in msi2500_isoc_handler\n",
i);
}
-static void msi3101_iso_stop(struct msi3101_state *s)
+static void msi2500_iso_stop(struct msi2500_state *s)
{
int i;
}
}
-static void msi3101_iso_free(struct msi3101_state *s)
+static void msi2500_iso_free(struct msi2500_state *s)
{
int i;
}
/* Both v4l2_lock and vb_queue_lock should be locked when calling this */
-static void msi3101_isoc_cleanup(struct msi3101_state *s)
+static void msi2500_isoc_cleanup(struct msi2500_state *s)
{
dev_dbg(&s->udev->dev, "%s:\n", __func__);
- msi3101_iso_stop(s);
- msi3101_iso_free(s);
+ msi2500_iso_stop(s);
+ msi2500_iso_free(s);
}
/* Both v4l2_lock and vb_queue_lock should be locked when calling this */
-static int msi3101_isoc_init(struct msi3101_state *s)
+static int msi2500_isoc_init(struct msi2500_state *s)
{
struct usb_device *udev;
struct urb *urb;
if (urb == NULL) {
dev_err(&s->udev->dev,
"Failed to allocate urb %d\n", i);
- msi3101_isoc_cleanup(s);
+ msi2500_isoc_cleanup(s);
return -ENOMEM;
}
s->urbs[i] = urb;
dev_err(&s->udev->dev,
"Failed to allocate urb buffer %d\n",
i);
- msi3101_isoc_cleanup(s);
+ msi2500_isoc_cleanup(s);
return -ENOMEM;
}
urb->transfer_buffer_length = ISO_BUFFER_SIZE;
- urb->complete = msi3101_isoc_handler;
+ urb->complete = msi2500_isoc_handler;
urb->context = s;
urb->start_frame = 0;
urb->number_of_packets = ISO_FRAMES_PER_DESC;
dev_err(&s->udev->dev,
"isoc_init() submit_urb %d failed with error %d\n",
i, ret);
- msi3101_isoc_cleanup(s);
+ msi2500_isoc_cleanup(s);
return ret;
}
dev_dbg(&s->udev->dev, "URB 0x%p submitted.\n", s->urbs[i]);
}
/* Must be called with vb_queue_lock hold */
-static void msi3101_cleanup_queued_bufs(struct msi3101_state *s)
+static void msi2500_cleanup_queued_bufs(struct msi2500_state *s)
{
unsigned long flags = 0;
spin_lock_irqsave(&s->queued_bufs_lock, flags);
while (!list_empty(&s->queued_bufs)) {
- struct msi3101_frame_buf *buf;
+ struct msi2500_frame_buf *buf;
- buf = list_entry(s->queued_bufs.next, struct msi3101_frame_buf,
+ buf = list_entry(s->queued_bufs.next, struct msi2500_frame_buf,
list);
list_del(&buf->list);
vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR);
}
/* The user yanked out the cable... */
-static void msi3101_disconnect(struct usb_interface *intf)
+static void msi2500_disconnect(struct usb_interface *intf)
{
struct v4l2_device *v = usb_get_intfdata(intf);
- struct msi3101_state *s =
- container_of(v, struct msi3101_state, v4l2_dev);
+ struct msi2500_state *s =
+ container_of(v, struct msi2500_state, v4l2_dev);
dev_dbg(&s->udev->dev, "%s:\n", __func__);
v4l2_device_put(&s->v4l2_dev);
}
-static int msi3101_querycap(struct file *file, void *fh,
+static int msi2500_querycap(struct file *file, void *fh,
struct v4l2_capability *cap)
{
- struct msi3101_state *s = video_drvdata(file);
+ struct msi2500_state *s = video_drvdata(file);
dev_dbg(&s->udev->dev, "%s:\n", __func__);
}
/* Videobuf2 operations */
-static int msi3101_queue_setup(struct vb2_queue *vq,
+static int msi2500_queue_setup(struct vb2_queue *vq,
const struct v4l2_format *fmt, unsigned int *nbuffers,
unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[])
{
- struct msi3101_state *s = vb2_get_drv_priv(vq);
+ struct msi2500_state *s = vb2_get_drv_priv(vq);
dev_dbg(&s->udev->dev, "%s: *nbuffers=%d\n", __func__, *nbuffers);
return 0;
}
-static void msi3101_buf_queue(struct vb2_buffer *vb)
+static void msi2500_buf_queue(struct vb2_buffer *vb)
{
- struct msi3101_state *s = vb2_get_drv_priv(vb->vb2_queue);
- struct msi3101_frame_buf *buf =
- container_of(vb, struct msi3101_frame_buf, vb);
+ struct msi2500_state *s = vb2_get_drv_priv(vb->vb2_queue);
+ struct msi2500_frame_buf *buf =
+ container_of(vb, struct msi2500_frame_buf, vb);
unsigned long flags = 0;
/* Check the device has not disconnected between prep and queuing */
#define CMD_STOP_STREAMING 0x45
#define CMD_READ_UNKNOW 0x48
-#define msi3101_dbg_usb_control_msg(_udev, _r, _t, _v, _i, _b, _l) { \
+#define msi2500_dbg_usb_control_msg(_udev, _r, _t, _v, _i, _b, _l) { \
char *_direction; \
if (_t & USB_DIR_IN) \
_direction = "<<<"; \
_l, _b); \
}
-static int msi3101_ctrl_msg(struct msi3101_state *s, u8 cmd, u32 data)
+static int msi2500_ctrl_msg(struct msi2500_state *s, u8 cmd, u32 data)
{
int ret;
u8 request = cmd;
u16 value = (data >> 0) & 0xffff;
u16 index = (data >> 16) & 0xffff;
- msi3101_dbg_usb_control_msg(s->udev,
+ msi2500_dbg_usb_control_msg(s->udev,
request, requesttype, value, index, NULL, 0);
ret = usb_control_msg(s->udev, usb_sndctrlpipe(s->udev, 0),
#define F_REF 24000000
#define DIV_R_IN 2
-static int msi3101_set_usb_adc(struct msi3101_state *s)
+static int msi2500_set_usb_adc(struct msi2500_state *s)
{
int ret, div_n, div_m, div_r_out, f_sr, f_vco, fract;
u32 reg3, reg4, reg7;
__func__, f_sr, f_vco, div_n, div_m, div_r_out, reg3,
reg4);
- ret = msi3101_ctrl_msg(s, CMD_WREG, 0x00608008);
+ ret = msi2500_ctrl_msg(s, CMD_WREG, 0x00608008);
if (ret)
goto err;
- ret = msi3101_ctrl_msg(s, CMD_WREG, 0x00000c05);
+ ret = msi2500_ctrl_msg(s, CMD_WREG, 0x00000c05);
if (ret)
goto err;
- ret = msi3101_ctrl_msg(s, CMD_WREG, 0x00020000);
+ ret = msi2500_ctrl_msg(s, CMD_WREG, 0x00020000);
if (ret)
goto err;
- ret = msi3101_ctrl_msg(s, CMD_WREG, 0x00480102);
+ ret = msi2500_ctrl_msg(s, CMD_WREG, 0x00480102);
if (ret)
goto err;
- ret = msi3101_ctrl_msg(s, CMD_WREG, 0x00f38008);
+ ret = msi2500_ctrl_msg(s, CMD_WREG, 0x00f38008);
if (ret)
goto err;
- ret = msi3101_ctrl_msg(s, CMD_WREG, reg7);
+ ret = msi2500_ctrl_msg(s, CMD_WREG, reg7);
if (ret)
goto err;
- ret = msi3101_ctrl_msg(s, CMD_WREG, reg4);
+ ret = msi2500_ctrl_msg(s, CMD_WREG, reg4);
if (ret)
goto err;
- ret = msi3101_ctrl_msg(s, CMD_WREG, reg3);
+ ret = msi2500_ctrl_msg(s, CMD_WREG, reg3);
if (ret)
goto err;
err:
return ret;
};
-static int msi3101_start_streaming(struct vb2_queue *vq, unsigned int count)
+static int msi2500_start_streaming(struct vb2_queue *vq, unsigned int count)
{
- struct msi3101_state *s = vb2_get_drv_priv(vq);
+ struct msi2500_state *s = vb2_get_drv_priv(vq);
int ret;
dev_dbg(&s->udev->dev, "%s:\n", __func__);
/* wake-up tuner */
v4l2_subdev_call(s->v4l2_subdev, core, s_power, 1);
- ret = msi3101_set_usb_adc(s);
+ ret = msi2500_set_usb_adc(s);
- ret = msi3101_isoc_init(s);
+ ret = msi2500_isoc_init(s);
if (ret)
- msi3101_cleanup_queued_bufs(s);
+ msi2500_cleanup_queued_bufs(s);
- ret = msi3101_ctrl_msg(s, CMD_START_STREAMING, 0);
+ ret = msi2500_ctrl_msg(s, CMD_START_STREAMING, 0);
mutex_unlock(&s->v4l2_lock);
return ret;
}
-static void msi3101_stop_streaming(struct vb2_queue *vq)
+static void msi2500_stop_streaming(struct vb2_queue *vq)
{
- struct msi3101_state *s = vb2_get_drv_priv(vq);
+ struct msi2500_state *s = vb2_get_drv_priv(vq);
dev_dbg(&s->udev->dev, "%s:\n", __func__);
mutex_lock(&s->v4l2_lock);
if (s->udev)
- msi3101_isoc_cleanup(s);
+ msi2500_isoc_cleanup(s);
- msi3101_cleanup_queued_bufs(s);
+ msi2500_cleanup_queued_bufs(s);
/* according to tests, at least 700us delay is required */
msleep(20);
- if (!msi3101_ctrl_msg(s, CMD_STOP_STREAMING, 0)) {
+ if (!msi2500_ctrl_msg(s, CMD_STOP_STREAMING, 0)) {
/* sleep USB IF / ADC */
- msi3101_ctrl_msg(s, CMD_WREG, 0x01000003);
+ msi2500_ctrl_msg(s, CMD_WREG, 0x01000003);
}
/* sleep tuner */
mutex_unlock(&s->v4l2_lock);
}
-static struct vb2_ops msi3101_vb2_ops = {
- .queue_setup = msi3101_queue_setup,
- .buf_queue = msi3101_buf_queue,
- .start_streaming = msi3101_start_streaming,
- .stop_streaming = msi3101_stop_streaming,
+static struct vb2_ops msi2500_vb2_ops = {
+ .queue_setup = msi2500_queue_setup,
+ .buf_queue = msi2500_buf_queue,
+ .start_streaming = msi2500_start_streaming,
+ .stop_streaming = msi2500_stop_streaming,
.wait_prepare = vb2_ops_wait_prepare,
.wait_finish = vb2_ops_wait_finish,
};
-static int msi3101_enum_fmt_sdr_cap(struct file *file, void *priv,
+static int msi2500_enum_fmt_sdr_cap(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{
- struct msi3101_state *s = video_drvdata(file);
+ struct msi2500_state *s = video_drvdata(file);
dev_dbg(&s->udev->dev, "%s: index=%d\n", __func__, f->index);
return 0;
}
-static int msi3101_g_fmt_sdr_cap(struct file *file, void *priv,
+static int msi2500_g_fmt_sdr_cap(struct file *file, void *priv,
struct v4l2_format *f)
{
- struct msi3101_state *s = video_drvdata(file);
+ struct msi2500_state *s = video_drvdata(file);
dev_dbg(&s->udev->dev, "%s: pixelformat fourcc %4.4s\n", __func__,
(char *)&s->pixelformat);
return 0;
}
-static int msi3101_s_fmt_sdr_cap(struct file *file, void *priv,
+static int msi2500_s_fmt_sdr_cap(struct file *file, void *priv,
struct v4l2_format *f)
{
- struct msi3101_state *s = video_drvdata(file);
+ struct msi2500_state *s = video_drvdata(file);
struct vb2_queue *q = &s->vb_queue;
int i;
return 0;
}
-static int msi3101_try_fmt_sdr_cap(struct file *file, void *priv,
+static int msi2500_try_fmt_sdr_cap(struct file *file, void *priv,
struct v4l2_format *f)
{
- struct msi3101_state *s = video_drvdata(file);
+ struct msi2500_state *s = video_drvdata(file);
int i;
dev_dbg(&s->udev->dev, "%s: pixelformat fourcc %4.4s\n", __func__,
return 0;
}
-static int msi3101_s_tuner(struct file *file, void *priv,
+static int msi2500_s_tuner(struct file *file, void *priv,
const struct v4l2_tuner *v)
{
- struct msi3101_state *s = video_drvdata(file);
+ struct msi2500_state *s = video_drvdata(file);
int ret;
dev_dbg(&s->udev->dev, "%s: index=%d\n", __func__, v->index);
return ret;
}
-static int msi3101_g_tuner(struct file *file, void *priv, struct v4l2_tuner *v)
+static int msi2500_g_tuner(struct file *file, void *priv, struct v4l2_tuner *v)
{
- struct msi3101_state *s = video_drvdata(file);
+ struct msi2500_state *s = video_drvdata(file);
int ret;
dev_dbg(&s->udev->dev, "%s: index=%d\n", __func__, v->index);
return ret;
}
-static int msi3101_g_frequency(struct file *file, void *priv,
+static int msi2500_g_frequency(struct file *file, void *priv,
struct v4l2_frequency *f)
{
- struct msi3101_state *s = video_drvdata(file);
+ struct msi2500_state *s = video_drvdata(file);
int ret = 0;
dev_dbg(&s->udev->dev, "%s: tuner=%d type=%d\n",
return ret;
}
-static int msi3101_s_frequency(struct file *file, void *priv,
+static int msi2500_s_frequency(struct file *file, void *priv,
const struct v4l2_frequency *f)
{
- struct msi3101_state *s = video_drvdata(file);
+ struct msi2500_state *s = video_drvdata(file);
int ret;
dev_dbg(&s->udev->dev, "%s: tuner=%d type=%d frequency=%u\n",
bands[0].rangehigh);
dev_dbg(&s->udev->dev, "%s: ADC frequency=%u Hz\n",
__func__, s->f_adc);
- ret = msi3101_set_usb_adc(s);
+ ret = msi2500_set_usb_adc(s);
} else if (f->tuner == 1) {
ret = v4l2_subdev_call(s->v4l2_subdev, tuner, s_frequency, f);
} else {
return ret;
}
-static int msi3101_enum_freq_bands(struct file *file, void *priv,
+static int msi2500_enum_freq_bands(struct file *file, void *priv,
struct v4l2_frequency_band *band)
{
- struct msi3101_state *s = video_drvdata(file);
+ struct msi2500_state *s = video_drvdata(file);
int ret;
dev_dbg(&s->udev->dev, "%s: tuner=%d type=%d index=%d\n",
return ret;
}
-static const struct v4l2_ioctl_ops msi3101_ioctl_ops = {
- .vidioc_querycap = msi3101_querycap,
+static const struct v4l2_ioctl_ops msi2500_ioctl_ops = {
+ .vidioc_querycap = msi2500_querycap,
- .vidioc_enum_fmt_sdr_cap = msi3101_enum_fmt_sdr_cap,
- .vidioc_g_fmt_sdr_cap = msi3101_g_fmt_sdr_cap,
- .vidioc_s_fmt_sdr_cap = msi3101_s_fmt_sdr_cap,
- .vidioc_try_fmt_sdr_cap = msi3101_try_fmt_sdr_cap,
+ .vidioc_enum_fmt_sdr_cap = msi2500_enum_fmt_sdr_cap,
+ .vidioc_g_fmt_sdr_cap = msi2500_g_fmt_sdr_cap,
+ .vidioc_s_fmt_sdr_cap = msi2500_s_fmt_sdr_cap,
+ .vidioc_try_fmt_sdr_cap = msi2500_try_fmt_sdr_cap,
.vidioc_reqbufs = vb2_ioctl_reqbufs,
.vidioc_create_bufs = vb2_ioctl_create_bufs,
.vidioc_streamon = vb2_ioctl_streamon,
.vidioc_streamoff = vb2_ioctl_streamoff,
- .vidioc_g_tuner = msi3101_g_tuner,
- .vidioc_s_tuner = msi3101_s_tuner,
+ .vidioc_g_tuner = msi2500_g_tuner,
+ .vidioc_s_tuner = msi2500_s_tuner,
- .vidioc_g_frequency = msi3101_g_frequency,
- .vidioc_s_frequency = msi3101_s_frequency,
- .vidioc_enum_freq_bands = msi3101_enum_freq_bands,
+ .vidioc_g_frequency = msi2500_g_frequency,
+ .vidioc_s_frequency = msi2500_s_frequency,
+ .vidioc_enum_freq_bands = msi2500_enum_freq_bands,
.vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
.vidioc_log_status = v4l2_ctrl_log_status,
};
-static const struct v4l2_file_operations msi3101_fops = {
+static const struct v4l2_file_operations msi2500_fops = {
.owner = THIS_MODULE,
.open = v4l2_fh_open,
.release = vb2_fop_release,
.unlocked_ioctl = video_ioctl2,
};
-static struct video_device msi3101_template = {
+static struct video_device msi2500_template = {
.name = "Mirics MSi3101 SDR Dongle",
.release = video_device_release_empty,
- .fops = &msi3101_fops,
- .ioctl_ops = &msi3101_ioctl_ops,
+ .fops = &msi2500_fops,
+ .ioctl_ops = &msi2500_ioctl_ops,
};
-static void msi3101_video_release(struct v4l2_device *v)
+static void msi2500_video_release(struct v4l2_device *v)
{
- struct msi3101_state *s =
- container_of(v, struct msi3101_state, v4l2_dev);
+ struct msi2500_state *s =
+ container_of(v, struct msi2500_state, v4l2_dev);
v4l2_ctrl_handler_free(&s->hdl);
v4l2_device_unregister(&s->v4l2_dev);
kfree(s);
}
-static int msi3101_transfer_one_message(struct spi_master *master,
+static int msi2500_transfer_one_message(struct spi_master *master,
struct spi_message *m)
{
- struct msi3101_state *s = spi_master_get_devdata(master);
+ struct msi2500_state *s = spi_master_get_devdata(master);
struct spi_transfer *t;
int ret = 0;
u32 data;
data |= ((u8 *)t->tx_buf)[0] << 8;
data |= ((u8 *)t->tx_buf)[1] << 16;
data |= ((u8 *)t->tx_buf)[2] << 24;
- ret = msi3101_ctrl_msg(s, CMD_WREG, data);
+ ret = msi2500_ctrl_msg(s, CMD_WREG, data);
}
m->status = ret;
return ret;
}
-static int msi3101_probe(struct usb_interface *intf,
+static int msi2500_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
struct usb_device *udev = interface_to_usbdev(intf);
- struct msi3101_state *s = NULL;
+ struct msi2500_state *s = NULL;
struct v4l2_subdev *sd;
struct spi_master *master;
int ret;
.max_speed_hz = 12000000,
};
- s = kzalloc(sizeof(struct msi3101_state), GFP_KERNEL);
+ s = kzalloc(sizeof(struct msi2500_state), GFP_KERNEL);
if (s == NULL) {
- pr_err("Could not allocate memory for msi3101_state\n");
+ pr_err("Could not allocate memory for msi2500_state\n");
return -ENOMEM;
}
s->pixelformat = formats[0].pixelformat;
s->buffersize = formats[0].buffersize;
s->num_formats = NUM_FORMATS;
- if (msi3101_emulated_fmt == false)
+ if (msi2500_emulated_fmt == false)
s->num_formats -= 2;
/* Init videobuf2 queue structure */
s->vb_queue.type = V4L2_BUF_TYPE_SDR_CAPTURE;
s->vb_queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_READ;
s->vb_queue.drv_priv = s;
- s->vb_queue.buf_struct_size = sizeof(struct msi3101_frame_buf);
- s->vb_queue.ops = &msi3101_vb2_ops;
+ s->vb_queue.buf_struct_size = sizeof(struct msi2500_frame_buf);
+ s->vb_queue.ops = &msi2500_vb2_ops;
s->vb_queue.mem_ops = &vb2_vmalloc_memops;
s->vb_queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
ret = vb2_queue_init(&s->vb_queue);
}
/* Init video_device structure */
- s->vdev = msi3101_template;
+ s->vdev = msi2500_template;
s->vdev.queue = &s->vb_queue;
s->vdev.queue->lock = &s->vb_queue_lock;
video_set_drvdata(&s->vdev, s);
/* Register the v4l2_device structure */
- s->v4l2_dev.release = msi3101_video_release;
+ s->v4l2_dev.release = msi2500_video_release;
ret = v4l2_device_register(&intf->dev, &s->v4l2_dev);
if (ret) {
dev_err(&s->udev->dev,
s->master = master;
master->bus_num = 0;
master->num_chipselect = 1;
- master->transfer_one_message = msi3101_transfer_one_message;
+ master->transfer_one_message = msi2500_transfer_one_message;
spi_master_set_devdata(master, s);
ret = spi_register_master(master);
if (ret) {
}
/* USB device ID list */
-static struct usb_device_id msi3101_id_table[] = {
+static struct usb_device_id msi2500_id_table[] = {
{ USB_DEVICE(0x1df7, 0x2500) }, /* Mirics MSi3101 SDR Dongle */
{ USB_DEVICE(0x2040, 0xd300) }, /* Hauppauge WinTV 133559 LF */
{ }
};
-MODULE_DEVICE_TABLE(usb, msi3101_id_table);
+MODULE_DEVICE_TABLE(usb, msi2500_id_table);
/* USB subsystem interface */
-static struct usb_driver msi3101_driver = {
+static struct usb_driver msi2500_driver = {
.name = KBUILD_MODNAME,
- .probe = msi3101_probe,
- .disconnect = msi3101_disconnect,
- .id_table = msi3101_id_table,
+ .probe = msi2500_probe,
+ .disconnect = msi2500_disconnect,
+ .id_table = msi2500_id_table,
};
-module_usb_driver(msi3101_driver);
+module_usb_driver(msi2500_driver);
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
MODULE_DESCRIPTION("Mirics MSi3101 SDR Dongle");