Skip to content

Commit

Permalink
[media] solo6x10: move global fields in solo_enc_fh to solo_enc_dev
Browse files Browse the repository at this point in the history
All fields in solo_enc_fh do not belong there since they refer to global
properties. After moving all these fields to solo_enc_dev the solo_dev_fh
struct can be removed completely.
Note that this also kills the 'listener' feature of this driver. This
feature (where multiple filehandles can read the video) is illegal in the
V4L2 API. Do this in userspace: it's much more efficient to copy memory
than it is to DMA to every listener.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 25, 2013
1 parent 6a2e65d commit a7eb931
Show file tree
Hide file tree
Showing 2 changed files with 175 additions and 221 deletions.
17 changes: 15 additions & 2 deletions drivers/staging/media/solo6x10/solo6x10.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ struct solo_p2m_dev {

#define OSD_TEXT_MAX 44

enum solo_enc_types {
SOLO_ENC_TYPE_STD,
SOLO_ENC_TYPE_EXT,
};

struct solo_enc_dev {
struct solo_dev *solo_dev;
/* V4L2 Items */
Expand Down Expand Up @@ -163,8 +168,16 @@ struct solo_enc_dev {
unsigned char jpeg_header[1024];
int jpeg_len;

/* File handles that are listening for buffers */
struct list_head listeners;
u32 fmt;
u8 enc_on;
enum solo_enc_types type;
struct videobuf_queue vidq;
struct list_head vidq_active;
int desc_count;
int desc_nelts;
struct solo_p2m_desc *desc_items;
dma_addr_t desc_dma;
spinlock_t av_lock;
};

/* The SOLO6x10 PCI Device */
Expand Down
Loading

0 comments on commit a7eb931

Please sign in to comment.