Commit a709e779 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] c99 struct initialization for the saa7134 driver

From:  Gerd Knorr <kraxel@bytesex.org>
parent 461671fd
...@@ -39,253 +39,253 @@ static char name_svideo[] = "S-Video"; ...@@ -39,253 +39,253 @@ static char name_svideo[] = "S-Video";
struct saa7134_board saa7134_boards[] = { struct saa7134_board saa7134_boards[] = {
[SAA7134_BOARD_UNKNOWN] = { [SAA7134_BOARD_UNKNOWN] = {
name: "UNKNOWN/GENERIC", .name = "UNKNOWN/GENERIC",
audio_clock: 0x00187de7, .audio_clock = 0x00187de7,
tuner_type: TUNER_ABSENT, .tuner_type = TUNER_ABSENT,
inputs: {{ .inputs = {{
name: "default", .name = "default",
vmux: 0, .vmux = 0,
amux: LINE1, .amux = LINE1,
}}, }},
}, },
[SAA7134_BOARD_PROTEUS_PRO] = { [SAA7134_BOARD_PROTEUS_PRO] = {
/* /me */ /* /me */
name: "Proteus Pro [philips reference design]", .name = "Proteus Pro [philips reference design]",
audio_clock: 0x00187de7, .audio_clock = 0x00187de7,
tuner_type: TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
inputs: {{ .inputs = {{
name: name_comp1, .name = name_comp1,
vmux: 0, .vmux = 0,
amux: LINE1, .amux = LINE1,
},{ },{
name: name_tv, .name = name_tv,
vmux: 1, .vmux = 1,
amux: TV, .amux = TV,
tv: 1, .tv = 1,
}}, }},
}, },
[SAA7134_BOARD_FLYVIDEO3000] = { [SAA7134_BOARD_FLYVIDEO3000] = {
/* "Marco d'Itri" <md@Linux.IT> */ /* "Marco d'Itri" <md@Linux.IT> */
name: "LifeView FlyVIDEO3000", .name = "LifeView FlyVIDEO3000",
audio_clock: 0x00200000, .audio_clock = 0x00200000,
tuner_type: TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
inputs: {{ .inputs = {{
name: name_tv, .name = name_tv,
vmux: 1, .vmux = 1,
amux: TV, .amux = TV,
tv: 1, .tv = 1,
},{ },{
name: name_comp1, .name = name_comp1,
vmux: 0, .vmux = 0,
amux: LINE1, .amux = LINE1,
},{ },{
name: name_comp2, .name = name_comp2,
vmux: 3, .vmux = 3,
amux: LINE1, .amux = LINE1,
},{ },{
name: name_svideo, .name = name_svideo,
vmux: 8, .vmux = 8,
amux: LINE1, .amux = LINE1,
}}, }},
radio: { .radio = {
name: name_radio, .name = name_radio,
amux: LINE2, .amux = LINE2,
}, },
}, },
[SAA7134_BOARD_FLYVIDEO2000] = { [SAA7134_BOARD_FLYVIDEO2000] = {
/* "TC Wan" <tcwan@cs.usm.my> */ /* "TC Wan" <tcwan@cs.usm.my> */
name: "LifeView FlyVIDEO2000", .name = "LifeView FlyVIDEO2000",
audio_clock: 0x00200000, .audio_clock = 0x00200000,
tuner_type: TUNER_LG_PAL_NEW_TAPC, .tuner_type = TUNER_LG_PAL_NEW_TAPC,
gpiomask: 0x6000, .gpiomask = 0x6000,
inputs: {{ .inputs = {{
name: name_tv, .name = name_tv,
vmux: 1, .vmux = 1,
amux: LINE2, .amux = LINE2,
gpio: 0x0000, .gpio = 0x0000,
tv: 1, .tv = 1,
},{ },{
name: name_comp1, .name = name_comp1,
vmux: 0, .vmux = 0,
amux: LINE2, .amux = LINE2,
gpio: 0x4000, .gpio = 0x4000,
},{ },{
name: name_comp2, .name = name_comp2,
vmux: 3, .vmux = 3,
amux: LINE2, .amux = LINE2,
gpio: 0x4000, .gpio = 0x4000,
},{ },{
name: name_svideo, .name = name_svideo,
vmux: 8, .vmux = 8,
amux: LINE2, .amux = LINE2,
gpio: 0x4000, .gpio = 0x4000,
}}, }},
radio: { .radio = {
name: name_radio, .name = name_radio,
amux: LINE2, .amux = LINE2,
}, },
mute: { .mute = {
name: name_mute, .name = name_mute,
amux: LINE1, .amux = LINE1,
}, },
}, },
[SAA7134_BOARD_EMPRESS] = { [SAA7134_BOARD_EMPRESS] = {
/* "Gert Vervoort" <gert.vervoort@philips.com> */ /* "Gert Vervoort" <gert.vervoort@philips.com> */
name: "EMPRESS", .name = "EMPRESS",
audio_clock: 0x00187de7, .audio_clock = 0x00187de7,
tuner_type: TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
inputs: {{ .inputs = {{
name: name_comp1, .name = name_comp1,
vmux: 0, .vmux = 0,
amux: LINE1, .amux = LINE1,
},{ },{
name: name_svideo, .name = name_svideo,
vmux: 8, .vmux = 8,
amux: LINE1, .amux = LINE1,
},{ },{
name: name_tv, .name = name_tv,
vmux: 1, .vmux = 1,
amux: LINE2, .amux = LINE2,
tv: 1, .tv = 1,
}}, }},
radio: { .radio = {
name: name_radio, .name = name_radio,
amux: LINE2, .amux = LINE2,
}, },
i2s_rate: 48000, .i2s_rate = 48000,
has_ts: 1, .has_ts = 1,
video_out: CCIR656, .video_out = CCIR656,
}, },
[SAA7134_BOARD_MONSTERTV] = { [SAA7134_BOARD_MONSTERTV] = {
/* "K.Ohta" <alpha292@bremen.or.jp> */ /* "K.Ohta" <alpha292@bremen.or.jp> */
name: "SKNet Monster TV", .name = "SKNet Monster TV",
audio_clock: 0x00187de7, .audio_clock = 0x00187de7,
tuner_type: TUNER_PHILIPS_NTSC_M, .tuner_type = TUNER_PHILIPS_NTSC_M,
inputs: {{ .inputs = {{
name: name_tv, .name = name_tv,
vmux: 1, .vmux = 1,
amux: TV, .amux = TV,
tv: 1, .tv = 1,
},{ },{
name: name_comp1, .name = name_comp1,
vmux: 0, .vmux = 0,
amux: LINE1, .amux = LINE1,
},{ },{
name: name_svideo, .name = name_svideo,
vmux: 8, .vmux = 8,
amux: LINE1, .amux = LINE1,
}}, }},
radio: { .radio = {
name: name_radio, .name = name_radio,
amux: LINE2, .amux = LINE2,
}, },
}, },
[SAA7134_BOARD_MD9717] = { [SAA7134_BOARD_MD9717] = {
name: "Tevion MD 9717", .name = "Tevion MD 9717",
audio_clock: 0x00200000, .audio_clock = 0x00200000,
tuner_type: TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
inputs: {{ .inputs = {{
name: name_tv, .name = name_tv,
vmux: 1, .vmux = 1,
amux: TV, .amux = TV,
tv: 1, .tv = 1,
},{ },{
/* workaround for problems with normal TV sound */ /* workaround for problems with normal TV sound */
name: "TV (mono only)", .name = "TV (mono only)",
vmux: 1, .vmux = 1,
amux: LINE2, .amux = LINE2,
tv: 1, .tv = 1,
},{ },{
name: name_comp1, .name = name_comp1,
vmux: 2, .vmux = 2,
amux: LINE1, .amux = LINE1,
},{ },{
name: name_comp2, .name = name_comp2,
vmux: 3, .vmux = 3,
amux: LINE1, .amux = LINE1,
},{ },{
name: name_svideo, .name = name_svideo,
vmux: 8, .vmux = 8,
amux: LINE1, .amux = LINE1,
}}, }},
radio: { .radio = {
name: name_radio, .name = name_radio,
amux: LINE2, .amux = LINE2,
}, },
}, },
[SAA7134_BOARD_TVSTATION_RDS] = { [SAA7134_BOARD_TVSTATION_RDS] = {
name: "KNC One TV-Station RDS", .name = "KNC One TV-Station RDS",
audio_clock: 0x00200000, .audio_clock = 0x00200000,
tuner_type: TUNER_PHILIPS_FM1216ME_MK3, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
need_tda9887: 1, .need_tda9887 = 1,
inputs: {{ .inputs = {{
name: name_tv, .name = name_tv,
vmux: 1, .vmux = 1,
amux: TV, .amux = TV,
tv: 1, .tv = 1,
},{ },{
name: name_comp1, .name = name_comp1,
vmux: 2, .vmux = 2,
amux: LINE1, .amux = LINE1,
},{ },{
name: name_comp2, .name = name_comp2,
vmux: 3, .vmux = 3,
amux: LINE1, .amux = LINE1,
}}, }},
radio: { .radio = {
name: name_radio, .name = name_radio,
amux: LINE2, .amux = LINE2,
}, },
}, },
[SAA7134_BOARD_CINERGY400] = { [SAA7134_BOARD_CINERGY400] = {
name: "Terratec Cinergy 400 TV", .name = "Terratec Cinergy 400 TV",
audio_clock: 0x00200000, .audio_clock = 0x00200000,
tuner_type: TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
inputs: {{ .inputs = {{
name: name_tv, .name = name_tv,
vmux: 1, .vmux = 1,
amux: TV, .amux = TV,
tv: 1, .tv = 1,
},{ },{
name: name_comp1, .name = name_comp1,
vmux: 4, .vmux = 4,
amux: LINE1, .amux = LINE1,
},{ },{
name: name_svideo, .name = name_svideo,
vmux: 8, .vmux = 8,
amux: LINE1, .amux = LINE1,
},{ },{
name: name_comp2, // CVideo over SVideo Connector .name = name_comp2, // CVideo over SVideo Connector
vmux: 0, .vmux = 0,
amux: LINE1, .amux = LINE1,
}} }}
}, },
[SAA7134_BOARD_MD5044] = { [SAA7134_BOARD_MD5044] = {
name: "Medion 5044", .name = "Medion 5044",
audio_clock: 0x00200000, .audio_clock = 0x00200000,
tuner_type: TUNER_PHILIPS_FM1216ME_MK3, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
need_tda9887: 1, .need_tda9887 = 1,
inputs: {{ .inputs = {{
name: name_tv, .name = name_tv,
vmux: 1, .vmux = 1,
amux: TV, .amux = TV,
tv: 1, .tv = 1,
},{ },{
name: name_comp1, .name = name_comp1,
vmux: 0, .vmux = 0,
amux: LINE2, .amux = LINE2,
},{ },{
name: name_comp2, .name = name_comp2,
vmux: 3, .vmux = 3,
amux: LINE2, .amux = LINE2,
},{ },{
name: name_svideo, .name = name_svideo,
vmux: 8, .vmux = 8,
amux: LINE2, .amux = LINE2,
}}, }},
radio: { .radio = {
name: name_radio, .name = name_radio,
amux: LINE2, .amux = LINE2,
}, },
}, },
}; };
...@@ -296,57 +296,57 @@ const int saa7134_bcount = (sizeof(saa7134_boards)/sizeof(struct saa7134_board)) ...@@ -296,57 +296,57 @@ const int saa7134_bcount = (sizeof(saa7134_boards)/sizeof(struct saa7134_board))
struct pci_device_id __devinitdata saa7134_pci_tbl[] = { struct pci_device_id __devinitdata saa7134_pci_tbl[] = {
{ {
vendor: PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
device: PCI_DEVICE_ID_PHILIPS_SAA7134, .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
subvendor: PCI_VENDOR_ID_PHILIPS, .subvendor = PCI_VENDOR_ID_PHILIPS,
subdevice: 0x2001, .subdevice = 0x2001,
driver_data: SAA7134_BOARD_PROTEUS_PRO, .driver_data = SAA7134_BOARD_PROTEUS_PRO,
},{ },{
vendor: PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
device: PCI_DEVICE_ID_PHILIPS_SAA7134, .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
subvendor: PCI_VENDOR_ID_PHILIPS, .subvendor = PCI_VENDOR_ID_PHILIPS,
subdevice: 0x6752, .subdevice = 0x6752,
driver_data: SAA7134_BOARD_EMPRESS, .driver_data = SAA7134_BOARD_EMPRESS,
},{ },{
vendor: PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
device: PCI_DEVICE_ID_PHILIPS_SAA7134, .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
subvendor: 0x1131, .subvendor = 0x1131,
subdevice: 0x4e85, .subdevice = 0x4e85,
driver_data: SAA7134_BOARD_MONSTERTV, .driver_data = SAA7134_BOARD_MONSTERTV,
},{ },{
vendor: PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
device: PCI_DEVICE_ID_PHILIPS_SAA7134, .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
subvendor: 0x153B, .subvendor = 0x153B,
subdevice: 0x1142, .subdevice = 0x1142,
driver_data: SAA7134_BOARD_CINERGY400, .driver_data = SAA7134_BOARD_CINERGY400,
},{ },{
/* --- boards without eeprom + subsystem ID --- */ /* --- boards without eeprom + subsystem ID --- */
vendor: PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
device: PCI_DEVICE_ID_PHILIPS_SAA7134, .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
subvendor: PCI_VENDOR_ID_PHILIPS, .subvendor = PCI_VENDOR_ID_PHILIPS,
subdevice: 0, .subdevice = 0,
driver_data: SAA7134_BOARD_NOAUTO, .driver_data = SAA7134_BOARD_NOAUTO,
},{ },{
vendor: PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
device: PCI_DEVICE_ID_PHILIPS_SAA7130, .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
subvendor: PCI_VENDOR_ID_PHILIPS, .subvendor = PCI_VENDOR_ID_PHILIPS,
subdevice: 0, .subdevice = 0,
driver_data: SAA7134_BOARD_NOAUTO, .driver_data = SAA7134_BOARD_NOAUTO,
},{ },{
/* --- default catch --- */ /* --- default catch --- */
vendor: PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
device: PCI_DEVICE_ID_PHILIPS_SAA7130, .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
subvendor: PCI_ANY_ID, .subvendor = PCI_ANY_ID,
subdevice: PCI_ANY_ID, .subdevice = PCI_ANY_ID,
driver_data: SAA7134_BOARD_UNKNOWN, .driver_data = SAA7134_BOARD_UNKNOWN,
},{ },{
vendor: PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
device: PCI_DEVICE_ID_PHILIPS_SAA7134, .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
subvendor: PCI_ANY_ID, .subvendor = PCI_ANY_ID,
subdevice: PCI_ANY_ID, .subdevice = PCI_ANY_ID,
driver_data: SAA7134_BOARD_UNKNOWN, .driver_data = SAA7134_BOARD_UNKNOWN,
},{ },{
/* --- end of list --- */ /* --- end of list --- */
} }
......
...@@ -896,10 +896,10 @@ static void __devexit saa7134_finidev(struct pci_dev *pci_dev) ...@@ -896,10 +896,10 @@ static void __devexit saa7134_finidev(struct pci_dev *pci_dev)
} }
static struct pci_driver saa7134_pci_driver = { static struct pci_driver saa7134_pci_driver = {
name: "saa7134", .name = "saa7134",
id_table: saa7134_pci_tbl, .id_table = saa7134_pci_tbl,
probe: saa7134_initdev, .probe = saa7134_initdev,
remove: saa7134_finidev, .remove = saa7134_finidev,
}; };
static int saa7134_init(void) static int saa7134_init(void)
......
...@@ -338,25 +338,25 @@ static int attach_inform(struct i2c_client *client) ...@@ -338,25 +338,25 @@ static int attach_inform(struct i2c_client *client)
} }
static struct i2c_algorithm saa7134_algo = { static struct i2c_algorithm saa7134_algo = {
name: "saa7134", .name = "saa7134",
id: I2C_ALGO_SAA7134, .id = I2C_ALGO_SAA7134,
master_xfer: saa7134_i2c_xfer, .master_xfer = saa7134_i2c_xfer,
algo_control: algo_control, .algo_control = algo_control,
functionality: functionality, .functionality = functionality,
}; };
static struct i2c_adapter saa7134_adap_template = { static struct i2c_adapter saa7134_adap_template = {
name: "saa7134", .name = "saa7134",
id: I2C_ALGO_SAA7134, .id = I2C_ALGO_SAA7134,
algo: &saa7134_algo, .algo = &saa7134_algo,
inc_use: inc_use, .inc_use = inc_use,
dec_use: dec_use, .dec_use = dec_use,
client_register: attach_inform, .client_register = attach_inform,
}; };
static struct i2c_client saa7134_client_template = { static struct i2c_client saa7134_client_template = {
name: "saa7134 internal", .name = "saa7134 internal",
id: -1, .id = -1,
}; };
/* ----------------------------------------------------------- */ /* ----------------------------------------------------------- */
......
...@@ -486,14 +486,14 @@ static unsigned int dsp_poll(struct file *file, struct poll_table_struct *wait) ...@@ -486,14 +486,14 @@ static unsigned int dsp_poll(struct file *file, struct poll_table_struct *wait)
} }
struct file_operations saa7134_dsp_fops = { struct file_operations saa7134_dsp_fops = {
owner: THIS_MODULE, .owner = THIS_MODULE,
open: dsp_open, .open = dsp_open,
release: dsp_release, .release = dsp_release,
read: dsp_read, .read = dsp_read,
write: dsp_write, .write = dsp_write,
ioctl: dsp_ioctl, .ioctl = dsp_ioctl,
poll: dsp_poll, .poll = dsp_poll,
llseek: no_llseek, .llseek = no_llseek,
}; };
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
...@@ -670,11 +670,11 @@ static int mixer_ioctl(struct inode *inode, struct file *file, ...@@ -670,11 +670,11 @@ static int mixer_ioctl(struct inode *inode, struct file *file,
} }
struct file_operations saa7134_mixer_fops = { struct file_operations saa7134_mixer_fops = {
owner: THIS_MODULE, .owner = THIS_MODULE,
open: mixer_open, .open = mixer_open,
release: mixer_release, .release = mixer_release,
ioctl: mixer_ioctl, .ioctl = mixer_ioctl,
llseek: no_llseek, .llseek = no_llseek,
}; };
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
......
...@@ -151,10 +151,10 @@ static void buffer_release(struct file *file, struct videobuf_buffer *vb) ...@@ -151,10 +151,10 @@ static void buffer_release(struct file *file, struct videobuf_buffer *vb)
} }
static struct videobuf_queue_ops ts_qops = { static struct videobuf_queue_ops ts_qops = {
buf_setup: buffer_setup, .buf_setup = buffer_setup,
buf_prepare: buffer_prepare, .buf_prepare = buffer_prepare,
buf_queue: buffer_queue, .buf_queue = buffer_queue,
buf_release: buffer_release, .buf_release = buffer_release,
}; };
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
...@@ -375,14 +375,14 @@ static int ts_ioctl(struct inode *inode, struct file *file, ...@@ -375,14 +375,14 @@ static int ts_ioctl(struct inode *inode, struct file *file,
static struct file_operations ts_fops = static struct file_operations ts_fops =
{ {
owner: THIS_MODULE, .owner = THIS_MODULE,
open: ts_open, .open = ts_open,
release: ts_release, .release = ts_release,
read: ts_read, .read = ts_read,
poll: ts_poll, .poll = ts_poll,
mmap: ts_mmap, .mmap = ts_mmap,
ioctl: ts_ioctl, .ioctl = ts_ioctl,
llseek: no_llseek, .llseek = no_llseek,
}; };
...@@ -391,12 +391,12 @@ static struct file_operations ts_fops = ...@@ -391,12 +391,12 @@ static struct file_operations ts_fops =
struct video_device saa7134_ts_template = struct video_device saa7134_ts_template =
{ {
name: "saa7134-ts", .name = "saa7134-ts",
type: 0 /* FIXME */, .type = 0 /* FIXME */,
type2: 0 /* FIXME */, .type2 = 0 /* FIXME */,
hardware: 0, .hardware = 0,
fops: &ts_fops, .fops = &ts_fops,
minor: -1, .minor = -1,
}; };
int saa7134_ts_init(struct saa7134_dev *dev) int saa7134_ts_init(struct saa7134_dev *dev)
......
...@@ -48,65 +48,65 @@ MODULE_PARM_DESC(audio_debug,"enable debug messages [tv audio]"); ...@@ -48,65 +48,65 @@ MODULE_PARM_DESC(audio_debug,"enable debug messages [tv audio]");
static struct saa7134_tvaudio tvaudio[] = { static struct saa7134_tvaudio tvaudio[] = {
{ {
name: "PAL-B/G FM-stereo", .name = "PAL-B/G FM-stereo",
std: V4L2_STD_PAL, .std = V4L2_STD_PAL,
mode: TVAUDIO_FM_BG_STEREO, .mode = TVAUDIO_FM_BG_STEREO,
carr1: 5500, .carr1 = 5500,
carr2: 5742, .carr2 = 5742,
},{ },{
name: "PAL-D/K1 FM-stereo", .name = "PAL-D/K1 FM-stereo",
std: V4L2_STD_PAL, .std = V4L2_STD_PAL,
carr1: 6500, .carr1 = 6500,
carr2: 6258, .carr2 = 6258,
mode: TVAUDIO_FM_BG_STEREO, .mode = TVAUDIO_FM_BG_STEREO,
},{ },{
name: "PAL-D/K2 FM-stereo", .name = "PAL-D/K2 FM-stereo",
std: V4L2_STD_PAL, .std = V4L2_STD_PAL,
carr1: 6500, .carr1 = 6500,
carr2: 6742, .carr2 = 6742,
mode: TVAUDIO_FM_BG_STEREO, .mode = TVAUDIO_FM_BG_STEREO,
},{ },{
name: "PAL-D/K3 FM-stereo", .name = "PAL-D/K3 FM-stereo",
std: V4L2_STD_PAL, .std = V4L2_STD_PAL,
carr1: 6500, .carr1 = 6500,
carr2: 5742, .carr2 = 5742,
mode: TVAUDIO_FM_BG_STEREO, .mode = TVAUDIO_FM_BG_STEREO,
},{ },{
name: "PAL-B/G NICAM", .name = "PAL-B/G NICAM",
std: V4L2_STD_PAL, .std = V4L2_STD_PAL,
carr1: 5500, .carr1 = 5500,
carr2: 5850, .carr2 = 5850,
mode: TVAUDIO_NICAM_FM, .mode = TVAUDIO_NICAM_FM,
},{ },{
name: "PAL-I NICAM", .name = "PAL-I NICAM",
std: V4L2_STD_PAL, .std = V4L2_STD_PAL,
carr1: 6000, .carr1 = 6000,
carr2: 6552, .carr2 = 6552,
mode: TVAUDIO_NICAM_FM, .mode = TVAUDIO_NICAM_FM,
},{ },{
name: "PAL-D/K NICAM", .name = "PAL-D/K NICAM",
std: V4L2_STD_PAL, .std = V4L2_STD_PAL,
carr1: 6500, .carr1 = 6500,
carr2: 5850, .carr2 = 5850,
mode: TVAUDIO_NICAM_FM, .mode = TVAUDIO_NICAM_FM,
},{ },{
name: "SECAM-L NICAM", .name = "SECAM-L NICAM",
std: V4L2_STD_SECAM, .std = V4L2_STD_SECAM,
carr1: 6500, .carr1 = 6500,
carr2: 5850, .carr2 = 5850,
mode: TVAUDIO_NICAM_AM, .mode = TVAUDIO_NICAM_AM,
},{ },{
name: "NTSC-M", .name = "NTSC-M",
std: V4L2_STD_NTSC, .std = V4L2_STD_NTSC,
carr1: 4500, .carr1 = 4500,
carr2: -1, .carr2 = -1,
mode: TVAUDIO_FM_MONO, .mode = TVAUDIO_FM_MONO,
},{ },{
name: "NTSC-A2 FM-stereo", .name = "NTSC-A2 FM-stereo",
std: V4L2_STD_NTSC, .std = V4L2_STD_NTSC,
carr1: 4500, .carr1 = 4500,
carr2: 4724, .carr2 = 4724,
mode: TVAUDIO_FM_K_STEREO, .mode = TVAUDIO_FM_K_STEREO,
} }
}; };
#define TVAUDIO (sizeof(tvaudio)/sizeof(struct saa7134_tvaudio)) #define TVAUDIO (sizeof(tvaudio)/sizeof(struct saa7134_tvaudio))
......
...@@ -207,10 +207,10 @@ static void buffer_release(struct file *file, struct videobuf_buffer *vb) ...@@ -207,10 +207,10 @@ static void buffer_release(struct file *file, struct videobuf_buffer *vb)
} }
struct videobuf_queue_ops saa7134_vbi_qops = { struct videobuf_queue_ops saa7134_vbi_qops = {
buf_setup: buffer_setup, .buf_setup = buffer_setup,
buf_prepare: buffer_prepare, .buf_prepare = buffer_prepare,
buf_queue: buffer_queue, .buf_queue = buffer_queue,
buf_release: buffer_release, .buf_release = buffer_release,
}; };
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
......
...@@ -55,80 +55,80 @@ static int video_out[][9] = { ...@@ -55,80 +55,80 @@ static int video_out[][9] = {
static struct saa7134_format formats[] = { static struct saa7134_format formats[] = {
{ {
name: "8 bpp gray", .name = "8 bpp gray",
fourcc: V4L2_PIX_FMT_GREY, .fourcc = V4L2_PIX_FMT_GREY,
depth: 8, .depth = 8,
pm: 0x06, .pm = 0x06,
},{ },{
name: "15 bpp RGB, le", .name = "15 bpp RGB, le",
fourcc: V4L2_PIX_FMT_RGB555, .fourcc = V4L2_PIX_FMT_RGB555,
depth: 16, .depth = 16,
pm: 0x13 | 0x80, .pm = 0x13 | 0x80,
},{ },{
name: "15 bpp RGB, be", .name = "15 bpp RGB, be",
fourcc: V4L2_PIX_FMT_RGB555X, .fourcc = V4L2_PIX_FMT_RGB555X,
depth: 16, .depth = 16,
pm: 0x13 | 0x80, .pm = 0x13 | 0x80,
bswap: 1, .bswap = 1,
},{ },{
name: "16 bpp RGB, le", .name = "16 bpp RGB, le",
fourcc: V4L2_PIX_FMT_RGB565, .fourcc = V4L2_PIX_FMT_RGB565,
depth: 16, .depth = 16,
pm: 0x10 | 0x80, .pm = 0x10 | 0x80,
},{ },{
name: "16 bpp RGB, be", .name = "16 bpp RGB, be",
fourcc: V4L2_PIX_FMT_RGB565X, .fourcc = V4L2_PIX_FMT_RGB565X,
depth: 16, .depth = 16,
pm: 0x10 | 0x80, .pm = 0x10 | 0x80,
bswap: 1, .bswap = 1,
},{ },{
name: "24 bpp RGB, le", .name = "24 bpp RGB, le",
fourcc: V4L2_PIX_FMT_BGR24, .fourcc = V4L2_PIX_FMT_BGR24,
depth: 24, .depth = 24,
pm: 0x11, .pm = 0x11,
},{ },{
name: "32 bpp RGB, le", .name = "32 bpp RGB, le",
fourcc: V4L2_PIX_FMT_BGR32, .fourcc = V4L2_PIX_FMT_BGR32,
depth: 32, .depth = 32,
pm: 0x12, .pm = 0x12,
},{ },{
name: "32 bpp RGB, be", .name = "32 bpp RGB, be",
fourcc: V4L2_PIX_FMT_RGB32, .fourcc = V4L2_PIX_FMT_RGB32,
depth: 32, .depth = 32,
pm: 0x12, .pm = 0x12,
bswap: 1, .bswap = 1,
wswap: 1, .wswap = 1,
},{ },{
name: "4:2:2 packed, YUYV", .name = "4:2:2 packed, YUYV",
fourcc: V4L2_PIX_FMT_YUYV, .fourcc = V4L2_PIX_FMT_YUYV,
depth: 16, .depth = 16,
pm: 0x00, .pm = 0x00,
bswap: 1, .bswap = 1,
yuv: 1, .yuv = 1,
},{ },{
name: "4:2:2 packed, UYVY", .name = "4:2:2 packed, UYVY",
fourcc: V4L2_PIX_FMT_UYVY, .fourcc = V4L2_PIX_FMT_UYVY,
depth: 16, .depth = 16,
pm: 0x00, .pm = 0x00,
yuv: 1, .yuv = 1,
},{ },{
name: "4:2:2 planar, Y-Cb-Cr", .name = "4:2:2 planar, Y-Cb-Cr",
fourcc: V4L2_PIX_FMT_YUV422P, .fourcc = V4L2_PIX_FMT_YUV422P,
depth: 16, .depth = 16,
pm: 0x09, .pm = 0x09,
yuv: 1, .yuv = 1,
planar: 1, .planar = 1,
hshift: 1, .hshift = 1,
vshift: 0, .vshift = 0,
},{ },{
name: "4:2:0 planar, Y-Cb-Cr", .name = "4:2:0 planar, Y-Cb-Cr",
fourcc: V4L2_PIX_FMT_YUV420, .fourcc = V4L2_PIX_FMT_YUV420,
depth: 12, .depth = 12,
pm: 0x0a, .pm = 0x0a,
yuv: 1, .yuv = 1,
planar: 1, .planar = 1,
hshift: 1, .hshift = 1,
vshift: 1, .vshift = 1,
} }
}; };
#define FORMATS (sizeof(formats)/sizeof(struct saa7134_format)) #define FORMATS (sizeof(formats)/sizeof(struct saa7134_format))
...@@ -136,77 +136,77 @@ static struct saa7134_format formats[] = { ...@@ -136,77 +136,77 @@ static struct saa7134_format formats[] = {
static struct saa7134_tvnorm tvnorms[] = { static struct saa7134_tvnorm tvnorms[] = {
{ {
name: "PAL-BGHI", .name = "PAL-BGHI",
id: V4L2_STD_PAL, .id = V4L2_STD_PAL,
width: 720, .width = 720,
height: 576, .height = 576,
sync_control: 0x18, .sync_control = 0x18,
luma_control: 0x40, .luma_control = 0x40,
chroma_ctrl1: 0x81, .chroma_ctrl1 = 0x81,
chroma_gain: 0x2a, .chroma_gain = 0x2a,
chroma_ctrl2: 0x06, .chroma_ctrl2 = 0x06,
h_start: 0, .h_start = 0,
h_stop: 719, .h_stop = 719,
video_v_start: 24, .video_v_start = 24,
video_v_stop: 311, .video_v_stop = 311,
vbi_v_start: 7-3, /* FIXME */ .vbi_v_start = 7-3, /* FIXME */
vbi_v_stop: 22-3, .vbi_v_stop = 22-3,
},{ },{
name: "NTSC-M", .name = "NTSC-M",
id: V4L2_STD_NTSC, .id = V4L2_STD_NTSC,
width: 720, .width = 720,
height: 480, .height = 480,
sync_control: 0x59, .sync_control = 0x59,
luma_control: 0x40, .luma_control = 0x40,
chroma_ctrl1: 0x89, .chroma_ctrl1 = 0x89,
chroma_gain: 0x2a, .chroma_gain = 0x2a,
chroma_ctrl2: 0x0e, .chroma_ctrl2 = 0x0e,
h_start: 0, .h_start = 0,
h_stop: 719, .h_stop = 719,
video_v_start: 22, .video_v_start = 22,
video_v_stop: 22+240, .video_v_stop = 22+240,
vbi_v_start: 10, /* FIXME */ .vbi_v_start = 10, /* FIXME */
vbi_v_stop: 21, /* FIXME */ .vbi_v_stop = 21, /* FIXME */
},{ },{
name: "SECAM", .name = "SECAM",
id: V4L2_STD_SECAM, .id = V4L2_STD_SECAM,
width: 720, .width = 720,
height: 576, .height = 576,
sync_control: 0x58, .sync_control = 0x58,
luma_control: 0x1b, .luma_control = 0x1b,
chroma_ctrl1: 0xd1, .chroma_ctrl1 = 0xd1,
chroma_gain: 0x80, .chroma_gain = 0x80,
chroma_ctrl2: 0x00, .chroma_ctrl2 = 0x00,
h_start: 0, .h_start = 0,
h_stop: 719, .h_stop = 719,
video_v_start: 24, .video_v_start = 24,
video_v_stop: 311, .video_v_stop = 311,
vbi_v_start: 7, .vbi_v_start = 7,
vbi_v_stop: 22, .vbi_v_stop = 22,
},{ },{
name: "AUTO", .name = "AUTO",
id: -1, .id = -1,
width: 768, .width = 768,
height: 576, .height = 576,
sync_control: 0x98, .sync_control = 0x98,
luma_control: 0x40, .luma_control = 0x40,
chroma_ctrl1: 0x8b, .chroma_ctrl1 = 0x8b,
chroma_gain: 0x00, .chroma_gain = 0x00,
chroma_ctrl2: 0x00, .chroma_ctrl2 = 0x00,
h_start: 0, .h_start = 0,
h_stop: 719, .h_stop = 719,
video_v_start: 24, .video_v_start = 24,
video_v_stop: 311, .video_v_stop = 311,
vbi_v_start: 7, .vbi_v_start = 7,
vbi_v_stop: 22, .vbi_v_stop = 22,
} }
}; };
#define TVNORMS (sizeof(tvnorms)/sizeof(struct saa7134_tvnorm)) #define TVNORMS (sizeof(tvnorms)/sizeof(struct saa7134_tvnorm))
...@@ -218,87 +218,87 @@ static struct saa7134_tvnorm tvnorms[] = { ...@@ -218,87 +218,87 @@ static struct saa7134_tvnorm tvnorms[] = {
#define V4L2_CID_PRIVATE_LASTP1 (V4L2_CID_PRIVATE_BASE + 3) #define V4L2_CID_PRIVATE_LASTP1 (V4L2_CID_PRIVATE_BASE + 3)
static const struct v4l2_queryctrl no_ctrl = { static const struct v4l2_queryctrl no_ctrl = {
name: "42", .name = "42",
flags: V4L2_CTRL_FLAG_DISABLED, .flags = V4L2_CTRL_FLAG_DISABLED,
}; };
static const struct v4l2_queryctrl video_ctrls[] = { static const struct v4l2_queryctrl video_ctrls[] = {
/* --- video --- */ /* --- video --- */
{ {
id: V4L2_CID_BRIGHTNESS, .id = V4L2_CID_BRIGHTNESS,
name: "Brightness", .name = "Brightness",
minimum: 0, .minimum = 0,
maximum: 255, .maximum = 255,
step: 1, .step = 1,
default_value: 128, .default_value = 128,
type: V4L2_CTRL_TYPE_INTEGER, .type = V4L2_CTRL_TYPE_INTEGER,
},{ },{
id: V4L2_CID_CONTRAST, .id = V4L2_CID_CONTRAST,
name: "Contrast", .name = "Contrast",
minimum: 0, .minimum = 0,
maximum: 127, .maximum = 127,
step: 1, .step = 1,
default_value: 68, .default_value = 68,
type: V4L2_CTRL_TYPE_INTEGER, .type = V4L2_CTRL_TYPE_INTEGER,
},{ },{
id: V4L2_CID_SATURATION, .id = V4L2_CID_SATURATION,
name: "Saturation", .name = "Saturation",
minimum: 0, .minimum = 0,
maximum: 127, .maximum = 127,
step: 1, .step = 1,
default_value: 64, .default_value = 64,
type: V4L2_CTRL_TYPE_INTEGER, .type = V4L2_CTRL_TYPE_INTEGER,
},{ },{
id: V4L2_CID_HUE, .id = V4L2_CID_HUE,
name: "Hue", .name = "Hue",
minimum: -128, .minimum = -128,
maximum: 127, .maximum = 127,
step: 1, .step = 1,
default_value: 0, .default_value = 0,
type: V4L2_CTRL_TYPE_INTEGER, .type = V4L2_CTRL_TYPE_INTEGER,
},{ },{
id: V4L2_CID_VFLIP, .id = V4L2_CID_VFLIP,
name: "vertical flip", .name = "vertical flip",
minimum: 0, .minimum = 0,
maximum: 1, .maximum = 1,
type: V4L2_CTRL_TYPE_BOOLEAN, .type = V4L2_CTRL_TYPE_BOOLEAN,
}, },
/* --- audio --- */ /* --- audio --- */
{ {
id: V4L2_CID_AUDIO_MUTE, .id = V4L2_CID_AUDIO_MUTE,
name: "Mute", .name = "Mute",
minimum: 0, .minimum = 0,
maximum: 1, .maximum = 1,
type: V4L2_CTRL_TYPE_BOOLEAN, .type = V4L2_CTRL_TYPE_BOOLEAN,
},{ },{
id: V4L2_CID_AUDIO_VOLUME, .id = V4L2_CID_AUDIO_VOLUME,
name: "Volume", .name = "Volume",
minimum: -15, .minimum = -15,
maximum: 15, .maximum = 15,
step: 1, .step = 1,
default_value: 0, .default_value = 0,
type: V4L2_CTRL_TYPE_INTEGER, .type = V4L2_CTRL_TYPE_INTEGER,
}, },
/* --- private --- */ /* --- private --- */
{ {
id: V4L2_CID_PRIVATE_INVERT, .id = V4L2_CID_PRIVATE_INVERT,
name: "Invert", .name = "Invert",
minimum: 0, .minimum = 0,
maximum: 1, .maximum = 1,
type: V4L2_CTRL_TYPE_BOOLEAN, .type = V4L2_CTRL_TYPE_BOOLEAN,
},{ },{
id: V4L2_CID_PRIVATE_Y_ODD, .id = V4L2_CID_PRIVATE_Y_ODD,
name: "y offset odd field", .name = "y offset odd field",
minimum: 0, .minimum = 0,
maximum: 128, .maximum = 128,
default_value: 0, .default_value = 0,
type: V4L2_CTRL_TYPE_INTEGER, .type = V4L2_CTRL_TYPE_INTEGER,
},{ },{
id: V4L2_CID_PRIVATE_Y_EVEN, .id = V4L2_CID_PRIVATE_Y_EVEN,
name: "y offset even field", .name = "y offset even field",
minimum: 0, .minimum = 0,
maximum: 128, .maximum = 128,
default_value: 0, .default_value = 0,
type: V4L2_CTRL_TYPE_INTEGER, .type = V4L2_CTRL_TYPE_INTEGER,
} }
}; };
const int CTRLS = (sizeof(video_ctrls)/sizeof(struct v4l2_queryctrl)); const int CTRLS = (sizeof(video_ctrls)/sizeof(struct v4l2_queryctrl));
...@@ -912,10 +912,10 @@ static void buffer_release(struct file *file, struct videobuf_buffer *vb) ...@@ -912,10 +912,10 @@ static void buffer_release(struct file *file, struct videobuf_buffer *vb)
} }
static struct videobuf_queue_ops video_qops = { static struct videobuf_queue_ops video_qops = {
buf_setup: buffer_setup, .buf_setup = buffer_setup,
buf_prepare: buffer_prepare, .buf_prepare = buffer_prepare,
buf_queue: buffer_queue, .buf_queue = buffer_queue,
buf_release: buffer_release, .buf_release = buffer_release,
}; };
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
...@@ -1873,23 +1873,23 @@ static int radio_ioctl(struct inode *inode, struct file *file, ...@@ -1873,23 +1873,23 @@ static int radio_ioctl(struct inode *inode, struct file *file,
static struct file_operations video_fops = static struct file_operations video_fops =
{ {
owner: THIS_MODULE, .owner = THIS_MODULE,
open: video_open, .open = video_open,
release: video_release, .release = video_release,
read: video_read, .read = video_read,
poll: video_poll, .poll = video_poll,
mmap: video_mmap, .mmap = video_mmap,
ioctl: video_ioctl, .ioctl = video_ioctl,
llseek: no_llseek, .llseek = no_llseek,
}; };
static struct file_operations radio_fops = static struct file_operations radio_fops =
{ {
owner: THIS_MODULE, .owner = THIS_MODULE,
open: video_open, .open = video_open,
release: video_release, .release = video_release,
ioctl: radio_ioctl, .ioctl = radio_ioctl,
llseek: no_llseek, .llseek = no_llseek,
}; };
/* ----------------------------------------------------------- */ /* ----------------------------------------------------------- */
...@@ -1897,30 +1897,30 @@ static struct file_operations radio_fops = ...@@ -1897,30 +1897,30 @@ static struct file_operations radio_fops =
struct video_device saa7134_video_template = struct video_device saa7134_video_template =
{ {
name: "saa7134-video", .name = "saa7134-video",
type: VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY| type: VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY|
VID_TYPE_CLIPPING|VID_TYPE_SCALES, VID_TYPE_CLIPPING|VID_TYPE_SCALES,
hardware: 0, .hardware = 0,
fops: &video_fops, .fops = &video_fops,
minor: -1, .minor = -1,
}; };
struct video_device saa7134_vbi_template = struct video_device saa7134_vbi_template =
{ {
name: "saa7134-vbi", .name = "saa7134-vbi",
type: VID_TYPE_TUNER|VID_TYPE_TELETEXT, .type = VID_TYPE_TUNER|VID_TYPE_TELETEXT,
hardware: 0, .hardware = 0,
fops: &video_fops, .fops = &video_fops,
minor: -1, .minor = -1,
}; };
struct video_device saa7134_radio_template = struct video_device saa7134_radio_template =
{ {
name: "saa7134-radio", .name = "saa7134-radio",
type: VID_TYPE_TUNER, .type = VID_TYPE_TUNER,
hardware: 0, .hardware = 0,
fops: &radio_fops, .fops = &radio_fops,
minor: -1, .minor = -1,
}; };
int saa7134_video_init(struct saa7134_dev *dev) int saa7134_video_init(struct saa7134_dev *dev)
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <linux/kdev_t.h> #include <linux/kdev_t.h>
#include "video-buf.h" #include "video-buf.h"
#define SAA7134_VERSION_CODE KERNEL_VERSION(0,2,1) #define SAA7134_VERSION_CODE KERNEL_VERSION(0,2,2)
#ifndef TRUE #ifndef TRUE
# define TRUE (1==1) # define TRUE (1==1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment