Commit Graph

12 Commits (3712b71769578fd39481ce02e1e8cea3c4f8370f)

Author SHA1 Message Date
Ezequiel Garcia f01e0ffd01 [media] au0828: Replace memcpy with struct assignment
This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-27 18:49:44 -02:00
Sakari Ailus 8e6057b510 [media] v4l: Convert drivers to use monotonic timestamps
Convert drivers using wall clock time (CLOCK_REALTIME) to timestamp from the
monotonic timer (CLOCK_MONOTONIC).

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-21 10:56:43 -02:00
Michael Krufky 5b7d8de7d2 [media] au0828: break au0828_card_setup() down into smaller functions
Pull the analog frontend setup code out of au0828_card_setup into its
own seperate function, au0828_card_analog_fe_setup().

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-17 14:34:27 -02:00
Michael Krufky 8a4e786660 [media] au0828: remove forced dependency of VIDEO_AU0828 on VIDEO_V4L2
This patch removes the dependendency of VIDEO_AU0828 on VIDEO_V4L2 by
creating a new Kconfig option, VIDEO_AU0828_V4L2, which enables analog
video capture support and depends on VIDEO_V4L2 itself.
With VIDEO_AU0828_V4L2 disabled, the driver will only support digital
television and will not depend on the v4l2-core. With VIDEO_AU0828_V4L2
enabled, the driver will be built with the analog v4l2 support included.
By default, the VIDEO_AU0828_V4L2 option will be set to Y, so as to
preserve the original behavior.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-17 14:31:26 -02:00
Michael Krufky c70ffd5968 [media] au0828: update model matrix entries for 72261, 72271 & 72281
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-17 14:23:13 -02:00
Michael Krufky ffc809886b [media] au0828: add missing model 72281, usb id 2040:7270 to the model matrix
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-17 14:22:51 -02:00
Mauro Carvalho Chehab 2e7b318fa1 [media] au0828-dvb: ret is never tested. Get rid of it
drivers/media/usb/au0828/au0828-dvb.c:275:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28 07:39:02 -02:00
Mauro Carvalho Chehab a094ca4688 [media] au0828: get rid of warning: no previous prototype
drivers/media/usb/au0828/au0828-cards.c:28:6: warning: no previous prototype for 'hvr950q_cs5340_audio' [-Wmissing-prototypes]
drivers/media/usb/au0828/au0828-video.c:161:6: warning: no previous prototype for 'au0828_uninit_isoc' [-Wmissing-prototypes]
drivers/media/usb/au0828/au0828-video.c:200:5: warning: no previous prototype for 'au0828_init_isoc' [-Wmissing-prototypes]
drivers/media/usb/au0828/au0828-video.c:786:5: warning: no previous prototype for 'au0828_analog_stream_enable' [-Wmissing-prototypes]
drivers/media/usb/au0828/au0828-video.c:813:6: warning: no previous prototype for 'au0828_analog_stream_reset' [-Wmissing-prototypes]
drivers/media/usb/au0828/au0828-video.c:916:6: warning: no previous prototype for 'au0828_vid_buffer_timeout' [-Wmissing-prototypes]
drivers/media/usb/au0828/au0828-video.c:940:6: warning: no previous prototype for 'au0828_vbi_buffer_timeout' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27 18:11:36 -02:00
Hans Verkuil 0e8025b9f6 [media] v4l2: make vidioc_s_audio const
Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_audio.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26 10:50:12 -03:00
Mauro Carvalho Chehab 64cbeb2818 [media] au0828, cx231xx: remove dependency for DVB_CAPTURE_DRIVERS
This symbol got removed by menu reorganization; just depending on
DVB_CORE is enough.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-12 08:13:13 -03:00
Mauro Carvalho Chehab fccea74ff8 [media] Kconfig: merge all customise options into just one
Instead of having 3 options to allow customizing the media
sub-drivers (tuners, I2C drivers, frontends), merge all of
them into just one.

That simplifies the life for users, as they can just keep
this untouched.

Life for developers is also simpler, as there's now just
one Kconfig item to remember, for the ancillary sub-drivers
providing supports for chips that could change from one
board design to another.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21 08:05:06 -03:00
Mauro Carvalho Chehab 0c0d06cac6 [media] rename most media/video usb drivers to media/usb
Rename all USB drivers with their own directory under
drivers/media/video into drivers/media/usb and update the
building system.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15 16:25:07 -03:00