mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 23:33:01 -04:00
media: av7110: coding style fixes: whitespace
This patch fixes the following checkpatch warnings:
ERROR:SPACING: need consistent spacing around '&' (ctx:WxO)
ERROR:SPACING: need consistent spacing around '&' (ctx:WxV)
ERROR:SPACING: need consistent spacing around '-' (ctx:WxV)
ERROR:SPACING: space prohibited after that '~' (ctx:OxW)
ERROR:SPACING: space prohibited after that open parenthesis '('
ERROR:SPACING: space prohibited before that close parenthesis ')'
ERROR:SPACING: space prohibited before that ':' (ctx:WxE)
ERROR:SPACING: space prohibited before that ',' (ctx:WxW)
ERROR:SPACING: space required after that ',' (ctx:VxV)
ERROR:SPACING: space required before that '-' (ctx:OxV)
ERROR:SPACING: space required before that '~' (ctx:OxV)
ERROR:SPACING: space required before the open brace '{'
ERROR:SPACING: space required before the open parenthesis '('
ERROR:SPACING: spaces required around that '&&' (ctx:ExV)
ERROR:SPACING: spaces required around that '!=' (ctx:VxO)
ERROR:SPACING: spaces required around that '&=' (ctx:VxO)
ERROR:SPACING: spaces required around that '==' (ctx:VxO)
ERROR:SPACING: spaces required around that '!=' (ctx:VxV)
ERROR:SPACING: spaces required around that '+=' (ctx:VxV)
ERROR:SPACING: spaces required around that '-=' (ctx:VxV)
ERROR:SPACING: spaces required around that '<' (ctx:VxV)
ERROR:SPACING: spaces required around that '<=' (ctx:VxV)
ERROR:SPACING: spaces required around that '=' (ctx:VxV)
ERROR:SPACING: spaces required around that '>' (ctx:VxV)
ERROR:SPACING: spaces required around that '>=' (ctx:VxV)
ERROR:SPACING: spaces required around that '|=' (ctx:VxV)
WARNING:LEADING_SPACE: please, no spaces at the start of a line
WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline
WARNING:SPACING: space prohibited before semicolon
WARNING:SPACING: space prohibited between function name and open parenthesis '('
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 23)
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 32)
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (32, 39)
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (39, 47)
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (47, 55)
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 18)
WARNING:TABSTOP: Statements should start on a tabstop
CHECK:SPACING: No space is necessary after a cast
CHECK:SPACING: space preferred before that '|' (ctx:VxE)
CHECK:SPACING: spaces preferred around that '&' (ctx:VxV)
CHECK:SPACING: spaces preferred around that '*' (ctx:VxV)
CHECK:SPACING: spaces preferred around that '+' (ctx:VxV)
CHECK:SPACING: spaces preferred around that '-' (ctx:VxV)
CHECK:SPACING: spaces preferred around that '/' (ctx:VxV)
CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV)
CHECK:SPACING: spaces preferred around that '|' (ctx:VxV)
Whitespace changes only.
"git diff -w" shows no changes.
Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
committed by
Hans Verkuil
parent
a070650315
commit
83ab913649
@@ -72,11 +72,11 @@ static int full_ts;
|
||||
module_param_named(debug, av7110_debug, int, 0644);
|
||||
MODULE_PARM_DESC(debug, "debug level (bitmask, default 0)");
|
||||
module_param(vidmode, int, 0444);
|
||||
MODULE_PARM_DESC(vidmode,"analog video out: 0 off, 1 CVBS+RGB (default), 2 CVBS+YC, 3 YC");
|
||||
MODULE_PARM_DESC(vidmode, "analog video out: 0 off, 1 CVBS+RGB (default), 2 CVBS+YC, 3 YC");
|
||||
module_param(pids_off, int, 0444);
|
||||
MODULE_PARM_DESC(pids_off,"clear video/audio/PCR PID filters when demux is closed");
|
||||
MODULE_PARM_DESC(pids_off, "clear video/audio/PCR PID filters when demux is closed");
|
||||
module_param(adac, int, 0444);
|
||||
MODULE_PARM_DESC(adac,"audio DAC type: 0 TI, 1 CRYSTAL, 2 MSP (use if autodetection fails)");
|
||||
MODULE_PARM_DESC(adac, "audio DAC type: 0 TI, 1 CRYSTAL, 2 MSP (use if autodetection fails)");
|
||||
module_param(hw_sections, int, 0444);
|
||||
MODULE_PARM_DESC(hw_sections, "0 use software section filter, 1 use hardware");
|
||||
module_param(rgb_on, int, 0444);
|
||||
@@ -951,14 +951,14 @@ static int av7110_start_feed(struct dvb_demux_feed *feed)
|
||||
switch (demux->dmx.frontend->source) {
|
||||
case DMX_MEMORY_FE:
|
||||
if (feed->ts_type & TS_DECODER)
|
||||
if (feed->pes_type < 2 &&
|
||||
!(demux->pids[0] & 0x8000) &&
|
||||
!(demux->pids[1] & 0x8000)) {
|
||||
dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout);
|
||||
dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout);
|
||||
ret = av7110_av_start_play(av7110,RP_AV);
|
||||
if (!ret)
|
||||
demux->playing = 1;
|
||||
if (feed->pes_type < 2 &&
|
||||
!(demux->pids[0] & 0x8000) &&
|
||||
!(demux->pids[1] & 0x8000)) {
|
||||
dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout);
|
||||
dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout);
|
||||
ret = av7110_av_start_play(av7110, RP_AV);
|
||||
if (!ret)
|
||||
demux->playing = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -1029,7 +1029,7 @@ static int av7110_stop_feed(struct dvb_demux_feed *feed)
|
||||
}
|
||||
|
||||
if (feed->type == DMX_TYPE_SEC) {
|
||||
for (i = 0; i<demux->filternum; i++) {
|
||||
for (i = 0; i < demux->filternum; i++) {
|
||||
if (demux->filter[i].state == DMX_STATE_GO &&
|
||||
demux->filter[i].filter.parent == &feed->feed.sec) {
|
||||
demux->filter[i].state = DMX_STATE_READY;
|
||||
@@ -1466,7 +1466,7 @@ static int check_firmware(struct av7110 *av7110)
|
||||
printk("dvb-ttpci: root file has strange size (%d). aborting.\n", len);
|
||||
return -EINVAL;
|
||||
}
|
||||
if( crc != crc32_le(0, ptr, len)) {
|
||||
if (crc != crc32_le(0, ptr, len)) {
|
||||
printk("dvb-ttpci: crc32 of root file does not match.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1553,7 +1553,7 @@ static int alps_bsrv2_tuner_set_params(struct dvb_frontend *fe)
|
||||
|
||||
if (fe->ops.i2c_gate_ctrl)
|
||||
fe->ops.i2c_gate_ctrl(fe, 1);
|
||||
if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1)
|
||||
if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1)
|
||||
return -EIO;
|
||||
return 0;
|
||||
}
|
||||
@@ -1819,7 +1819,7 @@ static int nexusca_stv0297_tuner_set_params(struct dvb_frontend *fe)
|
||||
}
|
||||
|
||||
// wait for PLL lock
|
||||
for(i = 0; i < 20; i++) {
|
||||
for (i = 0; i < 20; i++) {
|
||||
if (fe->ops.i2c_gate_ctrl)
|
||||
fe->ops.i2c_gate_ctrl(fe, 1);
|
||||
if (i2c_transfer(&av7110->i2c_adap, &readmsg, 1) == 1)
|
||||
@@ -2060,8 +2060,8 @@ static u8 read_pwm(struct av7110 *av7110)
|
||||
{
|
||||
u8 b = 0xff;
|
||||
u8 pwm;
|
||||
struct i2c_msg msg[] = { { .addr = 0x50,.flags = 0,.buf = &b,.len = 1 },
|
||||
{ .addr = 0x50,.flags = I2C_M_RD,.buf = &pwm,.len = 1} };
|
||||
struct i2c_msg msg[] = { { .addr = 0x50, .flags = 0, .buf = &b, .len = 1 },
|
||||
{ .addr = 0x50, .flags = I2C_M_RD, .buf = &pwm, .len = 1} };
|
||||
|
||||
if ((i2c_transfer(&av7110->i2c_adap, msg, 2) != 2) || (pwm == 0xff))
|
||||
pwm = 0x48;
|
||||
@@ -2074,7 +2074,7 @@ static int frontend_init(struct av7110 *av7110)
|
||||
int ret;
|
||||
|
||||
if (av7110->dev->pci->subsystem_vendor == 0x110a) {
|
||||
switch(av7110->dev->pci->subsystem_device) {
|
||||
switch (av7110->dev->pci->subsystem_device) {
|
||||
case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??))
|
||||
av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config,
|
||||
&av7110->i2c_adap, read_pwm(av7110));
|
||||
@@ -2085,7 +2085,7 @@ static int frontend_init(struct av7110 *av7110)
|
||||
}
|
||||
|
||||
} else if (av7110->dev->pci->subsystem_vendor == 0x13c2) {
|
||||
switch(av7110->dev->pci->subsystem_device) {
|
||||
switch (av7110->dev->pci->subsystem_device) {
|
||||
case 0x0000: // Hauppauge/TT WinTV DVB-S rev1.X
|
||||
case 0x0003: // Hauppauge/TT WinTV Nexus-S Rev 2.X
|
||||
case 0x1002: // Hauppauge/TT WinTV DVB-S rev1.3SE
|
||||
@@ -2126,7 +2126,7 @@ static int frontend_init(struct av7110 *av7110)
|
||||
}
|
||||
|
||||
/* Try DVB-C cards */
|
||||
switch(av7110->dev->pci->subsystem_device) {
|
||||
switch (av7110->dev->pci->subsystem_device) {
|
||||
case 0x0000:
|
||||
/* Siemens DVB-C (full-length card) VES1820/Philips CD1516 */
|
||||
av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config, &av7110->i2c_adap,
|
||||
@@ -2398,14 +2398,14 @@ static int av7110_attach(struct saa7146_dev *dev,
|
||||
* use 0x03 to track RPS1 interrupts - increase by 1 every gpio3 is toggled
|
||||
* use 0x15 to track VPE interrupts - increase by 1 every vpeirq() is called
|
||||
*/
|
||||
saa7146_write(dev, EC1SSR, (0x03<<2) | 3 );
|
||||
saa7146_write(dev, EC1SSR, (0x03 << 2) | 3);
|
||||
/* set event counter 1 threshold to maximum allowed value (rEC p55) */
|
||||
saa7146_write(dev, ECT1R, 0x3fff );
|
||||
saa7146_write(dev, ECT1R, 0x3fff);
|
||||
#endif
|
||||
/* Set RPS1 Address register to point to RPS code (r108 p42) */
|
||||
saa7146_write(dev, RPS_ADDR1, dev->d_rps1.dma_handle);
|
||||
/* Enable RPS1, (rFC p33) */
|
||||
saa7146_write(dev, MC1, (MASK_13 | MASK_29 ));
|
||||
saa7146_write(dev, MC1, (MASK_13 | MASK_29));
|
||||
|
||||
mdelay(10);
|
||||
/* now send VSYNC_B to rps1 by rising GPIO3 */
|
||||
@@ -2419,7 +2419,7 @@ static int av7110_attach(struct saa7146_dev *dev,
|
||||
printk("dvb-ttpci: BUDGET-PATCH DETECTED.\n");
|
||||
}
|
||||
/* Disable RPS1 */
|
||||
saa7146_write(dev, MC1, ( MASK_29 ));
|
||||
saa7146_write(dev, MC1, (MASK_29));
|
||||
#if RPS_IRQ
|
||||
printk("dvb-ttpci: Event Counter 1 0x%04x\n", saa7146_read(dev, EC1R) & 0x3fff );
|
||||
#endif
|
||||
@@ -2533,9 +2533,9 @@ static int av7110_attach(struct saa7146_dev *dev,
|
||||
* use 0x03 to track RPS1 interrupts - increase by 1 every gpio3 is toggled
|
||||
* use 0x15 to track VPE interrupts - increase by 1 every vpeirq() is called
|
||||
*/
|
||||
saa7146_write(dev, EC1SSR, (0x03<<2) | 3 );
|
||||
saa7146_write(dev, EC1SSR, (0x03 << 2) | 3);
|
||||
/* set event counter 1 threshold to maximum allowed value (rEC p55) */
|
||||
saa7146_write(dev, ECT1R, 0x3fff );
|
||||
saa7146_write(dev, ECT1R, 0x3fff);
|
||||
#endif
|
||||
/* Setup BUDGETPATCH MAIN RPS1 "program" (p35) */
|
||||
count = 0;
|
||||
@@ -2576,7 +2576,7 @@ static int av7110_attach(struct saa7146_dev *dev,
|
||||
* then RPS_THRESH1 should be set to trigger
|
||||
* every TS_HEIGHT (512) lines.
|
||||
*/
|
||||
saa7146_write(dev, RPS_THRESH1, (TS_HEIGHT*1) | MASK_12 );
|
||||
saa7146_write(dev, RPS_THRESH1, (TS_HEIGHT * 1) | MASK_12);
|
||||
|
||||
/* Enable RPS1 (rFC p33) */
|
||||
saa7146_write(dev, MC1, (MASK_13 | MASK_29));
|
||||
@@ -2650,7 +2650,7 @@ static int av7110_attach(struct saa7146_dev *dev,
|
||||
if (ret < 0)
|
||||
goto err_stop_arm_9;
|
||||
|
||||
if (FW_VERSION(av7110->arm_app)<0x2501)
|
||||
if (FW_VERSION(av7110->arm_app) < 0x2501)
|
||||
printk(KERN_WARNING
|
||||
"dvb-ttpci: Warning, firmware version 0x%04x is too old. System might be unstable!\n",
|
||||
FW_VERSION(av7110->arm_app));
|
||||
@@ -2769,7 +2769,7 @@ static int av7110_detach(struct saa7146_dev *saa)
|
||||
|
||||
i2c_del_adapter(&av7110->i2c_adap);
|
||||
|
||||
dvb_unregister_adapter (&av7110->dvb_adapter);
|
||||
dvb_unregister_adapter(&av7110->dvb_adapter);
|
||||
|
||||
av7110_num--;
|
||||
|
||||
@@ -2825,12 +2825,12 @@ static void av7110_irq(struct saa7146_dev *dev, u32 *isr)
|
||||
|
||||
static struct saa7146_extension av7110_extension_driver;
|
||||
|
||||
#define MAKE_AV7110_INFO(x_var,x_name) \
|
||||
#define MAKE_AV7110_INFO(x_var, x_name) \
|
||||
static struct saa7146_pci_extension_data x_var = { \
|
||||
.ext_priv = x_name, \
|
||||
.ext = &av7110_extension_driver }
|
||||
|
||||
MAKE_AV7110_INFO(tts_1_X_fsc,"Technotrend/Hauppauge WinTV DVB-S rev1.X or Fujitsu Siemens DVB-C");
|
||||
MAKE_AV7110_INFO(tts_1_X_fsc, "Technotrend/Hauppauge WinTV DVB-S rev1.X or Fujitsu Siemens DVB-C");
|
||||
MAKE_AV7110_INFO(ttt_1_X, "Technotrend/Hauppauge WinTV DVB-T rev1.X");
|
||||
MAKE_AV7110_INFO(ttc_1_X, "Technotrend/Hauppauge WinTV Nexus-CA rev1.X");
|
||||
MAKE_AV7110_INFO(ttc_2_X, "Technotrend/Hauppauge WinTV DVB-C rev2.X");
|
||||
|
||||
@@ -238,8 +238,8 @@ int av7110_pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen)
|
||||
sync |= DVB_RINGBUFFER_PEEK(buf, 2) << 8;
|
||||
sync |= DVB_RINGBUFFER_PEEK(buf, 3);
|
||||
|
||||
if (((sync &~ 0x0f) == 0x000001e0) ||
|
||||
((sync &~ 0x1f) == 0x000001c0) ||
|
||||
if (((sync & ~0x0f) == 0x000001e0) ||
|
||||
((sync & ~0x1f) == 0x000001c0) ||
|
||||
(sync == 0x000001bd))
|
||||
break;
|
||||
printk("resync\n");
|
||||
@@ -296,7 +296,7 @@ int av7110_set_volume(struct av7110 *av7110, unsigned int volleft,
|
||||
vol = (volleft > volright) ? volleft : volright;
|
||||
val = (vol * 0x73 / 255) << 8;
|
||||
if (vol > 0)
|
||||
balance = ((volright - volleft) * 127) / vol;
|
||||
balance = ((volright - volleft) * 127) / vol;
|
||||
msp_writereg(av7110, MSP_WR_DSP, 0x0001, balance << 8);
|
||||
msp_writereg(av7110, MSP_WR_DSP, 0x0000, val); /* loudspeaker */
|
||||
msp_writereg(av7110, MSP_WR_DSP, 0x0006, val); /* headphonesr */
|
||||
@@ -362,8 +362,8 @@ static int get_video_format(struct av7110 *av7110, u8 *buf, int count)
|
||||
if (p[0] || p[1] || p[2] != 0x01 || p[3] != 0xb3)
|
||||
continue;
|
||||
p += 4;
|
||||
hsize = ((p[1] &0xF0) >> 4) | (p[0] << 4);
|
||||
vsize = ((p[1] &0x0F) << 8) | (p[2]);
|
||||
hsize = ((p[1] & 0xF0) >> 4) | (p[0] << 4);
|
||||
vsize = ((p[1] & 0x0F) << 8) | (p[2]);
|
||||
sw = (p[3] & 0x0F);
|
||||
ret = av7110_set_vidmode(av7110, sw2mode[sw]);
|
||||
if (!ret) {
|
||||
@@ -590,7 +590,7 @@ static int find_pes_header(u8 const *buf, long int length, int *frags)
|
||||
while (c < length - 3 && !found) {
|
||||
if (buf[c] == 0x00 && buf[c + 1] == 0x00 &&
|
||||
buf[c + 2] == 0x01) {
|
||||
switch ( buf[c + 3] ) {
|
||||
switch (buf[c + 3]) {
|
||||
case PROG_STREAM_MAP:
|
||||
case PRIVATE_STREAM2:
|
||||
case PROG_STREAM_DIR:
|
||||
@@ -635,9 +635,9 @@ void av7110_p2t_write(u8 const *buf, long int length, u16 pid, struct av7110_p2t
|
||||
|
||||
c = 0;
|
||||
c2 = 0;
|
||||
if (p->frags){
|
||||
if (p->frags) {
|
||||
check = 0;
|
||||
switch(p->frags) {
|
||||
switch (p->frags) {
|
||||
case 1:
|
||||
if (buf[c] == 0x00 && buf[c + 1] == 0x01) {
|
||||
check = 1;
|
||||
@@ -703,7 +703,7 @@ void av7110_p2t_write(u8 const *buf, long int length, u16 pid, struct av7110_p2t
|
||||
c2 = find_pes_header(buf + c + add, length - c - add, &p->frags);
|
||||
if (c2 >= 0) {
|
||||
c2 += c + add;
|
||||
if (c2 > c){
|
||||
if (c2 > c) {
|
||||
p_to_t(buf + c, c2 - c, pid, &p->counter, p->feed);
|
||||
c = c2;
|
||||
clear_p2t(p);
|
||||
@@ -787,7 +787,7 @@ static void p_to_t(u8 const *buf, long int length, u16 pid, u8 *counter,
|
||||
|
||||
while (c < length) {
|
||||
memset(obuf, 0, TS_SIZE);
|
||||
if (length - c >= (TS_SIZE - 4)){
|
||||
if (length - c >= (TS_SIZE - 4)) {
|
||||
l = write_ts_header2(pid, counter, pes_start,
|
||||
obuf, (TS_SIZE - 4));
|
||||
memcpy(obuf + l, buf + c, TS_SIZE - l);
|
||||
@@ -880,7 +880,7 @@ void dvb_video_add_event(struct av7110 *av7110, struct video_event *event)
|
||||
wake_up_interruptible(&events->wait_queue);
|
||||
}
|
||||
|
||||
static int dvb_video_get_event (struct av7110 *av7110, struct video_event *event, int flags)
|
||||
static int dvb_video_get_event(struct av7110 *av7110, struct video_event *event, int flags)
|
||||
{
|
||||
struct dvb_video_events *events = &av7110->video_events;
|
||||
|
||||
@@ -1124,8 +1124,8 @@ static int dvb_video_ioctl(struct file *file,
|
||||
dprintk(1, "av7110:%p, cmd=%04x\n", av7110,cmd);
|
||||
|
||||
if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
|
||||
if ( cmd != VIDEO_GET_STATUS && cmd != VIDEO_GET_EVENT &&
|
||||
cmd != VIDEO_GET_SIZE ) {
|
||||
if (cmd != VIDEO_GET_STATUS && cmd != VIDEO_GET_EVENT &&
|
||||
cmd != VIDEO_GET_SIZE) {
|
||||
return -EPERM;
|
||||
}
|
||||
}
|
||||
@@ -1419,7 +1419,7 @@ static int dvb_audio_ioctl(struct file *file,
|
||||
|
||||
case AUDIO_CHANNEL_SELECT:
|
||||
av7110->audiostate.channel_select = (audio_channel_select_t) arg;
|
||||
switch(av7110->audiostate.channel_select) {
|
||||
switch (av7110->audiostate.channel_select) {
|
||||
case AUDIO_STEREO:
|
||||
ret = audcom(av7110, AUDIO_CMD_STEREO);
|
||||
if (!ret) {
|
||||
@@ -1624,7 +1624,7 @@ int av7110_av_register(struct av7110 *av7110)
|
||||
spin_lock_init(&av7110->video_events.lock);
|
||||
av7110->video_events.eventw = av7110->video_events.eventr = 0;
|
||||
av7110->video_events.overflow = 0;
|
||||
memset(&av7110->video_size, 0, sizeof (video_size_t));
|
||||
memset(&av7110->video_size, 0, sizeof(video_size_t));
|
||||
|
||||
dvb_register_device(&av7110->dvb_adapter, &av7110->video_dev,
|
||||
&dvbdev_video, av7110, DVB_DEVICE_VIDEO, 0);
|
||||
|
||||
@@ -206,7 +206,7 @@ static int dvb_ca_open(struct inode *inode, struct file *file)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static __poll_t dvb_ca_poll (struct file *file, poll_table *wait)
|
||||
static __poll_t dvb_ca_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct dvb_device *dvbdev = file->private_data;
|
||||
struct av7110 *av7110 = dvbdev->priv;
|
||||
@@ -260,7 +260,7 @@ static int dvb_ca_ioctl(struct file *file, unsigned int cmd, void *parg)
|
||||
|
||||
case CA_GET_SLOT_INFO:
|
||||
{
|
||||
struct ca_slot_info *info=(struct ca_slot_info *)parg;
|
||||
struct ca_slot_info *info = (struct ca_slot_info *)parg;
|
||||
|
||||
if (info->num < 0 || info->num > 1) {
|
||||
mutex_unlock(&av7110->ioctl_mutex);
|
||||
@@ -285,7 +285,7 @@ static int dvb_ca_ioctl(struct file *file, unsigned int cmd, void *parg)
|
||||
|
||||
info.num = 16;
|
||||
info.type = CA_ECD;
|
||||
memcpy(parg, &info, sizeof (info));
|
||||
memcpy(parg, &info, sizeof(info));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@ static int av7110_send_fw_cmd(struct av7110 *av7110, u16 *buf, int length)
|
||||
|
||||
ret = __av7110_send_fw_cmd(av7110, buf, length);
|
||||
mutex_unlock(&av7110->dcomlock);
|
||||
if (ret && ret!=-ERESTARTSYS)
|
||||
if (ret && ret != -ERESTARTSYS)
|
||||
printk(KERN_ERR "dvb-ttpci: %s(): av7110_send_fw_cmd error %d\n",
|
||||
__func__, ret);
|
||||
return ret;
|
||||
@@ -511,9 +511,9 @@ int av7110_send_ci_cmd(struct av7110 *av7110, u8 subcom, u8 *buf, u8 len)
|
||||
|
||||
dprintk(4, "%p\n", av7110);
|
||||
|
||||
for(i = 0; i < len && i < 32; i++)
|
||||
for (i = 0; i < len && i < 32; i++)
|
||||
{
|
||||
if(i % 2 == 0)
|
||||
if (i % 2 == 0)
|
||||
cmd[(i / 2) + 2] = (u16)(buf[i]) << 8;
|
||||
else
|
||||
cmd[(i / 2) + 2] |= buf[i];
|
||||
@@ -675,7 +675,7 @@ int av7110_diseqc_send(struct av7110 *av7110, int len, u8 *msg, unsigned long bu
|
||||
buf[i + 4] = msg[i];
|
||||
|
||||
ret = av7110_send_fw_cmd(av7110, buf, 18);
|
||||
if (ret && ret!=-ERESTARTSYS)
|
||||
if (ret && ret != -ERESTARTSYS)
|
||||
printk(KERN_ERR "dvb-ttpci: av7110_diseqc_send error %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
@@ -777,7 +777,7 @@ static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, char *buf)
|
||||
wdebi(av7110, DEBINOSWAP, BUFF1_BASE + i * 2, 0, 2);
|
||||
ret = __av7110_send_fw_cmd(av7110, cbuf, 5);
|
||||
mutex_unlock(&av7110->dcomlock);
|
||||
if (ret && ret!=-ERESTARTSYS)
|
||||
if (ret && ret != -ERESTARTSYS)
|
||||
printk(KERN_ERR "dvb-ttpci: WriteText error %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
@@ -861,13 +861,13 @@ static inline int LoadBitmap(struct av7110 *av7110,
|
||||
|
||||
av7110->bmp_state = BMP_LOADING;
|
||||
if (format == OSD_BITMAP8) {
|
||||
bpp=8; delta = 1;
|
||||
bpp = 8; delta = 1;
|
||||
} else if (format == OSD_BITMAP4) {
|
||||
bpp=4; delta = 2;
|
||||
bpp = 4; delta = 2;
|
||||
} else if (format == OSD_BITMAP2) {
|
||||
bpp=2; delta = 4;
|
||||
bpp = 2; delta = 4;
|
||||
} else if (format == OSD_BITMAP1) {
|
||||
bpp=1; delta = 8;
|
||||
bpp = 1; delta = 8;
|
||||
} else {
|
||||
av7110->bmp_state = BMP_NONE;
|
||||
return -EINVAL;
|
||||
@@ -927,8 +927,8 @@ static u32 RGB2YUV(u16 R, u16 G, u16 B)
|
||||
u16 Y, Cr, Cb;
|
||||
|
||||
y = R * 77 + G * 150 + B * 29; /* Luma=0.299R+0.587G+0.114B 0..65535 */
|
||||
u = 2048 + B * 8 -(y >> 5); /* Cr 0..4095 */
|
||||
v = 2048 + R * 8 -(y >> 5); /* Cb 0..4095 */
|
||||
u = 2048 + B * 8 - (y >> 5); /* Cr 0..4095 */
|
||||
v = 2048 + R * 8 - (y >> 5); /* Cb 0..4095 */
|
||||
|
||||
Y = y / 256;
|
||||
Cb = u / 16;
|
||||
@@ -944,7 +944,7 @@ static int OSDSetColor(struct av7110 *av7110, u8 color, u8 r, u8 g, u8 b, u8 ble
|
||||
u16 ch, cl;
|
||||
u32 yuv;
|
||||
|
||||
yuv = blend ? RGB2YUV(r,g,b) : 0;
|
||||
yuv = blend ? RGB2YUV(r, g, b) : 0;
|
||||
cl = (yuv & 0xffff);
|
||||
ch = ((yuv >> 16) & 0xffff);
|
||||
ret = SetColor_(av7110, av7110->osdwin, bpp2pal[av7110->osdbpp[av7110->osdwin]],
|
||||
@@ -985,7 +985,7 @@ static int OSDSetBlock(struct av7110 *av7110, int x0, int y0,
|
||||
{
|
||||
uint w, h, bpp, bpl, size, lpb, bnum, brest;
|
||||
int i;
|
||||
int rc,release_rc;
|
||||
int rc, release_rc;
|
||||
|
||||
w = x1 - x0 + 1;
|
||||
h = y1 - y0 + 1;
|
||||
@@ -1084,14 +1084,14 @@ int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc)
|
||||
u8 r, g = 0, b = 0, blend = 0;
|
||||
|
||||
ret = 0;
|
||||
for (i = 0; i<len; i++) {
|
||||
for (i = 0; i < len; i++) {
|
||||
if (get_user(r, colors + i * 4) ||
|
||||
get_user(g, colors + i * 4 + 1) ||
|
||||
get_user(b, colors + i * 4 + 2) ||
|
||||
get_user(blend, colors + i * 4 + 3)) {
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
ret = OSDSetColor(av7110, dc->color + i, r, g, b, blend);
|
||||
if (ret)
|
||||
break;
|
||||
@@ -1177,7 +1177,7 @@ int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc)
|
||||
}
|
||||
|
||||
mutex_unlock(&av7110->osd_mutex);
|
||||
if (ret==-ERESTARTSYS)
|
||||
if (ret == -ERESTARTSYS)
|
||||
dprintk(1, "av7110_osd_cmd(%d) returns with -ERESTARTSYS\n",dc->cmd);
|
||||
else if (ret)
|
||||
dprintk(1, "av7110_osd_cmd(%d) returns with %d\n",dc->cmd,ret);
|
||||
|
||||
@@ -394,8 +394,8 @@ static inline u32 irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, u
|
||||
{
|
||||
u32 res;
|
||||
|
||||
res=av7110_debiread(av7110, config, addr, count);
|
||||
if (count<=4)
|
||||
res = av7110_debiread(av7110, config, addr, count);
|
||||
if (count <= 4)
|
||||
memcpy(av7110->debi_virt, (char *) &res, count);
|
||||
return res;
|
||||
}
|
||||
@@ -416,7 +416,7 @@ static inline u32 rdebi(struct av7110 *av7110, u32 config, int addr, u32 val, un
|
||||
u32 res;
|
||||
|
||||
spin_lock_irqsave(&av7110->debilock, flags);
|
||||
res=av7110_debiread(av7110, config, addr, count);
|
||||
res = av7110_debiread(av7110, config, addr, count);
|
||||
spin_unlock_irqrestore(&av7110->debilock, flags);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ static void write_ipack(struct ipack *p, const u8 *data, int count)
|
||||
p->count = 6;
|
||||
}
|
||||
|
||||
if (p->count + count < p->size){
|
||||
if (p->count + count < p->size) {
|
||||
memcpy(p->buf+p->count, data, count);
|
||||
p->count += count;
|
||||
} else {
|
||||
@@ -137,7 +137,7 @@ static void write_ipack(struct ipack *p, const u8 *data, int count)
|
||||
}
|
||||
}
|
||||
|
||||
int av7110_ipack_instant_repack (const u8 *buf, int count, struct ipack *p)
|
||||
int av7110_ipack_instant_repack(const u8 *buf, int count, struct ipack *p)
|
||||
{
|
||||
int l;
|
||||
int c = 0;
|
||||
@@ -170,10 +170,10 @@ int av7110_ipack_instant_repack (const u8 *buf, int count, struct ipack *p)
|
||||
case PROG_STREAM_MAP:
|
||||
case PRIVATE_STREAM2:
|
||||
case PROG_STREAM_DIR:
|
||||
case ECM_STREAM :
|
||||
case EMM_STREAM :
|
||||
case PADDING_STREAM :
|
||||
case DSM_CC_STREAM :
|
||||
case ECM_STREAM:
|
||||
case EMM_STREAM:
|
||||
case PADDING_STREAM:
|
||||
case DSM_CC_STREAM:
|
||||
case ISO13522_STREAM:
|
||||
p->done = 1;
|
||||
fallthrough;
|
||||
@@ -334,7 +334,7 @@ int av7110_ipack_instant_repack (const u8 *buf, int count, struct ipack *p)
|
||||
|
||||
if (c == count)
|
||||
return count;
|
||||
if (p->which > 2){
|
||||
if (p->which > 2) {
|
||||
if ((p->flag2 & PTS_DTS_FLAGS) == PTS_ONLY) {
|
||||
while (c < count && p->which < 7) {
|
||||
p->pts[p->which - 2] = buf[c];
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
int msp_writereg(struct av7110 *av7110, u8 dev, u16 reg, u16 val)
|
||||
{
|
||||
u8 msg[5] = { dev, reg >> 8, reg & 0xff, val >> 8 , val & 0xff };
|
||||
u8 msg[5] = { dev, reg >> 8, reg & 0xff, val >> 8, val & 0xff };
|
||||
struct i2c_msg msgs = { .flags = 0, .len = 5, .buf = msg };
|
||||
|
||||
switch (av7110->adac_type) {
|
||||
@@ -53,7 +53,7 @@ static int msp_readreg(struct av7110 *av7110, u8 dev, u16 reg, u16 *val)
|
||||
u8 msg1[3] = { dev, reg >> 8, reg & 0xff };
|
||||
u8 msg2[2];
|
||||
struct i2c_msg msgs[2] = {
|
||||
{ .flags = 0 , .len = 3, .buf = msg1 },
|
||||
{ .flags = 0, .len = 3, .buf = msg1 },
|
||||
{ .flags = I2C_M_RD, .len = 2, .buf = msg2 }
|
||||
};
|
||||
|
||||
@@ -132,7 +132,7 @@ static int ves1820_writereg(struct saa7146_dev *dev, u8 addr, u8 reg, u8 data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tuner_write(struct saa7146_dev *dev, u8 addr, u8 data [4])
|
||||
static int tuner_write(struct saa7146_dev *dev, u8 addr, u8 data[4])
|
||||
{
|
||||
struct av7110 *av7110 = dev->ext_priv;
|
||||
struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = data, .len = 4 };
|
||||
@@ -724,7 +724,7 @@ int av7110_init_analog_module(struct av7110 *av7110)
|
||||
msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x7f00); // SCART 1 volume
|
||||
msp_writereg(av7110, MSP_WR_DSP, 0x000d, 0x1900); // prescale SCART
|
||||
|
||||
if (i2c_writereg(av7110, 0x48, 0x01, 0x00)!=1) {
|
||||
if (i2c_writereg(av7110, 0x48, 0x01, 0x00) != 1) {
|
||||
pr_info("saa7113 not accessible\n");
|
||||
} else {
|
||||
u8 *i = saa7113_init_regs;
|
||||
|
||||
@@ -26,10 +26,10 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int p
|
||||
u8 frame = 0;
|
||||
int fr = 0;
|
||||
|
||||
while ( !found && c < count){
|
||||
while (!found && c < count) {
|
||||
u8 *b = mbuf+c;
|
||||
|
||||
if ( b[0] == 0x0b && b[1] == 0x77 )
|
||||
if (b[0] == 0x0b && b[1] == 0x77)
|
||||
found = 1;
|
||||
else {
|
||||
c++;
|
||||
@@ -52,8 +52,8 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int p
|
||||
if (pr)
|
||||
printk(KERN_CONT " BRate: %d kb/s", (int) ai->bit_rate/1000);
|
||||
|
||||
ai->frequency = (headr[2] & 0xc0 ) >> 6;
|
||||
fr = (headr[2] & 0xc0 ) >> 6;
|
||||
ai->frequency = (headr[2] & 0xc0) >> 6;
|
||||
fr = (headr[2] & 0xc0) >> 6;
|
||||
ai->frequency = freq[fr]*100;
|
||||
if (pr)
|
||||
printk(KERN_CONT " Freq: %d Hz\n", (int) ai->frequency);
|
||||
@@ -70,46 +70,46 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int p
|
||||
void dvb_filter_pes2ts_init(struct dvb_filter_pes2ts *p2ts, unsigned short pid,
|
||||
dvb_filter_pes2ts_cb_t *cb, void *priv)
|
||||
{
|
||||
unsigned char *buf=p2ts->buf;
|
||||
unsigned char *buf = p2ts->buf;
|
||||
|
||||
buf[0]=0x47;
|
||||
buf[1]=(pid>>8);
|
||||
buf[2]=pid&0xff;
|
||||
p2ts->cc=0;
|
||||
p2ts->cb=cb;
|
||||
p2ts->priv=priv;
|
||||
buf[0] = 0x47;
|
||||
buf[1] = (pid >> 8);
|
||||
buf[2] = pid & 0xff;
|
||||
p2ts->cc = 0;
|
||||
p2ts->cb = cb;
|
||||
p2ts->priv = priv;
|
||||
}
|
||||
|
||||
int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes,
|
||||
int len, int payload_start)
|
||||
{
|
||||
unsigned char *buf=p2ts->buf;
|
||||
int ret=0, rest;
|
||||
unsigned char *buf = p2ts->buf;
|
||||
int ret = 0, rest;
|
||||
|
||||
//len=6+((pes[4]<<8)|pes[5]);
|
||||
|
||||
if (payload_start)
|
||||
buf[1]|=0x40;
|
||||
buf[1] |= 0x40;
|
||||
else
|
||||
buf[1]&=~0x40;
|
||||
while (len>=184) {
|
||||
buf[3]=0x10|((p2ts->cc++)&0x0f);
|
||||
buf[1] &= ~0x40;
|
||||
while (len >= 184) {
|
||||
buf[3] = 0x10 | ((p2ts->cc++) & 0x0f);
|
||||
memcpy(buf+4, pes, 184);
|
||||
if ((ret=p2ts->cb(p2ts->priv, buf)))
|
||||
return ret;
|
||||
len-=184; pes+=184;
|
||||
buf[1]&=~0x40;
|
||||
len -= 184; pes += 184;
|
||||
buf[1] &= ~0x40;
|
||||
}
|
||||
if (!len)
|
||||
return 0;
|
||||
buf[3]=0x30|((p2ts->cc++)&0x0f);
|
||||
rest=183-len;
|
||||
buf[3] = 0x30 | ((p2ts->cc++) & 0x0f);
|
||||
rest = 183 - len;
|
||||
if (rest) {
|
||||
buf[5]=0x00;
|
||||
buf[5] = 0x00;
|
||||
if (rest-1)
|
||||
memset(buf+6, 0xff, rest-1);
|
||||
}
|
||||
buf[4]=rest;
|
||||
buf[4] = rest;
|
||||
memcpy(buf+5+rest, pes, len);
|
||||
return p2ts->cb(p2ts->priv, buf);
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ struct dvb_audio_info {
|
||||
u32 bit_rate;
|
||||
u32 frequency;
|
||||
u32 mode;
|
||||
u32 mode_extension ;
|
||||
u32 mode_extension;
|
||||
u32 emphasis;
|
||||
u32 framesize;
|
||||
u32 off;
|
||||
|
||||
Reference in New Issue
Block a user