summaryrefslogtreecommitdiff
path: root/drivers/media/video/cx88/cx88-blackbird.c
AgeCommit message (Collapse)Author
2008-04-26V4L/DVB (7733): blackbird_find_mailbox negative return ignored in ↵Roel Kluin
blackbird_initialize_codec() dev->mailbox is unsigned. so a negative return goes unnoticed Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7521): media/video/cx88 replace remaining __FUNCTION__ occurrencesHarvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7451): cx88: Add user control for chroma AGCFrej Drejhammar
The cx2388x family has support for chroma AGC. This patch implements a the V4L2_CID_CHROMA_AGC control for the cx2388x family. By default chroma AGC is disabled, as in previous versions of the driver. Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>" Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7237): Convert videobuf-dma-sg to generic DMA APIGuennadi Liakhovetski
videobuf-dma-sg does not need to depend on PCI. Switch it to using generic DMA API, convert all affected drivers, relax Kconfig restriction, improve compile-time type checking, fix some Coding Style violations while at it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7094): static memoryDouglas Schilling Landgraf
- Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6861): cx2341x: command argument should be u32 instead of intHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6836): Fix CodingStyle troubles caused by the previous cx88 commitsMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6832): cx88-blackbird: don't mute audio when stopping the codecMichael Krufky
We should not mute the audio input when we stop the codec, because it will interfere with the live uncompressed stream. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Reviewed-by: Jelle Foks <jelle@foks.8m.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6830): cx88-blackbird: remove unnecessary encoder unmuteJelle Foks
Remove the unnecessary BLACKBIRD_UNMUTE calls to the mpeg encoder in cx88-blackbird.c The encoder is never muted, hence unmuting should then only be necessary once after hardware initialization. I tested this from warm boots and cold boots (with long power down time to ensure the sram in the chip is emptied), and found that after the firmware upload the encoder is apparently not muted, making the unmutes unnecessary. Signed-off-by: Jelle Foks <jelle@foks.8m.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6829): cx88-blackbird: remove unnecessary msleep()'sJelle Foks
Remove the unnecessary msleep()'s in cx88-blackbird.c Signed-off-by: Jelle Foks <jelle@foks.8m.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6828): cx88-blackbird: audio improvementsJelle Foks
This patch should fix the 'muted audio' and 'raspy audio' problem for mpeg2 streams out of cx88-blackbird devices. Especially mythtv users would find that the audio would often sound bad (aliased, or 'raspy'), mainly related to channel changes, many (all?) other users would find that there was no audio at all in the mpeg data from the encoder chip, unless the audio was manually unmuted. The patch includes the following modifications: Don't actually start the mpeg2 encoder until the device is read from by the application. Wait until the audio is stable for at least 400ms before starting the mpeg encoder. Mute/Unmute the audio when starting/stopping the mpeg encoder. Stop the mpeg encoder when changing parameters and when changing tuner frequency. Add a variable 'mpeg_active' to struct cx8802_dev to allow tracking of whether or not the mpeg2 encoder is active. Load the firmware on cx88-blackbird driver load. Signed-off-by: Jelle Foks <jelle@foks.8m.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-11V4L/DVB (6602): V4L: Convert videobuf drivers to videobuf_stopBrandon Philips
Drivers were using cookie cutter code for stopping the read/stream. Use the new videobuf_stop function which is lock safe. Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-22V4L/DVB (6321): Remove obsolete VIDIOC_S/G_MPEGCOMP ioctlsHans Verkuil
Remove the obsolete VIDIOC_G_MPEGCOMP and VIDIOC_S_MPEGCOMP ioctls from the V4L2 API as per the removal schedule (October 2007). Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6252): Adapt drivers to use the newer videobuf modulesMauro Carvalho Chehab
PCI-dependent videobuf_foo methods were renamed as videobuf_pci_foo. Also, videobuf_dmabuf is now part of videobuf-dma-sg private struct. So, to access it, a subroutine call is needed. This patch renames all occurences of those function calls to be consistent with the video-buf split. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981 Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
2007-10-09V4L/DVB (6125): whitespace cleanup: replace leading spaces with tabsMichael Krufky
There were many instances of 7-space indents spread throughout the v4l-dvb tree. This patch replaces the 7-space indents with tabs. The whitespace cleaner script doesn't catch these, because it assumes that all indents are 8-space. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6088): cx2341x: some controls can't be changed while the device is busyHans Verkuil
The driver should now pass the 'busy' state of the device to the cx2341x module whenever controls are set or tried. -EBUSY will be returned if the device is busy and the user attempts to modify certain 'dangerous' controls. It concerns controls that change the audio or video compression mode and bitrates. The cx88-blackbird and pvrusb2 drivers currently always pass '0' (not busy) to the cx2341x, effectively keeping the old behavior for now. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab
Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This patch removes all occurences of moduleparm.h from drivers/media files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6021): cx88: Copy board information into card stateTrent Piepho
The cx88 driver state stored the ID of the board type in core->board. Every time the driver need to get some information about the board configuration, it uses the board number as an index into board configuration array. This patch changes it so that the board number is in core->boardnr, and core->board is a copy of the board configuration information. This allows access to board information without the extra indirection. e.g. cx88_boards[core->board].mpeg becomes core->board.mpeg. This has a number of advantages: - The code is simpler to write. - It compiles to be smaller and faster, without needing the extra array lookup to get at the board information. - The cx88_boards array no longer needs to be exported to all cx88 modules. - The boards array can be made const - It should be possible to avoid keeping the (large) cx88_boards array around after the module is loaded. - If module parameters or eeprom info override some board configuration setting, it's not necessary to modify the boards array, which would affect all boards of the same type. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18V4L/DVB (5734): Cx88: kill dev->fw_sizeMichael Krufky
Now that cx88-blackbird is only accepting the official firmware image, we no longer have any need to store the size of the firmware inside the cx88 data structure. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18V4L/DVB (5733): Blackbird should accept only new cx2341x encoding firmwaresHans Verkuil
Remove temporary support for older 256 kB firmwares. ivtv, pvrusb2 and blackbird can now all handle the newer larger firmwares, so support for the older (buggier) firmware can be removed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-03V4L/DVB (5816): Cx88-blackbird: fix vidioc_g_tuner never ending list of tunersJelle Foks
v4l-info and other programs would loop indefinitely while querying the tuners for cx88-blackbird cards. The cause was that vidioc_g_tuner didn't return an error value for qctrl->id != 0, making the application think there is a never ending list of tuners... This patch adds the same index check as done in vidioc_g_tuner() in cx88-video. Signed-off-by: Jelle Foks <jelle@foks.8m.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-03V4L/DVB (5260): Cx88-blackbird: allow usage of both 376836 and 262144 sized ↵Michael Krufky
firmware images This updates the cx88-blackbird driver to be able to use the new cx23416 firmware image released by Hauppauge Computer Works, while retaining compatibility with the older firmware images. cx2341x firmware can be downloaded at: http://dl.ivtvdriver.org/ivtv/firmware/ Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5110): Keep the previous tvnorm default for cx88 and cx88-blackbirdMauro Carvalho Chehab
The video_ioctl2 conversion replaced the default from NTSC to PAL_BG. This broke cx88-blackbird. Probably, there are some badness at this driver, not doing all required stuff to change video standard. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5109): Convert cx88-blackbird to use video_ioctl2Mauro Carvalho Chehab
This patch finishes cx88-blackbird conversion to use video_ioctl2. Video standards are generated automatically inside videodev.c. the big ioctl parser is removed, using, instead, video_ioctl2. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5108): Remove_cx88_ioctlMauro Carvalho Chehab
cx88_ioctl were merged at the master ioctl handler on cx88-blackbird Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5107): Use cx88_set_freq() on cx88-blackbird.cMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5106): Do some cleanups at cx88-blackbirdMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5105): Reorder some ioctl handlersMauro Carvalho Chehab
Reorder some ioctl handlers to make easy to convert to video_ioctl2 Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5104): Moved several stuff that were at cx88-video to cx88-blackbird.cMauro Carvalho Chehab
cx88-blackbird were using some ioctl handling that were previously on cx88-video. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-12[PATCH] mark struct file_operations const 4Arjan van de Ven
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. [akpm@sdl.org: dvb fix] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-12-10V4L/DVB (4838): Fix cx88-blackbird null pointerJelle Foks
Allows 'debug=1' for cx88-blackbird module (dev needs to be valid for dprintk). Fixes a null-pointer dereference when using debug=1. Signed-off-by: Jelle Foks <jelle@foks.8m.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10V4L/DVB (4676): Dynamic cx88 mpeg port management for HVR1300 MPEG2/DVB-T ↵Steven Toth
support. A series of patches to change the cx88 framework to allow the PCI mpeg port to be shared dynamically between different types of drivers or applications. This patch changes the cx88-dvb and cx88-blackbird drivers to become 'sub drivers' of a higher single cx88-mpeg driver. The cx88-mpeg driver is a superset of the previous cx88-mpeg/blackbird drivers and now owns the IRQ. cx88-dvb/blackbird now become mini drivers, registering themselves with cx88-mpeg through a standard interface with callbacks. Sub drivers request access to hardware via the cx88-mpeg driver. In turn the cx88-mpeg driver determines whether the hardware is busy and accepts or refuses the request, grant access using callbacks into the sub drivers. The net effect is that you are no longer able to tamper with the mpeg port from multiple different applications at the same time, potentially breaking a live mpeg2 hardware encoding or dvb stream. The mechanism extends to enable multiple dvb frontends to be registered and share the single resource. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03V4L/DVB (4674): Use NULL instead of 0 for ptrsRandy Dunlap
Use NULL instead of 0 for pointer value, eliminate sparse warnings. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03V4L/DVB (4668): Cx88: rename mpeg capability flags from CX88_BOARD_FOO to ↵Michael Krufky
CX88_MPEG_FOO The flags for mpeg capabilities are sub-optimally named as CX88_BOARD_DVB and CX88_BOARD_BLACKBIRD, which creates some confusion. This patch renames the above to CX88_MPEG_DVB and CX88_MPEG_BLACKBIRD. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03V4L/DVB (4667): Changed cx88_board .dvb and .register to an enum.Steven Toth
Some basic cleanup in preperation for a future patch where the cx88-mpeg functions have to deal with the port being used by multiple frontends in (mpeg2 hw encoder and dvb demod). Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26V4L/DVB (4499): CONFIG_PM=n slim: drivers/media/video/*Alexey Dobriyan
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-10[PATCH] release_firmware() fixesMagnus Damm
Use release_firmware() to free requested resources. According to Documentation/firmware_class/README the request_firmware() call should be followed by a release_firmware(). Some drivers do not however free the firmware previously allocated with request_firmware(). This patch tries to fix this by making sure that release_firmware() is used as expected. Signed-off-by: Magnus Damm <magnus@valinux.co.jp> Acked-by: Marcel Holtmann <marcel@holtmann.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-30V4L/DVB (4264): Cx88-blackbird: implement VIDIOC_QUERYCTRL and VIDIOC_QUERYMENUMichael Krufky
This patch implements the newer v4l2 control features to make the standard user controls and mpeg encoder controls of cx88-blackbird video encoder boards available to userspace. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27V4L/DVB (4259): Pass an explicit log prefix to cx2341x_log_statusHans Verkuil
A card number is not unique enough. Instead, let the caller specify the prefix of the status messages. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27V4L/DVB (4229): Cx88-blackbird: implement VIDIOC_LOG_STATUSMichael Krufky
implemented VIDIOC_LOG_STATUS in the cx88-blackbird driver to show the status of i2c clients and the cx23416 mpeg encoder. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-26V4L/DVB (4213): Cx88: cleanupsAdrian Bunk
remove the following unused hooks: - cx88-blackbird.c: cx88_ioctl_hook() - cx88-blackbird.c: cx88_ioctl_translator() make the following needlessly global functions static: - cx88-tvaudio.c: cx88_detect_nicam() remove the following unused EXPORT_SYMBOL's: - cx88-cards.c: cx88_bcount - cx88-cards.c: cx88_subids - cx88-cards.c: cx88_idcount - cx88-cards.c: cx88_card_list - cx88-cards.c: cx88_card_setup - cx88-core.c: cx88_start_audio_dma - cx88-core.c: cx88_stop_audio_dma - cx88-i2c.c: cx88_i2c_init Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (4206): Cx88-blackbird: always set encoder height based on tvnorm->idMichael Krufky
Removed the switch..case block in blackbird_probe for setting encoder height based on video standard. All blackbird devices can rely on tvnorm->id to retrieve this information from the cx2388x video decoder - tuner_formats should not be used to determine the encoding video standard. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (4202): allow selecting CX2341x port modeHans Verkuil
CX2341X port was always set to 'memory', but 'streaming' is also possible ivtv uses the memory (DMA) interface with the CX2341X, while pvrusb2 and cx88-blackbird use the streaming interface. This setting is now selectable by the driver. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (4198): Avoid newer usages of obsoleted experimental MPEGCOMP APIHans Verkuil
Put old MPEGCOMP API under #if __KERNEL__ and issue warnings when used. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (4196): Port cx88-blackbird to the new MPEG API.Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (3982): Cx88-blackbird: use encoder firmware filename defined in ↵Michael Krufky
cx2341x.h Since the filename of the cx23416 encoder firmware image is defined in cx2341x.h, we don't need to explicitly define it in cx88-blackbird.c anymore. This changeset removes BLACKBIRD_FIRM_ENC_FILENAME, replacing all occurrances with CX2341X_FIRM_ENC_FILENAME. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (3973): Cx88-blackbird: pause the encoder during frequency changeValentin Zagura
Added code to cx88-blackbird.c to treat the VIDIOC_S_FREQUENCY ioctl to stop mpeg stream before changing the frequency and restart it after. It seems that the mpeg stream needs to be paused while changing the channel frequency, otherwise the mpeg encoder enters into a bad state, producing artifacts. Signed-off-by: Valentin Zagura <puthre@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (3971): Cx88-blackbird: use standard filename for cx23416 firmwareMichael Krufky
cx88-blackbird uses the same encoder firmware for the cx23416 chip that is used by ivtv and pvrusb2. This patch alters the driver to expect the cx23416 encoder firmware to be located in the file, "v4l-cx2341x-enc.fw", instead of using "blackbird-fw-enc.bin" Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (3970): Cx88-blackbird: use firmware api commands defined in cx2341x.hMichael Krufky
This patch removes all of the BLACKBIRD_API #define's, instead using the equivalent CX2341X_ENC #define's in cx2341x.h Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (3827): Cx88-blackbird: clean up the buffers when closing the MPEG ↵Valentin Zagura
stream This patch cleans up the buffer queue when the MPEG stream is closed, preventing the message, 'cx8802_timeout' Signed-off-by: Valentin Zagura <puthre@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>