Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a0adaf3 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (5345): ivtv driver for Conexant cx23416/cx23415 MPEG encoder/decoder



It took three core maintainers, over four years of work, eight new i2c
modules, eleven new V4L2 ioctls, three new DVB video ioctls, a Sliced
VBI API, a new MPEG encoder API, an enhanced DVB video MPEG decoding
API, major YUV/OSD contributions from Ian and John, web/wiki/svn/trac
support from Axel Thimm, (hardware) support from Hauppauge, support and
assistance from the v4l-dvb people and the many, many users of ivtv to
finally make it possible to merge this driver into the kernel.
Thank you all!

Signed-off-by: default avatarKevin Thayer <nufan_wfk@yahoo.com>
Signed-off-by: default avatarChris Kennedy <c@groovy.org>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarJohn P Harvey <john.p.harvey@btinternet.com>
Signed-off-by: default avatarIan Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent ac52ea3c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -647,6 +647,8 @@ config VIDEO_HEXIUM_GEMINI

source "drivers/media/video/cx88/Kconfig"

source "drivers/media/video/ivtv/Kconfig"

config VIDEO_M32R_AR
	tristate "AR devices"
	depends on M32R && VIDEO_V4L1
+1 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ obj-$(CONFIG_VIDEO_CPIA_USB) += cpia_usb.o
obj-$(CONFIG_VIDEO_MEYE) += meye.o
obj-$(CONFIG_VIDEO_SAA7134) += ir-kbd-i2c.o saa7134/
obj-$(CONFIG_VIDEO_CX88) += cx88/
obj-$(CONFIG_VIDEO_IVTV) += ivtv/
obj-$(CONFIG_VIDEO_EM28XX) += em28xx/
obj-$(CONFIG_VIDEO_USBVISION) += usbvision/
obj-$(CONFIG_VIDEO_TVP5150) += tvp5150.o
+26 −0
Original line number Diff line number Diff line
config VIDEO_IVTV
	tristate "Conexant cx23416/cx23415 MPEG encoder/decoder support"
	depends on VIDEO_V4L2 && USB && I2C && EXPERIMENTAL
	select FW_LOADER
	select VIDEO_TUNER
	select VIDEO_TVEEPROM
	select VIDEO_CX2341X
	select VIDEO_MSP3400
	select VIDEO_SAA711X
	select VIDEO_SAA7127
	select VIDEO_TVAUDIO
	select VIDEO_CS53L32A
	select VIDEO_TLV320AIC23B
	select VIDEO_WM8775
	select VIDEO_WM8739
	select VIDEO_UPD64031A
	select VIDEO_UPD64083
	---help---
	  This is a video4linux driver for Conexant cx23416 or cx23416 based
	  PCI personal video recorder devices.

	  This is used in devices such as the Hauppauge PVR-150/250/350/500
	  cards.

	  To compile this driver as a module, choose M here: the
	  module will be called ivtv.
+7 −0
Original line number Diff line number Diff line
ivtv-objs	:= ivtv-audio.o ivtv-cards.o ivtv-controls.o \
		   ivtv-driver.o ivtv-fileops.o ivtv-firmware.o \
		   ivtv-gpio.o ivtv-i2c.o ivtv-ioctl.o ivtv-irq.o \
		   ivtv-mailbox.o ivtv-queue.o ivtv-streams.o ivtv-udma.o \
		   ivtv-vbi.o ivtv-video.o ivtv-yuv.o

obj-$(CONFIG_VIDEO_IVTV) += ivtv.o
+74 −0
Original line number Diff line number Diff line
/*
    Audio-related ivtv functions.
    Copyright (C) 2003-2004  Kevin Thayer <nufan_wfk at yahoo.com>
    Copyright (C) 2005-2007  Hans Verkuil <hverkuil@xs4all.nl>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#include "ivtv-driver.h"
#include "ivtv-mailbox.h"
#include "ivtv-i2c.h"
#include "ivtv-gpio.h"
#include "ivtv-cards.h"
#include "ivtv-audio.h"
#include <media/msp3400.h>
#include <linux/videodev.h>

/* Selects the audio input and output according to the current
   settings. */
int ivtv_audio_set_io(struct ivtv *itv)
{
	struct v4l2_routing route;
	u32 audio_input;
	int mux_input;

	/* Determine which input to use */
	if (test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags)) {
		audio_input = itv->card->radio_input.audio_input;
		mux_input = itv->card->radio_input.muxer_input;
	} else {
		audio_input = itv->card->audio_inputs[itv->audio_input].audio_input;
		mux_input = itv->card->audio_inputs[itv->audio_input].muxer_input;
	}

	/* handle muxer chips */
	route.input = mux_input;
	route.output = 0;
	ivtv_i2c_hw(itv, itv->card->hw_muxer, VIDIOC_INT_S_AUDIO_ROUTING, &route);

	route.input = audio_input;
	if (itv->card->hw_audio & IVTV_HW_MSP34XX) {
		route.output = MSP_OUTPUT(MSP_SC_IN_DSP_SCART1);
	}
	return ivtv_i2c_hw(itv, itv->card->hw_audio, VIDIOC_INT_S_AUDIO_ROUTING, &route);
}

void ivtv_audio_set_route(struct ivtv *itv, struct v4l2_routing *route)
{
	ivtv_i2c_hw(itv, itv->card->hw_audio, VIDIOC_INT_S_AUDIO_ROUTING, route);
}

void ivtv_audio_set_audio_clock_freq(struct ivtv *itv, u8 freq)
{
	static u32 freqs[3] = { 44100, 48000, 32000 };

	/* The audio clock of the digitizer must match the codec sample
	   rate otherwise you get some very strange effects. */
	if (freq > 2)
		return;
	ivtv_call_i2c_clients(itv, VIDIOC_INT_AUDIO_CLOCK_FREQ, &freqs[freq]);
}
Loading