summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-07-26[media] radio-miropcm20: add RDS supportHans Verkuil1-17/+286
Once upon a time the radio-miropcm20 driver had RDS support. However, after some internal kernel changes that support was removed. Now that we have a nice RDS API I have been working on adding back this support. It has been tested with the si4713 RDS transmitter and it is working quite nicely. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] DocBook/media: document the new RDS RX controlsHans Verkuil1-0/+51
Document the new RDS receiver controls. This will be used by the radio-miropcm20 driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] v4l2-ctrls: add RX RDS controlsHans Verkuil2-2/+23
The radio-miropcm20 driver has firmware that decodes the RDS signals. So in that case the RDS data becomes available in the form of controls. Add support for these controls to the control framework, allowing the miro driver to use them. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] si4713: add the missing RDS functionalityHans Verkuil2-1/+84
Not all the RDS features of the si4713 were supported. Add the missing bits to fully support the hardware capabilities. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] DocBook/media: document the new RDS TX controlsHans Verkuil1-0/+62
Document the new RDS features that will be supported by the si4713 driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] v4l2-ctrls: add new RDS TX controlsHans Verkuil4-0/+48
The si4713 supports several RDS features not yet implemented in the driver. This patch adds the missing RDS functionality to the list of RDS controls. The ALT_FREQS control is a compound control containing an array of up to 25 (the maximum according to the RDS standard) frequencies. To support that the V4L2_CTRL_TYPE_U32 was added. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] vb2: fix vb2_poll for output streamsHans Verkuil1-0/+7
vb2_poll should always return POLLOUT | POLLWRNORM as long as there are fewer buffers queued than there are buffers available. Poll for an output stream should only wait if all buffers are queued and nobody is dequeuing them. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] vb2: fix videobuf2-core.h commentsHans Verkuil1-6/+10
A lot of work was done in vb2 to regulate how drivers and the vb2 core handle buffer ownership, but inexplicably the videobuf2-core.h comments were never updated. Do so now. The same was true for the replacement of the -ENOBUFS mechanism by the min_buffers_needed field. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] v4l2-ctrls: add support for setting string controlsHans Verkuil2-27/+44
Rather than always having to use a v4l2_ext_control struct to set a control value from within a driver, switch to just setting the new value. This is faster and it makes it possible to set more complex types such as a string control as is added by this patch. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] Docbook/media: improve data_offset/bytesused documentationHans Verkuil1-1/+6
This patch explicitly documents the relationship between bytesused and data_offset. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] rc-core: merge rc5 and streamzap decodersDavid Härdeman7-218/+43
Now that the protocol is part of the scancode, it is pretty easy to merge the rc5 and streamzap decoders. An additional advantage is that the decoder is now stricter as it waits for the trailing silence before determining that a command is a valid rc5/streamzap command (which avoids collisions that I've seen with e.g. Sony protocols). Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] rc-core: rename dev->scanmask to dev->scancode_maskDavid Härdeman6-8/+9
We already have dev->scancode_filter and dev->scancode_wakeup_filter so rename dev->scanmask to dev->scancode_mask for consistency. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] rc-core: remove protocol arraysDavid Härdeman39-119/+86
The basic API of rc-core used to be: dev = rc_allocate_device(); dev->x = a; dev->y = b; dev->z = c; rc_register_device(); which is a pretty common pattern in the kernel, after the introduction of protocol arrays the API looks something like: dev = rc_allocate_device(); dev->x = a; rc_set_allowed_protocols(dev, RC_BIT_X); dev->z = c; rc_register_device(); There's no real need for the protocols to be an array, so change it back to be consistent (and in preparation for the following patches). [m.chehab@samsung.com: added missing changes at some files] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-24[media] rc-core: simplify sysfs codeDavid Härdeman2-121/+151
Simplify and cleanup the sysfs code a bit. [m.chehab@samsung.com: rebased and fixed a CodingStyle issue] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-24[media] saa7134: NEC scancode fixDavid Härdeman2-35/+35
This driver codes the two address bytes in reverse order when compared to the other drivers, so make it consistent (and update the keymap, note that the result is a prefix change from 0x6b86 -> 0x866b, and the latter is pretty common among the NECX keymaps. While not conclusive, it's still a strong hint that the change is correct). Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-24[media] rc-core: document the protocol typeDavid Härdeman40-184/+305
Right now the protocol information is not preserved, rc-core gets handed a scancode but has no idea which protocol it corresponds to. This patch (which required reading through the source/keymap for all drivers, not fun) makes the protocol information explicit which is important documentation and makes it easier to e.g. support multiple protocols with one decoder (think rc5 and rc-streamzap). The information isn't used yet so there should be no functional changes. [m.chehab@samsung.com: rebased, added cxusb and removed bad whitespacing] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-24[media] dib0700: NEC scancode cleanupDavid Härdeman1-16/+20
the RC RX packet is defined as: struct dib0700_rc_response { ... u8 not_system; u8 system; ... u8 data; u8 not_data; The NEC protocol transmits in the order: system not_system data not_data Note that the code defines the NEC extended scancode as: scancode = be16_to_cpu(poll_reply->system16) << 8 | poll_reply->data; i.e. scancode = poll_reply->not_system << 16 | poll_reply->system << 8 | poll_reply->data; Which, if the order *is* reversed, would mean that the scancode that gets defined is in reality: scancode = poll_reply->system << 16 | poll_reply->not_system << 8 | poll_reply->data; Which is the same as the order used in drivers/media/rc/ir-nec-decoder.c. This patch changes the code to match my assumption (the generated scancode should, however, not change). [m.chehab@samsung.com: rebased and fixed the decoding error message] Signed-off-by: David Härdeman <david@hardeman.nu> CC: Patrick Boettcher <pboettcher@kernellabs.com> Tested-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-24[media] rc-core: improve ir-kbd-i2c get_key functionsDavid Härdeman8-100/+127
The arguments used for ir-kbd-i2c's get_key() functions are not really suited for rc-core and the ir_raw/ir_key distinction is just confusing. Convert all of them to return a protocol/scancode/toggle triple instead. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-24[media] bt8xx: fixup RC5 decodingDavid Härdeman3-88/+88
The bt8xx driver does RC5 decoding for Nebula digi hardware, but includes some pointless limitations (both start bits must be one, the device/address/system must be 0x00). Remove those limitations and update the keymap to use the full RC5 scancode (fortunately the 0x00 address means that this is perfectly backwards compatible). Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-24[media] staging: lirc: remove redundant NULL check in unregister_from_lirc()Daeseok Youn1-6/+0
"ir" is already checked before calling unregister_from_lirc(). Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] cxusb: increase buffer length to 80 bytesMauro Carvalho Chehab1-1/+1
As reported by Vincent: [ 16.332247] xc2028 0-0061: Loading firmware for type=BASE F8MHZ (3), id 0000000000000000. [ 16.344378] cxusb: i2c wr: len=64 is too big! 64 bytes is too short for firmware load on this device. So, increase it to 80 bytes. Reported-by: Vincent McIntyre <vincent.mcintyre@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] DocBook: Fix ISDB-T Interleaving propertyMauro Carvalho Chehab1-4/+40
The DocBook documentation is incorrect: on ISDB-T, interleaving time is always a power of 2. Fix it and provides a table showing the actual interleaving length for each mode. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] xc4000: Fix get_frequency()Mauro Carvalho Chehab1-9/+11
The programmed frequency on xc4000 is not the middle frequency, but the initial frequency on the bandwidth range. However, the DVB API works with the middle frequency. This works fine on set_frontend, as the device calculates the needed offset. However, at get_frequency(), the returned value is the initial frequency. That's generally not a big problem on most drivers, however, starting with changeset 6fe1099c7aec, the frequency drift is taken into account at dib7000p driver. This broke support for PCTV 340e, with uses dib7000p demod and xc4000 tuner. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] xc5000: Fix get_frequency()Mauro Carvalho Chehab1-10/+12
The programmed frequency on xc5000 is not the middle frequency, but the initial frequency on the bandwidth range. However, the DVB API works with the middle frequency. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] xc4000: add module meta-tag with the firmware namesMauro Carvalho Chehab1-0/+2
This meta-tag is used by some distros to help them package the firmware and generate proper initrd images. So, add the firmware names there. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] xc4000: Update firmware nameMauro Carvalho Chehab1-5/+20
The firmware name at: http://www.kernellabs.com/firmware/xc4000/ Is different from the one at the Kernel. Update it try first the new name, falling back to the previous one if the new name can't be found. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] dib7000m: Remove unnecessary null testHimangi Saraogi1-4/+1
This patch removes the null test on ch. ch is initialized at the beginning of the function to &demod->dtv_property_cache. Since demod is dereferenced prior to the null test, demod must be a valid pointer, and &demod->dtv_property_cache cannot be null. The following Coccinelle script is used for detecting the change: @r@ expression e,f; identifier g,y; statement S1,S2; @@ *e = &f->g <+... f->y ...+> *if (e != NULL || ...) S1 else S2 Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] mb86a20s: Fix the code that estimates the measurement intervalMauro Carvalho Chehab1-4/+4
Instead of looking at the guard interval field, it was using the interval length, with is wrong. Fix it. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] mb86a20s: Fix InterleavingMauro Carvalho Chehab1-14/+4
Interleaving code was wrong at mb86a20s: instead, it was looking at the Guard Interval. Fix it. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] mb86a20s: fix ISDB-T mode handlingMauro Carvalho Chehab1-4/+5
The driver was reporting an incorrect mode, when mode 2 is selected. While testing it, noticed that neither mode 1 or guard interval 1/32 is supported by this device. Document it, and ensure that it will report _AUTO when it doesn't lock, in order to not report a wrong detection to userspace. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] m88ds3103: implement BERAntti Palosaari2-0/+82
Implement read_ber for BER estimate. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] m88ds3103: fix SNR reporting on 32-bit archAntti Palosaari2-2/+3
There was 32-bit calculation overflow. Use div_u64. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] xc4000: remove unnecessary break after gotoFabian Frederick1-1/+0
Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] xc5000: remove unnecessary break after gotoFabian Frederick1-1/+0
Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] dvb-frontends: remove unnecessary break after gotoFabian Frederick1-1/+0
Cc: Antti Palosaari <crope@iki.fi> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] xc2028: remove unnecessary break after gotoFabian Frederick1-1/+0
Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] r820t: remove unnecessary break after gotoFabian Frederick1-1/+0
Cc: Antti Palosaari <crope@iki.fi> Cc: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] Cleanup line > 80 character violationsEmil Goode2-7/+14
This cleans up some line over 80 character violations. Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] Remove checks of struct member addressesEmil Goode4-69/+25
This removes checks of struct member addresses since they likely result in the condition always being true. Also in the stb6100_get_bandwidth and tda8261_get_bandwidth functions the pointers frontend_ops and tuner_ops are assigned the same addresses twice. Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] media: dib9000: avoid out of bound accessHeinrich Schuchardt1-4/+9
This updated patch also fixes out of bound access to b[]. In dib9000_risc_apb_access_write() an out of bound access to mb[]. The current test to avoid out of bound access to mb[] is insufficient. For len = 19 non-existent mb[10] will be accessed. For odd values of len b[] is accessed out of bounds. For large values of len an of bound access to mb[] may occur in dib9000_mbx_send_attr. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] dvb-frontends: decimal vs hex typo in ChannelConfiguration()Dan Carpenter1-1/+1
>From the context this should be hex 0x80 instead of decimal 80. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] si2168: Fix a badly solved merge conflictMauro Carvalho Chehab1-14/+0
changeset a733291d6934 didn't merge the fixes well. It ended by restoring some bad logic removed there. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22[media] tuners/Kconfig: fix build when just DTV or SDR is enabledMauro Carvalho Chehab1-1/+1
As reported by Kbuildtest: warning: (VIDEO_PVRUSB2 && VIDEO_TLG2300 && VIDEO_USBVISION && VIDEO_GO7007 && VIDEO_AU0828_V4L2 && VIDEO_CX231XX && VIDEO_TM6000 && VIDEO_EM28XX && VIDEO_IVTV && VIDEO_MXB && VIDEO_CX18 && VIDEO_CX23885 && VIDEO_CX88 && VIDEO_BT848 && VIDEO_SAA7134 && VIDEO_SAA7164) selects VIDEO_TUNER which has unmet direct dependencies (MEDIA_SUPPORT && MEDIA_TUNER) That happens when: # CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y # CONFIG_MEDIA_RADIO_SUPPORT is not set # CONFIG_MEDIA_SDR_SUPPORT is not set CONFIG_VIDEO_AU0828_V4L2=y CONFIG_VIDEO_CX231XX=y CONFIG_VIDEO_TM6000=y CONFIG_VIDEO_EM28XX=y CONFIG_VIDEO_TUNER=y CONFIG_MEDIA_SUPPORT=y With means that we need to enable MEDIA_TUNER also when DTV is enabled. While the above config doesn't cover, if we enable SDR, the same error can also happen. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22[media] go7007: move out of staging into drivers/media/usb.Hans Verkuil18-1181/+2
Now that the custom motion detection API in this driver has been replaced with a standard API there is no reason anymore to keep it in staging. So (finally!) move it to drivers/media/usb. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22[media] solo6x10: move out of staging into drivers/media/pci.Hans Verkuil23-20/+4
Now that the custom motion detection API has been replaced with a standard API there is no reason anymore to keep it in staging. So (finally!) move it to drivers/media/pci. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22[media] coda: store IRAM size in struct coda_devtypePhilipp Zabel1-13/+6
Similarly to workbuf_size and tempbuf_size, store iram_size in the coda_devtype structure. This also decreases the IRAM used on i.MX6DL to 128 KiB. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22[media] coda: store global temporary buffer size in struct coda_devtypePhilipp Zabel1-13/+8
Similarly to the work buffer size, store the temporary buffer size in the coda_devtype structure. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22[media] coda: store per-context work buffer size in struct coda_devtypePhilipp Zabel1-32/+26
We had the workbuf_size field since the beginning. Use it to tighten the code a little bit. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22[media] coda: export auxiliary buffers via debugfsPhilipp Zabel1-11/+53
This patch exports all auxiliary buffers, including SRAM, as debugfs binary blobs for debugging purposes. It shows, for example, that psbuf currently doesn't seem to be used at all on CODA7541, and that slicebuf and workbuf usage is far from the maximum. It can also be used to validate SRAM size allocation. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22[media] coda: increase frame stride to 16 for h.264Philipp Zabel1-2/+2
When encoding into h.264, the input frame stride needs to be a multiple of 16. During allocation of the input buffers, it may not be known yet whether the encoder should create h.264 or not. Assume the worst and always use a frame stride that is a multiple of 16. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>