summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-06-27Merge branch 'v4l_for_linus' into staging/for_v3.6Mauro Carvalho Chehab54-271/+218
* v4l_for_linus: (44 commits) [media] smia: Fix compile failures [media] Fix VIDIOC_DQEVENT docbook entry [media] s5p-fimc: Fix control creation function [media] s5p-mfc: Fix checkpatch error in s5p_mfc_shm.h file [media] s5p-mfc: Fix setting controls [media] v4l/s5p-mfc: added image size align in VIDIOC_TRY_FMT [media] v4l/s5p-mfc: corrected encoder v4l control definitions [media] v4l: mem2mem_testdev: Fix race conditions in driver [media] s5p-mfc: Bug fix of timestamp/timecode copy mechanism [media] cxd2820r: Fix an incorrect modulation type bitmask [media] em28xx: Show a warning if the board does not support remote controls [media] em28xx: Add remote control support for Terratec's Cinergy HTC Stick HD [media] USB: Staging: media: lirc: initialize spinlocks before usage [media] Revert "[media] media: mx2_camera: Fix mbus format handling" [media] bw-qcam: driver and pixfmt documentation fixes [media] cx88: fix firmware load on big-endian systems [media] cx18: support big-endian systems [media] ivtv: fix support for big-endian systems [media] tuner-core: return the frequency range of the correct tuner [media] v4l2-dev.c: fix g_parm regression in determine_valid_ioctls() ... Conflicts: Documentation/DocBook/media/v4l/vidioc-create-bufs.xml drivers/media/video/em28xx/em28xx-cards.c
2012-06-25[media] media: gpio-ir-recv: switch to module_platform_driverBenoît Thébaudeau1-12/+1
Cc: Ravi Kumar V <kumarrav@codeaurora.org> Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25[media] media: gpio-ir-recv: add map nameBenoît Thébaudeau2-1/+2
Make it possible for gpio-ir-recv users to choose a map name. Cc: Ravi Kumar V <kumarrav@codeaurora.org> Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25[media] media: gpio-ir-recv: fix missing udev by-path entryBenoît Thébaudeau1-0/+6
Add missing information so that udev can create an entry for gpio-ir-recv under /dev/input/by-path/ . Cc: Ravi Kumar V <kumarrav@codeaurora.org> Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25[media] radio-sf16fmi: Use LM7000 driverOndrej Zary1-36/+25
Convert radio-sf16fmi to use generic LM7000 driver. Tested with SF16-FMI, SF16-FMP and SF16-FMD. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25[media] radio-aimslab: Use LM7000 driverOndrej Zary1-41/+25
Convert radio-aimslab to use generic LM7000 driver. Tested with Reveal RA300. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25[media] radio: Add Sanyo LM7000 tuner driverOndrej Zary1-0/+43
Add very simple driver for Sanyo LM7000 AM/FM tuner chip. Only FM is supported as there is no known HW with AM implemented. This will be used by radio-aimslab and radio-sf16fmi. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25Revert "[media] radio: Add Sanyo LM7000 tuner driver"Mauro Carvalho Chehab4-88/+0
This reverts commit 4ecbb69414c61af3594209e081d6e834ea68a16d. As requested by Hans Verkuil: > You accidentally merged the wrong first version of the lm7000 patch series. > > These are the correct second version patches: > > http://patchwork.linuxtv.org/patch/11689/ > http://patchwork.linuxtv.org/patch/11690/ > http://patchwork.linuxtv.org/patch/11691/ > > The second version is much simpler and doesn't require the creation of a whole > new driver. Requested-by: Hans Verkuil <hverkuil@xs4all.nl> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25Revert "[media] radio-aimslab: Use LM7000 driver"Mauro Carvalho Chehab2-36/+45
This reverts commit bece083a6b2b242c7ab74117640396e1bd851e49. As requested by Hans Verkuil: > You accidentally merged the wrong first version of the lm7000 patch series. > > These are the correct second version patches: > > http://patchwork.linuxtv.org/patch/11689/ > http://patchwork.linuxtv.org/patch/11690/ > http://patchwork.linuxtv.org/patch/11691/ > > The second version is much simpler and doesn't require the creation of a whole > new driver. Requested-by: Hans Verkuil <hverkuil@xs4all.nl> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25Revert "[media] radio-sf16fmi: Use LM7000 driver"Mauro Carvalho Chehab2-5/+2
This reverts commit 1e70a6cf7e965bafd89bf363772eb1a4b8e35934. As requested by Hans Verkuil: > You accidentally merged the wrong first version of the lm7000 patch series. > > These are the correct second version patches: > > http://patchwork.linuxtv.org/patch/11689/ > http://patchwork.linuxtv.org/patch/11690/ > http://patchwork.linuxtv.org/patch/11691/ > > The second version is much simpler and doesn't require the creation of a whole > new driver. Requested-by: Hans Verkuil <hverkuil@xs4all.nl> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25[media] tvaudio: rename getmode and setmodeDaniel Glöckner1-48/+60
This is basically s/getmode/getrxsubchans/ and s/setmode/setaudmode/ with some whitespace adjustment in affected lines to please the eye. The rename is done to point out their relation to the rxsubchans and audmode fields of struct v4l2_tuner. I also corrected a commented out call to v4l_dbg in one of the lines. Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-22[media] s5h1420: Unused variable clock_settingPeter Senna Tschudin1-20/+0
The switch/case was setting clock_setting that is not being used. Both switch/case and the variable definition were removed. Currently clock is being calculated by the formula: (state->fclk/1000000 - 8) Tested by compilation only. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-22[media] stv090x: variable 'no_signal' set but not usedPeter Senna Tschudin1-4/+3
Tested by compilation only. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-22[media] stv0367: variable 'tps_rcvd' set but not usedPeter Senna Tschudin1-4/+1
Tested by compilation only. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-22[media] saa7164: Variable set but not usedPeter Senna Tschudin1-14/+0
In function saa7164_api_i2c_read variable regval was set but not used. Tested by compilation only. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-22[media] pvrusb2: Variables set but not usedPeter Senna Tschudin1-8/+0
Tested by compilation only. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-22[media] cx231xx: Paranoic stack memory savePeter Senna Tschudin1-14/+3
Saves 255 bytes of stack memory on cx231xx_usb_probe() by removing a char array. Tested by compilation only. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] [trivial] v4l drivers: typo, change ctruct to struct in commentPeter Meerwald2-2/+2
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] stradis: remove unused V4L1 headersPaul Bolle5-671/+0
Commit 39c3d488452ae206cfc8afda0db041ee55d01c3c ("[media] cpia, stradis: remove deprecated V4L1 drivers") removed the last file including these five headers. Apparently it was just an oversight to keep them in the tree. They can safely be removed now. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] em28xx: Improve support for the Terratec Cinergy HTC Stick HDMartin Blumenstingl2-7/+84
The windows driver used different values for the GPIOs and analog decoder configuration. The values from the windows driver are now used. It also seems that the windows driver has LNA always disabled. Thus we are doing the same (using the same flags as on windows). I (only) tested with DVB-T and it worked quite well. [mchehab@redhat.com: Fix merge conflicts and tested with DVB-C] Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] em28xx: Add the DRX-K at I2C address 0x29 to the list of known I2C ↵Martin Blumenstingl1-0/+1
devices Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] Add support for downloading the firmware of the Terratec Cinergy HTC ↵Martin Blumenstingl1-1/+19
Stick HD's firmware As of June 2012 it uses the same firmware as the Hauppauge WinTV HVR 930C. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] radio-sf16fmi: Use LM7000 driverOndrej Zary2-2/+5
Convert radio-sf16fmi to use generic LM7000 driver. Tested with SF16-FMI, SF16-FMP and SF16-FMD. radio."); @@ -48,37 +50,40 @@ struct fmi bool mute; unsigned long curfreq; /* freq in kHz */ struct mutex lock; + struct lm7000 lm; }; static struct fmi fmi_card; static struct pnp_dev *dev; bool pnp_attached; -/* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */ -/* It is only useful to give freq in interval of 800 (=0.05Mhz), - * other bits will be truncated, e.g 92.7400016 -> 92.7, but - * 92.7400017 -> 92.75 - */ -#define RSF16_ENCODE(x) ((x) / 800 + 214) #define RSF16_MINFREQ (87 * 16000) #define RSF16_MAXFREQ (108 * 16000) -static void outbits(int bits, unsigned int data, int io) +#define FMI_BIT_TUN_CE (1 << 0) +#define FMI_BIT_TUN_CLK (1 << 1) +#define FMI_BIT_TUN_DATA (1 << 2) +#define FMI_BIT_VOL_SW (1 << 3) +#define FMI_BIT_TUN_STRQ (1 << 4) + +void fmi_set_pins(struct lm7000 *lm, u8 pins) { - while (bits--) { - if (data & 1) { - outb(5, io); - udelay(6); - outb(7, io); - udelay(6); - } else { - outb(1, io); - udelay(6); - outb(3, io); - udelay(6); - } - data >>= 1; - } Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] radio-aimslab: Use LM7000 driverOndrej Zary2-45/+36
Convert radio-aimslab to use generic LM7000 driver. Tested with Reveal RA300. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] radio: Add Sanyo LM7000 tuner driverOndrej Zary4-0/+88
Add very simple driver for Sanyo LM7000 AM/FM tuner chip. Only FM is supported as there is no known HW with AM implemented. This will be used by radio-aimslab and radio-sf16fmi. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] em28xx: Make a few drxk_config structs staticEzequiel García1-4/+4
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] em28xx: Remove unused AC97 register definitionsEzequiel García1-50/+1
There is a specific header sound/ac97_codec.h that defines these. All drivers should use it instead of rolling its own set of macros. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] em28xx: Rename AC97 registers to use sound/ac97_codec.h definitionsEzequiel García2-29/+31
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] em28xx: Fix wrong AC97 mic register usageEzequiel García1-1/+1
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] zr364xx: add suspend/resume supportHans Verkuil1-12/+57
And fix initial control setup. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] zr364xx: allow multiple opensHans Verkuil1-86/+51
This driver allowed only one open filehandle. This is against the spec, so fix the driver by assigning proper ownership when streaming. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] zr364xx: add support for control eventsHans Verkuil1-27/+18
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] zr364xx: fix querycap and fill in colorspaceHans Verkuil1-4/+5
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] zr364xx: convert to the control frameworkHans Verkuil1-75/+36
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] zr364xx: introduce v4l2_deviceHans Verkuil1-58/+51
Implement struct v4l2_device: use the core lock and use the v4l2_device release() callback. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] zr364xx: embed video_device and register it at the end of probeHans Verkuil1-30/+16
Embed the video_device struct instead of allocating it and register it as the last thing in probe(). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] V4L2 Spec: fix typo: NTSC -> NRSCHans Verkuil1-1/+1
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] V4L2 spec: clarify a few modulator issuesHans Verkuil1-4/+13
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] S_HW_FREQ_SEEK: set capability flags and return ENODATA instead of ↵Hans Verkuil6-8/+16
EAGAIN Set the new capability flags in G_TUNER and return ENODATA if no channels were found. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] v4l2 spec: document the new v4l2_tuner capabilitiesHans Verkuil3-3/+33
Update the spec with the new capabilities and specify new error codes for S_HW_FREQ_SEEK. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] videodev2.h: add new hwseek capability bitsHans Verkuil1-0/+2
Tell the application whether the hardware seek is bounded and/or wraps around. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] tvaudio: don't report mono when stereo is receivedDaniel Glöckner1-6/+6
The V4L2 spec says reporting mono and stereo at the same time means the hardware can not distinguish between the two. So when we can, we should report only one of them. Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] tvaudio: support V4L2_TUNER_MODE_LANG1_LANG2Daniel Glöckner1-2/+32
Many of the audio decoders handled by the driver support this mode, so the driver should support it as well. Coding style errors are done to blend into the surrounding code. Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] tvaudio: obey V4L2 tuner audio matrixDaniel Glöckner1-29/+32
V4L2 specifies the audio mode to use for combinations of possible (rxsubchans) and requested (audmode) audio modes. Up to now tvaudio has made these decisions automatically based on the possible audio modes from setting of the frequency until VIDIOC_S_TUNER was called. It then forced the hardware to use the mode requested by the user. With this patch it continues to adjust the audio mode while taking the requested mode into account. Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] tvaudio: use V4L2_TUNER_SUB_* for bitfieldsDaniel Glöckner1-36/+27
The V4L2_TUNER_MODE_* constants are not suited for use in bitfields. Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] tvaudio: don't use thread for TA8874ZDaniel Glöckner1-1/+0
Judging from the data sheet it will automatically switch to the next best audio mode in accordance with the V4L2 tuner audio matrix. Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] tvaudio: remove watch_stereoDaniel Glöckner1-3/+0
It is never read and only assigned 0. Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] tvaudio: use V4L2_TUNER_MODE_SAP for TDA985x SAPDaniel Glöckner1-1/+2
As V4L2_TUNER_MODE_SAP == V4L2_TUNER_MODE_LANG2, we make V4L2_TUNER_MODE_LANG1 equal to V4L2_TUNER_MODE_STEREO. Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] tvaudio: fix tda8425_setmodeDaniel Glöckner1-10/+14
The passed audio mode is not a bitfield. Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-19[media] tvaudio: fix TDA9873 constantsDaniel Glöckner1-5/+5
These constants were unused so far but need | instead of &. Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>