diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-03-25 05:52:19 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-25 07:09:18 -0400 |
commit | 7118b4431b185a101e700ac79fa011000b2b71c3 (patch) | |
tree | baf3275e4b1b00b8276c94ae34ee820a40818dcf | |
parent | 0a522228c1105de7b898bbacc703d5d6191767a8 (diff) |
[media] go7007: update the README
Include the patch required to add support for the go7007 to saa7134.
To be applied once the driver is moved out of staging.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/staging/media/go7007/README | 142 |
1 files changed, 134 insertions, 8 deletions
diff --git a/drivers/staging/media/go7007/README b/drivers/staging/media/go7007/README index aeba1324a9c5..3af0d9062811 100644 --- a/drivers/staging/media/go7007/README +++ b/drivers/staging/media/go7007/README | |||
@@ -1,11 +1,137 @@ | |||
1 | Todo: | 1 | Todo: |
2 | - checkpatch.pl cleanups | 2 | - create an API for motion detection |
3 | - sparse cleanups | 3 | - let s2250-board use i2c subdevs as well instead of hardcoding |
4 | - lots of little modules, should be merged together | 4 | support for the i2c devices. |
5 | and added to the build. | 5 | - when the driver is moved out of staging, support for saa7134-go7007 |
6 | - testing? | 6 | should be added to the saa7134 driver. The patch for that is |
7 | - handle churn in v4l layer. | 7 | included below. |
8 | 8 | ||
9 | Please send patches to Greg Kroah-Hartman <greg@linuxfoundation.org> and Cc: Ross | 9 | Patch for saa7134: |
10 | Cohen <rcohen@snurgle.org> as well. | ||
11 | 10 | ||
11 | diff --git a/drivers/media/pci/saa7134/saa7134-cards.c b/drivers/media/pci/saa7134/saa7134-cards.c | ||
12 | index dc68cf1..9a53794 100644 | ||
13 | --- a/drivers/media/pci/saa7134/saa7134-cards.c | ||
14 | +++ b/drivers/media/pci/saa7134/saa7134-cards.c | ||
15 | @@ -5790,6 +5790,29 @@ struct saa7134_board saa7134_boards[] = { | ||
16 | .gpio = 0x6010000, | ||
17 | } }, | ||
18 | }, | ||
19 | + [SAA7134_BOARD_WIS_VOYAGER] = { | ||
20 | + .name = "WIS Voyager or compatible", | ||
21 | + .audio_clock = 0x00200000, | ||
22 | + .tuner_type = TUNER_PHILIPS_TDA8290, | ||
23 | + .radio_type = UNSET, | ||
24 | + .tuner_addr = ADDR_UNSET, | ||
25 | + .radio_addr = ADDR_UNSET, | ||
26 | + .mpeg = SAA7134_MPEG_GO7007, | ||
27 | + .inputs = { { | ||
28 | + .name = name_comp1, | ||
29 | + .vmux = 0, | ||
30 | + .amux = LINE2, | ||
31 | + }, { | ||
32 | + .name = name_tv, | ||
33 | + .vmux = 3, | ||
34 | + .amux = TV, | ||
35 | + .tv = 1, | ||
36 | + }, { | ||
37 | + .name = name_svideo, | ||
38 | + .vmux = 6, | ||
39 | + .amux = LINE1, | ||
40 | + } }, | ||
41 | + }, | ||
42 | |||
43 | }; | ||
44 | |||
45 | @@ -7037,6 +7060,12 @@ struct pci_device_id saa7134_pci_tbl[] = { | ||
46 | .subdevice = 0x0911, | ||
47 | .driver_data = SAA7134_BOARD_SENSORAY811_911, | ||
48 | }, { | ||
49 | + .vendor = PCI_VENDOR_ID_PHILIPS, | ||
50 | + .device = PCI_DEVICE_ID_PHILIPS_SAA7133, | ||
51 | + .subvendor = 0x1905, /* WIS */ | ||
52 | + .subdevice = 0x7007, | ||
53 | + .driver_data = SAA7134_BOARD_WIS_VOYAGER, | ||
54 | + }, { | ||
55 | /* --- boards without eeprom + subsystem ID --- */ | ||
56 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
57 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, | ||
58 | diff --git a/drivers/media/pci/saa7134/saa7134-core.c b/drivers/media/pci/saa7134/saa7134-core.c | ||
59 | index 8fd24e7..0a849ea 100644 | ||
60 | --- a/drivers/media/pci/saa7134/saa7134-core.c | ||
61 | +++ b/drivers/media/pci/saa7134/saa7134-core.c | ||
62 | @@ -156,6 +156,8 @@ static void request_module_async(struct work_struct *work){ | ||
63 | request_module("saa7134-empress"); | ||
64 | if (card_is_dvb(dev)) | ||
65 | request_module("saa7134-dvb"); | ||
66 | + if (card_is_go7007(dev)) | ||
67 | + request_module("saa7134-go7007"); | ||
68 | if (alsa) { | ||
69 | if (dev->pci->device != PCI_DEVICE_ID_PHILIPS_SAA7130) | ||
70 | request_module("saa7134-alsa"); | ||
71 | @@ -557,8 +559,12 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id) | ||
72 | saa7134_irq_vbi_done(dev,status); | ||
73 | |||
74 | if ((report & SAA7134_IRQ_REPORT_DONE_RA2) && | ||
75 | - card_has_mpeg(dev)) | ||
76 | - saa7134_irq_ts_done(dev,status); | ||
77 | + card_has_mpeg(dev)) { | ||
78 | + if (dev->mops->irq_ts_done != NULL) | ||
79 | + dev->mops->irq_ts_done(dev, status); | ||
80 | + else | ||
81 | + saa7134_irq_ts_done(dev, status); | ||
82 | + } | ||
83 | |||
84 | if (report & SAA7134_IRQ_REPORT_GPIO16) { | ||
85 | switch (dev->has_remote) { | ||
86 | diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h | ||
87 | index 62169dd..5fad39a 100644 | ||
88 | --- a/drivers/media/pci/saa7134/saa7134.h | ||
89 | +++ b/drivers/media/pci/saa7134/saa7134.h | ||
90 | @@ -334,6 +334,7 @@ struct saa7134_card_ir { | ||
91 | #define SAA7134_BOARD_KWORLD_PC150U 189 | ||
92 | #define SAA7134_BOARD_ASUSTeK_PS3_100 190 | ||
93 | #define SAA7134_BOARD_HAWELL_HW_9004V1 191 | ||
94 | +#define SAA7134_BOARD_WIS_VOYAGER 192 | ||
95 | |||
96 | #define SAA7134_MAXBOARDS 32 | ||
97 | #define SAA7134_INPUT_MAX 8 | ||
98 | @@ -364,6 +365,7 @@ enum saa7134_mpeg_type { | ||
99 | SAA7134_MPEG_UNUSED, | ||
100 | SAA7134_MPEG_EMPRESS, | ||
101 | SAA7134_MPEG_DVB, | ||
102 | + SAA7134_MPEG_GO7007, | ||
103 | }; | ||
104 | |||
105 | enum saa7134_mpeg_ts_type { | ||
106 | @@ -403,6 +405,7 @@ struct saa7134_board { | ||
107 | #define card_has_radio(dev) (NULL != saa7134_boards[dev->board].radio.name) | ||
108 | #define card_is_empress(dev) (SAA7134_MPEG_EMPRESS == saa7134_boards[dev->board].mpeg) | ||
109 | #define card_is_dvb(dev) (SAA7134_MPEG_DVB == saa7134_boards[dev->board].mpeg) | ||
110 | +#define card_is_go7007(dev) (SAA7134_MPEG_GO7007 == saa7134_boards[dev->board].mpeg) | ||
111 | #define card_has_mpeg(dev) (SAA7134_MPEG_UNUSED != saa7134_boards[dev->board].mpeg) | ||
112 | #define card(dev) (saa7134_boards[dev->board]) | ||
113 | #define card_in(dev,n) (saa7134_boards[dev->board].inputs[n]) | ||
114 | @@ -535,6 +538,8 @@ struct saa7134_mpeg_ops { | ||
115 | int (*init)(struct saa7134_dev *dev); | ||
116 | int (*fini)(struct saa7134_dev *dev); | ||
117 | void (*signal_change)(struct saa7134_dev *dev); | ||
118 | + void (*irq_ts_done)(struct saa7134_dev *dev, | ||
119 | + unsigned long status); | ||
120 | }; | ||
121 | |||
122 | /* global device status */ | ||
123 | diff --git a/drivers/staging/media/go7007/Makefile b/drivers/staging/media/go7007/Makefile | ||
124 | index 9c6ad4a..1b23689 100644 | ||
125 | --- a/drivers/staging/media/go7007/Makefile | ||
126 | +++ b/drivers/staging/media/go7007/Makefile | ||
127 | @@ -8,8 +8,7 @@ go7007-y := go7007-v4l2.o go7007-driver.o go7007-i2c.o go7007-fw.o \ | ||
128 | |||
129 | s2250-y := s2250-board.o | ||
130 | |||
131 | -# Uncomment when the saa7134 patches get into upstream | ||
132 | -#obj-$(CONFIG_VIDEO_SAA7134) += saa7134-go7007.o | ||
133 | -#ccflags-$(CONFIG_VIDEO_SAA7134:m=y) += -Idrivers/media/pci/saa7134 | ||
134 | +obj-$(CONFIG_VIDEO_SAA7134) += saa7134-go7007.o | ||
135 | +ccflags-$(CONFIG_VIDEO_SAA7134:m=y) += -Idrivers/media/pci/saa7134 | ||
136 | |||
137 | ccflags-$(CONFIG_VIDEO_GO7007_LOADER:m=y) += -Idrivers/media/common | ||