Skip to content

Commit 4b29631

Browse files
Igor M. LiplianinMauro Carvalho Chehab
authored andcommitted
V4L/DVB (9533): cx88: Add support for TurboSight TBS8910 DVB-S PCI card
The card based on stv0299 or stv0288 demodulators. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
1 parent 1f6340b commit 4b29631

7 files changed

Lines changed: 54 additions & 25 deletions

File tree

‎Documentation/video4linux/CARDLIST.cx88‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,5 @@
7474
73 -> TeVii S420 DVB-S [d420:9022]
7575
74 -> Prolink Pixelview Global Extreme [1554:4976]
7676
75 -> PROF 7300 DVB-S/S2 [B033:3033]
77+
76 -> SATTRADE ST4200 DVB-S/S2 [b200:4200]
78+
77 -> TBS 8910 DVB-S [8910:8888]

‎drivers/media/video/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o
2525
obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
2626
obj-$(CONFIG_VIDEO_TDA7432) += tda7432.o
2727
obj-$(CONFIG_VIDEO_TDA9875) += tda9875.o
28+
obj-$(CONFIG_SOUND_TVMIXER) += tvmixer.o
2829

2930
obj-$(CONFIG_VIDEO_SAA6588) += saa6588.o
3031
obj-$(CONFIG_VIDEO_SAA5246A) += saa5246a.o

‎drivers/media/video/cx88/cx88-cards.c‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,6 +1847,18 @@ static const struct cx88_board cx88_boards[] = {
18471847
} },
18481848
.mpeg = CX88_MPEG_DVB,
18491849
},
1850+
[CX88_BOARD_TBS_8910] = {
1851+
.name = "TBS 8910 DVB-S",
1852+
.tuner_type = UNSET,
1853+
.radio_type = UNSET,
1854+
.tuner_addr = ADDR_UNSET,
1855+
.radio_addr = ADDR_UNSET,
1856+
.input = {{
1857+
.type = CX88_VMUX_DVB,
1858+
.vmux = 0,
1859+
} },
1860+
.mpeg = CX88_MPEG_DVB,
1861+
},
18501862
[CX88_BOARD_TBS_8920] = {
18511863
.name = "TBS 8920 DVB-S/S2",
18521864
.tuner_type = TUNER_ABSENT,
@@ -1871,6 +1883,18 @@ static const struct cx88_board cx88_boards[] = {
18711883
} },
18721884
.mpeg = CX88_MPEG_DVB,
18731885
},
1886+
[CX88_BOARD_SATTRADE_ST4200] = {
1887+
.name = "SATTRADE ST4200 DVB-S/S2",
1888+
.tuner_type = UNSET,
1889+
.radio_type = UNSET,
1890+
.tuner_addr = ADDR_UNSET,
1891+
.radio_addr = ADDR_UNSET,
1892+
.input = {{
1893+
.type = CX88_VMUX_DVB,
1894+
.vmux = 0,
1895+
} },
1896+
.mpeg = CX88_MPEG_DVB,
1897+
},
18741898
};
18751899

18761900
/* ------------------------------------------------------------------ */
@@ -2260,6 +2284,10 @@ static const struct cx88_subid cx88_subids[] = {
22602284
.subvendor = 0xA044,
22612285
.subdevice = 0x2011,
22622286
.card = CX88_BOARD_OMICOM_SS4_PCI,
2287+
}, {
2288+
.subvendor = 0x8910,
2289+
.subdevice = 0x8888,
2290+
.card = CX88_BOARD_TBS_8910,
22632291
}, {
22642292
.subvendor = 0x8920,
22652293
.subdevice = 0x8888,
@@ -2268,6 +2296,10 @@ static const struct cx88_subid cx88_subids[] = {
22682296
.subvendor = 0xB033,
22692297
.subdevice = 0x3033,
22702298
.card = CX88_BOARD_PROF_7300,
2299+
}, {
2300+
.subvendor = 0xb200,
2301+
.subdevice = 0x4200,
2302+
.card = CX88_BOARD_SATTRADE_ST4200,
22712303
},
22722304
};
22732305

@@ -2878,8 +2910,10 @@ static void cx88_card_setup(struct cx88_core *core)
28782910
case CX88_BOARD_TEVII_S420:
28792911
case CX88_BOARD_TEVII_S460:
28802912
case CX88_BOARD_OMICOM_SS4_PCI:
2913+
case CX88_BOARD_TBS_8910:
28812914
case CX88_BOARD_TBS_8920:
28822915
case CX88_BOARD_PROF_7300:
2916+
case CX88_BOARD_SATTRADE_ST4200:
28832917
cx_write(MO_SRST_IO, 0);
28842918
msleep(100);
28852919
cx_write(MO_SRST_IO, 1);

‎drivers/media/video/cx88/cx88-dvb.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,7 @@ static int dvb_register(struct cx8802_dev *dev)
10421042
0x08, ISL6421_DCL, 0x00);
10431043
}
10441044
break;
1045+
case CX88_BOARD_TBS_8910:
10451046
case CX88_BOARD_TEVII_S420:
10461047
fe0->dvb.frontend = dvb_attach(stv0299_attach,
10471048
&tevii_tuner_sharp_config,
@@ -1078,6 +1079,7 @@ static int dvb_register(struct cx8802_dev *dev)
10781079
case CX88_BOARD_OMICOM_SS4_PCI:
10791080
case CX88_BOARD_TBS_8920:
10801081
case CX88_BOARD_PROF_7300:
1082+
case CX88_BOARD_SATTRADE_ST4200:
10811083
fe0->dvb.frontend = dvb_attach(cx24116_attach,
10821084
&hauppauge_hvr4000_config,
10831085
&core->i2c_adap);

‎drivers/media/video/cx88/cx88.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ extern struct sram_channel cx88_sram_channels[];
228228
#define CX88_BOARD_TEVII_S420 73
229229
#define CX88_BOARD_PROLINK_PV_GLOBAL_XTREME 74
230230
#define CX88_BOARD_PROF_7300 75
231+
#define CX88_BOARD_SATTRADE_ST4200 76
232+
#define CX88_BOARD_TBS_8910 77
231233

232234
enum cx88_itype {
233235
CX88_VMUX_COMPOSITE1 = 1,

‎firmware/Makefile‎

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -150,27 +150,15 @@ $(patsubst %,$(obj)/%.gen.o, $(fw-external-y)): $(obj)/%.gen.o: $(fwdir)/%
150150
$(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %)
151151
$(call cmd,ihex)
152152

153-
# Don't depend on ihex2fw if we're installing and it already exists.
154-
# Putting it after | in the dependencies doesn't seem sufficient when
155-
# we're installing after a cross-compile, because ihex2fw has dependencies
156-
# on stuff like /usr/lib/gcc/ppc64-redhat-linux/4.3.0/include/stddef.h and
157-
# thus wants to be rebuilt. Which it can't be, if the prebuilt kernel tree
158-
# is exported read-only for someone to run 'make install'.
159-
ifeq ($(INSTALL):$(wildcard $(obj)/ihex2fw),install:$(obj)/ihex2fw)
160-
ihex2fw_dep :=
161-
else
162-
ihex2fw_dep := $(obj)/ihex2fw
163-
endif
164-
165153
# .HEX is also Intel HEX, but where the offset and length in each record
166154
# is actually meaningful, because the firmware has to be loaded in a certain
167155
# order rather than as a single binary blob. Thus, we convert them into our
168156
# more compact binary representation of ihex records (<linux/ihex.h>)
169-
$(obj)/%.fw: $(obj)/%.HEX $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %)
157+
$(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
170158
$(call cmd,ihex2fw)
171159

172160
# .H16 is our own modified form of Intel HEX, with 16-bit length for records.
173-
$(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %)
161+
$(obj)/%.fw: $(obj)/%.H16 $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
174162
$(call cmd,h16tofw)
175163

176164
$(firmware-dirs):

‎sound/i2c/other/tea575x-tuner.c‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* along with this program; if not, write to the Free Software
1919
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2020
*
21-
*/
21+
*/
2222

2323
#include <asm/io.h>
2424
#include <linux/delay.h>
@@ -89,7 +89,7 @@ static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
8989
{
9090
struct snd_tea575x *tea = video_drvdata(file);
9191
void __user *arg = (void __user *)data;
92-
92+
9393
switch(cmd) {
9494
case VIDIOCGCAP:
9595
{
@@ -110,9 +110,9 @@ static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
110110
case VIDIOCGTUNER:
111111
{
112112
struct video_tuner v;
113-
if (copy_from_user(&v, arg,sizeof(v))!=0)
113+
if (copy_from_user(&v, arg,sizeof(v))!=0)
114114
return -EFAULT;
115-
if (v.tuner) /* Only 1 tuner */
115+
if (v.tuner) /* Only 1 tuner */
116116
return -EINVAL;
117117
v.rangelow = (87*16000);
118118
v.rangehigh = (108*16000);
@@ -144,24 +144,24 @@ static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
144144
snd_tea575x_set_freq(tea);
145145
return 0;
146146
case VIDIOCGAUDIO:
147-
{
147+
{
148148
struct video_audio v;
149149
memset(&v, 0, sizeof(v));
150150
strcpy(v.name, "Radio");
151151
if(copy_to_user(arg,&v, sizeof(v)))
152152
return -EFAULT;
153-
return 0;
153+
return 0;
154154
}
155155
case VIDIOCSAUDIO:
156156
{
157157
struct video_audio v;
158-
if(copy_from_user(&v, arg, sizeof(v)))
159-
return -EFAULT;
158+
if(copy_from_user(&v, arg, sizeof(v)))
159+
return -EFAULT;
160160
if (tea->ops->mute)
161161
tea->ops->mute(tea,
162162
(v.flags &
163163
VIDEO_AUDIO_MUTE) ? 1 : 0);
164-
if(v.audio)
164+
if(v.audio)
165165
return -EINVAL;
166166
return 0;
167167
}
@@ -240,11 +240,11 @@ static int __init alsa_tea575x_module_init(void)
240240
{
241241
return 0;
242242
}
243-
243+
244244
static void __exit alsa_tea575x_module_exit(void)
245245
{
246246
}
247-
247+
248248
module_init(alsa_tea575x_module_init)
249249
module_exit(alsa_tea575x_module_exit)
250250

0 commit comments

Comments
 (0)