Commit Graph

223805 Commits (829ba9fe34246f1f5e813b6bf84171d36e776734)

Author SHA1 Message Date
David Härdeman 829ba9fe34 [media] rc-core: fix some leftovers from the renaming patches
Fix some minor comments etc which are leftover from the old naming scheme.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:54 -02:00
David Härdeman 3938e0cfeb [media] bttv: merge ir decoding timers
Similarly to saa7134, bttv_ir has two timers, only one of which is used
at a time and which serve the same purpose. Merge them.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:54 -02:00
David Härdeman edb4c25ca3 [media] bttv: rename struct card_ir to bttv_ir
bttv_ir is more consistent with all other structs used in the same driver.
Also, clean up the struct to remove commented out members and the work_struct
which is unused.

[mchehab@redhat.com: fix a warning at bttv_rc5_timer_end]
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:54 -02:00
David Härdeman 7c8352d18d [media] saa7134: merge saa7134_card_ir->timer and saa7134_card_ir->timer_end
Both timers are used for a similar purpose. Merging them allows for some
minor simplifications.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:54 -02:00
David Härdeman 651c7a5f7f [media] saa7134: some minor cleanups
Mostly using appropriate data types and constants (e.g. int -> bool).

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:53 -02:00
David Härdeman b0ddb0f364 [media] saa7134: use full keycode for BeholdTV
Using the full keycode for BeholdTV hardware makes another module
parameter unnecessary.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:53 -02:00
David Härdeman a29df8579a [media] saa7134: remove unused module parameter
ir_rc5_remote_gap is a leftover from ir-common, remove it.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:53 -02:00
Hans de Goede 622d9f5d30 [media] pwc: failure to submit an urb is a fatal error
Failure to submit an urb is a fatal error, make isoc_init return an
error when this happens rather then only log it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:53 -02:00
Hans de Goede c7d18867c8 [media] pwc: Also set alt setting to alt0 when no error occured
isoc_cleanup contains a check to not set the altsetting to alt0 when
the device was unplugged, but the check currently is buggy, and causes
the alt setting to only be set to 0 if an error occured while streaming.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:52 -02:00
Hans de Goede 3751e288bc [media] pwc: do not start isoc stream on /dev/video open
pwc was starting streaming on /dev/video# open rather then on STREAM_ON. Now
that the v4l1 compat code is removed from the pwc driver there is no reason
left to do this. So this patch changes the pwc driver to delay starting
the isoc stream (and thus using valuable usb bandwidth) until the application
does a STREAM_ON

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:52 -02:00
Mauro Carvalho Chehab a931910d3b [media] stb6100: warning cleanup
drivers/media/dvb/frontends/stb6100.c:120: warning: ‘stb6100_normalise_regs’ defined but not used

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:52 -02:00
Mauro Carvalho Chehab 03c9a806e3 [media] rc: Rename IR raw interface to ir-raw.c
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:52 -02:00
Mauro Carvalho Chehab d100e659b6 [media] rc: use rc_map_ prefix for all rc map tables
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:52 -02:00
Mauro Carvalho Chehab 2f4f58d689 [media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault
is due to a bad naming when rc subsystem was created, but there were lots
of old names that were still here.

Use a common standard for everything.

Patch generated by this script:

for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:51 -02:00
Mauro Carvalho Chehab b088ba658b [media] rc: Properly name the rc_map struct
The struct that describes a rc mapping had an weird and long name.
We should properly name it, to make easier for developers to work
with it, and to avoid confusion.

Basically, generated by this script:

for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode_table,rc_map,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_tab,rc_map,g <$i >a && mv a $i; done

(and manually fixed where needed)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:51 -02:00
Mauro Carvalho Chehab 52b661449a [media] rc: Rename remote controller type to rc_type instead of ir_type
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,IR_TYPE,RC_TYPE,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_type,rc_type,g <$i >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:50 -02:00
Mauro Carvalho Chehab 29e3ec19d5 [media] cx231xx: Properly name rc_map name
rc_map is confusing, as it may be understood as another thing. Properly
rename the field to indicate its usage.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:50 -02:00
Mauro Carvalho Chehab ca86674b8a [media] Rename all public generic RC functions from ir_ to rc_
Those functions are not InfraRed specific. So, rename them to properly
reflect it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:50 -02:00
Mauro Carvalho Chehab 6bda96447c [media] rc: rename the remaining things to rc_core
The Remote Controller subsystem is meant to be used not only by Infra Red
but also for similar types of Remote Controllers. The core is not specific
to Infra Red. As such, rename:
	- ir-core.h to rc-core.h
	- IR_CORE to RC_CORE
	- namespace inside rc-core.c/rc-core.h

To be consistent with the other changes.

No functional change on this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:50 -02:00
Mauro Carvalho Chehab a6e3b81f61 [media] rc: Remove ir-common.h
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:49 -02:00
Mauro Carvalho Chehab bce8d0fe4a [media] rc: remove ir-common module
Something weird happened with commit 740069e6e043403199dbe2b42256722fb814f6ae.
Instead of dong the right thing, it got somehow corrupted and reverted the
rc changes.

Thanks to David Härdeman for pointing me about the problem.

This patch should be merged with 740069e6e04 before sending upstream.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:49 -02:00
Manu Abraham 1697c8dfba [media] stb0899: fix diseqc messages getting lost
- Some badly written applications in conjuction with certain SEC devices
  do send too many messages causing the DiSEqC bus to get congested. As
  a result, the end devices do get confused and hence do not respond.
  The issue was found by Julian Scheel.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:49 -02:00
Manu Abraham f14bfe94e4 [media] stb6100: Improve tuner performance
- Reduce the amount of white noise present, which causes the
  demodulator a significant time to acquire a frontend lock
  on a whole. Frontend shows a large significant improvement in
  performance.

Thanks to Peter Nayler for helping to identify the potential
hotspots and fixing them.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:49 -02:00
Ben Hutchings 3037fd1430 [media] Mantis: Rename gpio_set_bits to mantis_gpio_set_bits
This function is declared extern and exported, and should not be given
a generic name which may conflict with gpiolib in future.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:48 -02:00
Bjørn Mork a22407faba [media] Mantis: use dvb_attach to avoid double dereferencing on module removal
Convert the driver to use the dvb_attach macro to avoid the hard dependency
on the frontend drivers.  The hard dependecy will result in loading a
number of unused frontends, and unwanted automatic dereferencing.

This fixes a bug where unloading the mantis driver will derefence any
attached frontend twice, which will cause an oops if the same frontend is
used by another driver.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:48 -02:00
Marko Ristola 9c81496a88 [media] Mantis: append tasklet maintenance for DVB stream delivery
After dvb-core has called mantis-fe->stop_feed(dvbdmxfeed)
the last time (count to zero), no data should ever be copied
with dvb_dmx_swfilter() by a tasklet: the target structure
might be in an unusable state. Caller of mantis_fe->stop_feed()
assumes that feeding is stopped after stop_feed() has been
called, ie. dvb_dmx_swfilter() isn't running, and won't be called.

There is a risk that dvb_dmx_swfilter() references freed resources
(memory or spinlocks or ???) causing instabilities. Thus
tasklet_disable(&mantis->tasklet) must be called inside of
mantis-fe->stop_feed(dvbdmxfeed) when necessary.

Signed-off-by: Marko Ristola <marko.ristola@kolumbus.fi>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:48 -02:00
Manu Abraham 116d588ea2 [media] Mantis, hopper: use MODULE_DEVICE_TABLE
use the macro to make modules auto-loadable

Thanks to Ozan Çağlayan <ozan@pardus.org.tr> for pointing it out

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:48 -02:00
Wolfram Sang e6f199f3e7 [media] i2c: Remove obsolete cleanup for clientdata
A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit. This is obsolete meanwhile, so fix it and hope the word will spread.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:47 -02:00
Wolfram Sang c0ff9f4c24 [media] media: video: do not clear 'driver' from an i2c_client
The i2c-core does this already.

Reported-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:47 -02:00
Jesper Juhl 9a9dcb4a19 [media] cx231xx-417: Remove unnecessary casts of void ptr returning alloc function return values
Hi,

The [vk][cmz]alloc(_node) family of functions return void pointers which
it's completely unnecessary/pointless to cast to other pointer types since
that happens implicitly.

This patch removes such casts from drivers/media/

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:47 -02:00
Randy Dunlap 9c0147b694 [media] timblogiw: fix kconfig & build error
timblogiw uses dma() interfaces and it selects TIMB_DMA for that
support.  However, drivers/dma/ is not built unless
CONFIG_DMA_ENGINE is enabled, so select/enable that symbol also.

drivers/built-in.o: In function `timblogiw_close':
timblogiw.c:(.text+0x4419fe): undefined reference to `dma_release_channel'
drivers/built-in.o: In function `buffer_release':
timblogiw.c:(.text+0x441a8d): undefined reference to `dma_sync_wait'
drivers/built-in.o: In function `timblogiw_open':
timblogiw.c:(.text+0x44212b): undefined reference to `__dma_request_channel'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:47 -02:00
Richard Röjfors c091575c8b [media] mfd: Add timberdale video-in driver to timberdale
This patch defines platform data for the video-in driver
and adds it to all configurations of timberdale.

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:46 -02:00
Richard Röjfors 9eae42e5a2 [media] media: Add timberdale video-in driver
This patch adds the timberdale video-in driver.

The video IP of timberdale delivers the video data via DMA.
The driver uses the DMA api to handle DMA transfers, and make use
of the V4L2 video buffers to handle buffers against user space.

If available the driver uses an encoder to get/set the video standard

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:46 -02:00
Joe Perches 36d89f7de4 [media] drivers/staging/cx25821: Use pr_fmt and pr_<level>
Fix several defects with bad line continuation uses that
introduce whitespace.
Fix several defects with lines missing "\n".
Standardize prefixes via pr_fmt.
Remove internal cx25821 prefixes.
Standardize :%s():" ... __func__ uses.
Coalesce long formats.
Add KERN_<level> prefixes via pr_<level> to printks.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:46 -02:00
Matthias Schwarzott 13d28e4917 [media] IX2505V: i2c transfer error code ignored
It seems that ix2505v driver ignores a i2c error in ix2505v_read_status_reg.
This looks like a typing error using (ret = 1) instead of correct (ret == 1).

Acked-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:46 -02:00
Jean Delvare 62c7cdd8a1 [media] TM6000: Drop unused macro
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Michel Ludwig <michel.ludwig@gmail.com>
Cc: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:45 -02:00
Jean Delvare 7bd444ede7 [media] TM6000: Clean-up i2c initialization
Usage of templates for large structures is a bad idea, as it wastes a
lot of space. Manually initializing the few fields we need is way more
efficient.

Also set the algorithm data const, use strlcpy instead of strcpy, fix
a small race (device data must always be set before registering said
device) and properly return error on adapter registration failure.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Michel Ludwig <michel.ludwig@gmail.com>
Cc: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:45 -02:00
Mauro Carvalho Chehab 8ea43d0a2f [media] rc: Remove ir-common module
Now, just one old bttv board uses the old RC5 raw decoding routines.
Its conversion to rc-core requires the generation of IRQ data for both
positive and negative transitions at the IRQ line. I'm not sure if
bttv driver supports it or if the transitions will be reliable enough.
So, due to the lack of hardware for testing, the better for now is to
just move the legacy routines to bttv driver, and wait for someone with
a Nebula Digi could help to port it to use also rc-core raw decoders.

Acked-by: Hermann Pitton <hermann-pitton@arcor.de>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:45 -02:00
Mauro Carvalho Chehab 6c7e653ff6 [media] saa7134: Remove legacy IR decoding logic inside the module
The only IR left still using the old raw decoders on saa7134 is ENCORE
FM 5.3. As it is now using the standard rc-core raw decoders, lots
of old code can be removed from saa7134.

Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:45 -02:00
Mauro Carvalho Chehab 70de39183a [media] saa7134: use rc-core raw decoders for Encore FM 5.3
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:44 -02:00
Stefan Ringel c1937f8e34 [media] tm6000: add revision check
adding chip revision check

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:44 -02:00
Joe Perches 101b25b55e [media] drivers/media: Use vzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:44 -02:00
Jean-François Moine 42e142f6b7 [media] gspca - ov519: New sensor ov7660 with bridge ov530 (ov519)
[mchehab@redhat.com: Some CodingStyle fixes]
Tested-by: Anca Emanuel <anca.emanuel@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:44 -02:00
Jean-François Moine 7491f785dd [media] gspca - ov519: Re-initialize the webcam at resume time
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:43 -02:00
Jean-François Moine b4e96ea30a [media] gspca - ov519: Initialize the ov519 snapshot register
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:43 -02:00
Jean-François Moine 5927abcb21 [media] gspca - ov519: Change the ov519 start and stop sequences
- start and stop streaming are done via the FRAR
- streaming suspend (for control change) is done by video reset

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:43 -02:00
Jean-François Moine a23acec4bc [media] gspca - ov519: Simplify the LED control functions
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:43 -02:00
Jean-François Moine e2817029b3 [media] gspca - ov519: Check the disabled controls at start time only
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:43 -02:00
Jean-François Moine 858ea5e941 [media] gspca - ov519: Clearer debug and error messages
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:42 -02:00
Jean-François Moine f8f20188e8 [media] gspca - ov519: Propagate errors to higher level
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:42 -02:00