Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/mchehab/v4l-dvb

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (310 commits)
  V4L/DVB (6316): Change list_for_each+list_entry to list_for_each_entry
  V4L/DVB (6315): pvrusb2: Change list_for_each+list_entry to list_for_each_entry
  V4L/DVB (6314): saa7134: Replace list_for_each+list_entry with list_for_each_entry
  V4L/DVB (6313): ivtv: Replace list_for_each+list_entry with list_for_each_entry
  V4L/DVB (6312): cx88: Replace list_for_each+list_entry with list_for_each_entry
  V4L/DVB (6311): dvb: Replace list_for_each+list_entry with list_for_each_entry
  V4L/DVB (6308): V4L: zc0301, remove bad usage of ERESTARTSYS
  V4L/DVB (6307): V4L: w9968cf, remove bad usage of ERESTARTSYS
  V4L/DVB (6306): Few clenups for saa7134 resume code
  V4L/DVB (6305): V4L: videobuf-core.c avoid NULL dereferences in videobuf-core
  V4L/DVB (6301): pvrusb: Update DEBUGIFC sysfs to kernel 2.6.13+
  V4L/DVB (6300): CodingStyle cleanup
  V4L/DVB (6299): dvb: Add dependencies for VIDEOBUF_DVB
  V4L/DVB (6297): cx23885: remove wrong Kconfig selection of VIDEOBUF
  V4L/DVB (6296): dib0700: add support for AverMedia DVB-T Express card
  V4L/DVB (6295): saa7134: add autodetection for KWorld ATSC-115
  V4L/DVB (6293): V4L: convert struct class_device to struct device
  V4L/DVB (6292): videobuf_core init always require callback implementation
  V4L/DVB (6291): Fix: avoid oops on some SMP machines
  V4L/DVB (6290): remove videobuf_set_pci_ops
  ...
  • Loading branch information
Linus Torvalds committed Oct 12, 2007
2 parents 6abd2c8 + a991f44 commit c634920
Show file tree
Hide file tree
Showing 276 changed files with 18,481 additions and 5,788 deletions.
2 changes: 1 addition & 1 deletion Documentation/dvb/faq.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Some very frequently asked questions about linuxtv-dvb
- saa7146_vv: SAA7146 video and vbi functions. These are only needed
for full-featured cards.

- video-buf: capture helper module for the saa7146_vv driver. This
- videobuf-dma-sg: capture helper module for the saa7146_vv driver. This
one is responsible to handle capture buffers.

- dvb-ttpci: The main driver for AV7110 based, full-featured
Expand Down
1 change: 1 addition & 0 deletions Documentation/video4linux/CARDLIST.bttv
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,4 @@
146 -> SSAI Ultrasound Video Interface [414a:5353]
147 -> VoodooTV 200 (USA) [121a:3000]
148 -> DViCO FusionHDTV 2 [dbc0:d200]
149 -> Typhoon TV-Tuner PCI (50684)
5 changes: 5 additions & 0 deletions Documentation/video4linux/CARDLIST.cx23885
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0 -> UNKNOWN/GENERIC [0070:3400]
1 -> Hauppauge WinTV-HVR1800lp [0070:7600]
2 -> Hauppauge WinTV-HVR1800 [0070:7800,0070:7801]
3 -> Hauppauge WinTV-HVR1250 [0070:7911]
4 -> DViCO FusionHDTV5 Express [18ac:d500]
5 changes: 3 additions & 2 deletions Documentation/video4linux/CARDLIST.saa7134
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@
87 -> ADS Instant TV Duo Cardbus PTV331 [0331:1421]
88 -> Tevion/KWorld DVB-T 220RF [17de:7201]
89 -> ELSA EX-VISION 700TV [1048:226c]
90 -> Kworld ATSC110 [17de:7350]
90 -> Kworld ATSC110/115 [17de:7350,17de:7352]
91 -> AVerMedia A169 B [1461:7360]
92 -> AVerMedia A169 B1 [1461:6360]
93 -> Medion 7134 Bridge #2 [16be:0005]
94 -> LifeView FlyDVB-T Hybrid Cardbus [5168:3306,5168:3502]
94 -> LifeView FlyDVB-T Hybrid Cardbus/MSI TV @nywhere A/D NB [5168:3306,5168:3502,4e42:3502]
95 -> LifeView FlyVIDEO3000 (NTSC) [5169:0138]
96 -> Medion Md8800 Quadro [16be:0007,16be:0008]
97 -> LifeView FlyDVB-S /Acorp TV134DS [5168:0300,4e42:0300]
Expand All @@ -115,3 +115,4 @@
114 -> KWorld DVB-T 210 [17de:7250]
115 -> Sabrent PCMCIA TV-PCB05 [0919:2003]
116 -> 10MOONS TM300 TV Card [1131:2304]
117 -> Avermedia Super 007 [1461:f01d]
70 changes: 68 additions & 2 deletions drivers/media/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,79 @@ source "drivers/media/common/Kconfig"
config VIDEO_TUNER
tristate
depends on I2C
select TUNER_MT20XX if !VIDEO_TUNER_CUSTOMIZE
select TUNER_TDA8290 if !VIDEO_TUNER_CUSTOMIZE
select TUNER_TEA5761 if !VIDEO_TUNER_CUSTOMIZE
select TUNER_TEA5767 if !VIDEO_TUNER_CUSTOMIZE
select TUNER_SIMPLE if !VIDEO_TUNER_CUSTOMIZE

menuconfig VIDEO_TUNER_CUSTOMIZE
bool "Customize analog tuner modules to build"
depends on VIDEO_TUNER
help
This allows the user to deselect tuner drivers unnecessary
for their hardware from the build. Use this option with care
as deselecting tuner drivers which are in fact necessary will
result in V4L devices which cannot be tuned due to lack of
driver support

If unsure say N.

if VIDEO_TUNER_CUSTOMIZE

config TUNER_MT20XX
tristate "Microtune 2032 / 2050 tuners"
depends on I2C
default m if VIDEO_TUNER_CUSTOMIZE
help
Say Y here to include support for the MT2032 / MT2050 tuner.

config TUNER_TDA8290
tristate "TDA 8290+8275(a) tuner combo"
depends on I2C
default m if VIDEO_TUNER_CUSTOMIZE
help
Say Y here to include support for Philips TDA8290+8275(a) tuner.

config TUNER_TEA5761
tristate "TEA 5761 radio tuner (EXPERIMENTAL)"
depends on I2C && EXPERIMENTAL
default m if VIDEO_TUNER_CUSTOMIZE
help
Say Y here to include support for the Philips TEA5761 radio tuner.

config TUNER_TEA5767
tristate "TEA 5767 radio tuner"
depends on I2C
default m if VIDEO_TUNER_CUSTOMIZE
help
Say Y here to include support for the Philips TEA5767 radio tuner.

config TUNER_SIMPLE
tristate "Simple tuner support"
depends on I2C
default m if VIDEO_TUNER_CUSTOMIZE
help
Say Y here to include support for various simple tuners.

config VIDEO_BUF
endif # VIDEO_TUNER_CUSTOMIZE

config VIDEOBUF_GEN
tristate

config VIDEOBUF_DMA_SG
depends on PCI
select VIDEOBUF_GEN
tristate

config VIDEOBUF_VMALLOC
select VIDEOBUF_GEN
tristate

config VIDEO_BUF_DVB
config VIDEOBUF_DVB
tristate
select VIDEOBUF_GEN
select VIDEOBUF_DMA_SG

config VIDEO_BTCX
tristate
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/common/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ config VIDEO_SAA7146
config VIDEO_SAA7146_VV
tristate
depends on VIDEO_DEV
select VIDEO_BUF
select VIDEOBUF_DMA_SG
select VIDEO_SAA7146
1 change: 0 additions & 1 deletion drivers/media/common/ir-functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/string.h>
#include <linux/jiffies.h>
#include <media/ir-common.h>
Expand Down
62 changes: 61 additions & 1 deletion drivers/media/common/ir-keymaps.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
#include <linux/module.h>
#include <linux/moduleparam.h>

#include <linux/input.h>
#include <media/ir-common.h>
Expand Down Expand Up @@ -1783,3 +1782,64 @@ IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE] = {
};

EXPORT_SYMBOL_GPL(ir_codes_tt_1500);

/* DViCO FUSION HDTV MCE remote */
IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE] = {

[ 0x0b ] = KEY_1,
[ 0x17 ] = KEY_2,
[ 0x1b ] = KEY_3,
[ 0x07 ] = KEY_4,
[ 0x50 ] = KEY_5,
[ 0x54 ] = KEY_6,
[ 0x48 ] = KEY_7,
[ 0x4c ] = KEY_8,
[ 0x58 ] = KEY_9,
[ 0x03 ] = KEY_0,

[ 0x5e ] = KEY_OK,
[ 0x51 ] = KEY_UP,
[ 0x53 ] = KEY_DOWN,
[ 0x5b ] = KEY_LEFT,
[ 0x5f ] = KEY_RIGHT,

[ 0x02 ] = KEY_TV, /* Labeled DTV on remote */
[ 0x0e ] = KEY_MP3,
[ 0x1a ] = KEY_DVD,
[ 0x1e ] = KEY_FAVORITES, /* Labeled CPF on remote */
[ 0x16 ] = KEY_SETUP,
[ 0x46 ] = KEY_POWER2, /* TV On/Off button on remote */
[ 0x0a ] = KEY_EPG, /* Labeled Guide on remote */

[ 0x49 ] = KEY_BACK,
[ 0x59 ] = KEY_INFO, /* Labeled MORE on remote */
[ 0x4d ] = KEY_MENU, /* Labeled DVDMENU on remote */
[ 0x55 ] = KEY_CYCLEWINDOWS, /* Labeled ALT-TAB on remote */

[ 0x0f ] = KEY_PREVIOUSSONG, /* Labeled |<< REPLAY on remote */
[ 0x12 ] = KEY_NEXTSONG, /* Labeled >>| SKIP on remote */
[ 0x42 ] = KEY_ENTER, /* Labeled START with a green
* MS windows logo on remote */

[ 0x15 ] = KEY_VOLUMEUP,
[ 0x05 ] = KEY_VOLUMEDOWN,
[ 0x11 ] = KEY_CHANNELUP,
[ 0x09 ] = KEY_CHANNELDOWN,

[ 0x52 ] = KEY_CAMERA,
[ 0x5a ] = KEY_TUNER,
[ 0x19 ] = KEY_OPEN,

[ 0x13 ] = KEY_MODE, /* 4:3 16:9 select */
[ 0x1f ] = KEY_ZOOM,

[ 0x43 ] = KEY_REWIND,
[ 0x47 ] = KEY_PLAYPAUSE,
[ 0x4f ] = KEY_FASTFORWARD,
[ 0x57 ] = KEY_MUTE,
[ 0x0d ] = KEY_STOP,
[ 0x01 ] = KEY_RECORD,
[ 0x4e ] = KEY_POWER,
};

EXPORT_SYMBOL_GPL(ir_codes_fusionhdtv_mce);
34 changes: 14 additions & 20 deletions drivers/media/common/saa7146_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop)
* general helper functions
****************************************************************************/

/* this is videobuf_vmalloc_to_sg() from video-buf.c
/* this is videobuf_vmalloc_to_sg() from videobuf-dma-sg.c
make sure virt has been allocated with vmalloc_32(), otherwise the BUG()
may be triggered on highmem machines */
static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages)
Expand Down Expand Up @@ -248,19 +248,18 @@ int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt
static irqreturn_t interrupt_hw(int irq, void *dev_id)
{
struct saa7146_dev *dev = dev_id;
u32 isr = 0;
u32 isr;
u32 ack_isr;

/* read out the interrupt status register */
isr = saa7146_read(dev, ISR);
ack_isr = isr = saa7146_read(dev, ISR);

/* is this our interrupt? */
if ( 0 == isr ) {
/* nope, some other device */
return IRQ_NONE;
}

saa7146_write(dev, ISR, isr);

if( 0 != (dev->ext)) {
if( 0 != (dev->ext->irq_mask & isr )) {
if( 0 != dev->ext->irq_func ) {
Expand All @@ -283,21 +282,16 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id)
isr &= ~MASK_28;
}
if (0 != (isr & (MASK_16|MASK_17))) {
u32 status = saa7146_read(dev, I2C_STATUS);
if( (0x3 == (status & 0x3)) || (0 == (status & 0x1)) ) {
SAA7146_IER_DISABLE(dev, MASK_16|MASK_17);
/* only wake up if we expect something */
if( 0 != dev->i2c_op ) {
u32 psr = (saa7146_read(dev, PSR) >> 16) & 0x2;
u32 ssr = (saa7146_read(dev, SSR) >> 17) & 0x1f;
DEB_I2C(("irq: i2c, status: 0x%08x, psr:0x%02x, ssr:0x%02x).\n",status,psr,ssr));
dev->i2c_op = 0;
wake_up(&dev->i2c_wq);
} else {
DEB_I2C(("unexpected irq: i2c, status: 0x%08x, isr %#x\n",status, isr));
}
SAA7146_IER_DISABLE(dev, MASK_16|MASK_17);
/* only wake up if we expect something */
if (0 != dev->i2c_op) {
dev->i2c_op = 0;
wake_up(&dev->i2c_wq);
} else {
DEB_I2C(("unhandled irq: i2c, status: 0x%08x, isr %#x\n",status, isr));
u32 psr = saa7146_read(dev, PSR);
u32 ssr = saa7146_read(dev, SSR);
printk(KERN_WARNING "%s: unexpected i2c irq: isr %08x psr %08x ssr %08x\n",
dev->name, isr, psr, ssr);
}
isr &= ~(MASK_16|MASK_17);
}
Expand All @@ -306,6 +300,7 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id)
ERR(("disabling interrupt source(s)!\n"));
SAA7146_IER_DISABLE(dev,isr);
}
saa7146_write(dev, ISR, ack_isr);
return IRQ_HANDLED;
}

Expand Down Expand Up @@ -548,7 +543,6 @@ EXPORT_SYMBOL_GPL(saa7146_wait_for_debi_done);

EXPORT_SYMBOL_GPL(saa7146_setgpio);

EXPORT_SYMBOL_GPL(saa7146_i2c_transfer);
EXPORT_SYMBOL_GPL(saa7146_i2c_adapter_prepare);

EXPORT_SYMBOL_GPL(saa7146_debug);
Expand Down
5 changes: 3 additions & 2 deletions drivers/media/common/saa7146_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits)
void saa7146_dma_free(struct saa7146_dev *dev,struct videobuf_queue *q,
struct saa7146_buf *buf)
{
struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
DEB_EE(("dev:%p, buf:%p\n",dev,buf));

BUG_ON(in_interrupt());

videobuf_waiton(&buf->vb,0,0);
videobuf_dma_unmap(q, &buf->vb.dma);
videobuf_dma_free(&buf->vb.dma);
videobuf_dma_unmap(q, dma);
videobuf_dma_free(dma);
buf->vb.state = STATE_NEEDS_INIT;
}

Expand Down
23 changes: 17 additions & 6 deletions drivers/media/common/saa7146_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
/* a signal arrived */
return -ERESTARTSYS;

printk(KERN_WARNING "saa7146_i2c_writeout: timed out waiting for end of xfer\n");
printk(KERN_WARNING "%s %s [irq]: timed out waiting for end of xfer\n",
dev->name, __FUNCTION__);
return -EIO;
}
status = saa7146_read(dev, I2C_STATUS);
Expand All @@ -219,7 +220,8 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
break;
}
if (time_after(jiffies,timeout)) {
printk(KERN_WARNING "saa7146_i2c_writeout: timed out waiting for MC2\n");
printk(KERN_WARNING "%s %s: timed out waiting for MC2\n",
dev->name, __FUNCTION__);
return -EIO;
}
}
Expand All @@ -235,7 +237,8 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
/* this is normal when probing the bus
* (no answer from nonexisistant device...)
*/
DEB_I2C(("saa7146_i2c_writeout: timed out waiting for end of xfer\n"));
printk(KERN_WARNING "%s %s [poll]: timed out waiting for end of xfer\n",
dev->name, __FUNCTION__);
return -EIO;
}
if (++trial < 50 && short_delay)
Expand All @@ -246,8 +249,16 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
}

/* give a detailed status report */
if ( 0 != (status & SAA7146_I2C_ERR)) {

if ( 0 != (status & (SAA7146_I2C_SPERR | SAA7146_I2C_APERR |
SAA7146_I2C_DTERR | SAA7146_I2C_DRERR |
SAA7146_I2C_AL | SAA7146_I2C_ERR |
SAA7146_I2C_BUSY)) ) {

if ( 0 == (status & SAA7146_I2C_ERR) ||
0 == (status & SAA7146_I2C_BUSY) ) {
/* it may take some time until ERR goes high - ignore */
DEB_I2C(("unexpected i2c status %04x\n", status));
}
if( 0 != (status & SAA7146_I2C_SPERR) ) {
DEB_I2C(("error due to invalid start/stop condition.\n"));
}
Expand Down Expand Up @@ -277,7 +288,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
return 0;
}

int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, int num, int retries)
static int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, int num, int retries)
{
int i = 0, count = 0;
u32* buffer = dev->d_i2c.cpu_addr;
Expand Down
9 changes: 6 additions & 3 deletions drivers/media/common/saa7146_vbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static void saa7146_set_vbi_capture(struct saa7146_dev *dev, struct saa7146_buf
/* we don't wait here for the first field anymore. this is different from the video
capture and might cause that the first buffer is only half filled (with only
one field). but since this is some sort of streaming data, this is not that negative.
but by doing this, we can use the whole engine from video-buf.c... */
but by doing this, we can use the whole engine from videobuf-dma-sg.c... */

/*
WRITE_RPS1(CMD_PAUSE | CMD_OAN | CMD_SIG1 | e_wait);
Expand Down Expand Up @@ -239,6 +239,8 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,e
saa7146_dma_free(dev,q,buf);

if (STATE_NEEDS_INIT == buf->vb.state) {
struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);

buf->vb.width = llength;
buf->vb.height = lines;
buf->vb.size = size;
Expand All @@ -250,7 +252,8 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,e
err = videobuf_iolock(q,&buf->vb, NULL);
if (err)
goto oops;
err = saa7146_pgtable_build_single(dev->pci, &buf->pt[2], buf->vb.dma.sglist, buf->vb.dma.sglen);
err = saa7146_pgtable_build_single(dev->pci, &buf->pt[2],
dma->sglist, dma->sglen);
if (0 != err)
return err;
}
Expand Down Expand Up @@ -404,7 +407,7 @@ static int vbi_open(struct saa7146_dev *dev, struct file *file)
fh->vbi_fmt.start[1] = 312;
fh->vbi_fmt.count[1] = 16;

videobuf_queue_init(&fh->vbi_q, &vbi_qops,
videobuf_queue_pci_init(&fh->vbi_q, &vbi_qops,
dev->pci, &dev->slock,
V4L2_BUF_TYPE_VBI_CAPTURE,
V4L2_FIELD_SEQ_TB, // FIXME: does this really work?
Expand Down
Loading

0 comments on commit c634920

Please sign in to comment.