From 9d7a8568c08e90097778aeac7bb66db7ddb183b8 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 26 Mar 2006 03:43:36 -0500 Subject: cxusb: add support for FusionHDTV USB portable remote control From: Michael Krufky - Added keycodes for the DViCO FusionHDTV portable remote control. - Enabled the remote control for both versions of FusionHDTV DVB-T USB and the FusionHDTV 5 USB Gold (ATSC) Signed-off-by: Michael Krufky --- linux/drivers/media/dvb/dvb-usb/cxusb.c | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/dvb-usb/cxusb.c b/linux/drivers/media/dvb/dvb-usb/cxusb.c index f20b2bda4..56ea5c6dc 100644 --- a/linux/drivers/media/dvb/dvb-usb/cxusb.c +++ b/linux/drivers/media/dvb/dvb-usb/cxusb.c @@ -233,6 +233,49 @@ static struct dvb_usb_rc_key dvico_mce_rc_keys[] = { { 0xfe, 0x4e, KEY_POWER }, }; +static struct dvb_usb_rc_key dvico_portable_rc_keys[] = { + { 0xfc, 0x02, KEY_SETUP }, /* Profile */ + { 0xfc, 0x43, KEY_POWER2 }, + { 0xfc, 0x06, KEY_EPG }, + { 0xfc, 0x5a, KEY_BACK }, + { 0xfc, 0x05, KEY_MENU }, + { 0xfc, 0x47, KEY_INFO }, + { 0xfc, 0x01, KEY_TAB }, + { 0xfc, 0x42, KEY_PREVIOUSSONG },/* Replay */ + { 0xfc, 0x49, KEY_VOLUMEUP }, + { 0xfc, 0x09, KEY_VOLUMEDOWN }, + { 0xfc, 0x54, KEY_CHANNELUP }, + { 0xfc, 0x0b, KEY_CHANNELDOWN }, + /* + { 0xfc, 0x56, KEY_CAMERA }, + Camera and Record keys both send the same code, + but the camera key doesn't repeat. + */ + { 0xfc, 0x40, KEY_TUNER }, /* ATV/DTV */ + { 0xfc, 0x45, KEY_OPEN }, + { 0xfc, 0x19, KEY_1 }, + { 0xfc, 0x18, KEY_2 }, + { 0xfc, 0x1b, KEY_3 }, + { 0xfc, 0x1a, KEY_4 }, + { 0xfc, 0x58, KEY_5 }, + { 0xfc, 0x59, KEY_6 }, + { 0xfc, 0x15, KEY_7 }, + { 0xfc, 0x14, KEY_8 }, + { 0xfc, 0x17, KEY_9 }, + { 0xfc, 0x44, KEY_ANGLE }, /* Aspect */ + { 0xfc, 0x55, KEY_0 }, + { 0xfc, 0x07, KEY_ZOOM }, + { 0xfc, 0x0a, KEY_REWIND }, + { 0xfc, 0x08, KEY_PLAYPAUSE }, + { 0xfc, 0x4b, KEY_FASTFORWARD }, + { 0xfc, 0x5b, KEY_MUTE }, + { 0xfc, 0x04, KEY_STOP }, + { 0xfc, 0x56, KEY_RECORD }, + { 0xfc, 0x57, KEY_POWER }, + { 0xfc, 0x41, KEY_UNKNOWN }, /* INPUT */ + { 0xfc, 0x00, KEY_UNKNOWN }, /* HD */ +}; + static int cxusb_dee1601_demod_init(struct dvb_frontend* fe) { static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x28 }; @@ -511,6 +554,11 @@ static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties = { .i2c_algo = &cxusb_i2c_algo, + .rc_interval = 100, + .rc_key_map = dvico_portable_rc_keys, + .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys), + .rc_query = cxusb_rc_query, + .generic_bulk_ctrl_endpoint = 0x01, /* parameter for the MPEG2-data transfer */ .urb = { @@ -600,6 +648,11 @@ static struct dvb_usb_properties cxusb_bluebird_lgz201_properties = { .i2c_algo = &cxusb_i2c_algo, + .rc_interval = 100, + .rc_key_map = dvico_portable_rc_keys, + .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys), + .rc_query = cxusb_rc_query, + .generic_bulk_ctrl_endpoint = 0x01, /* parameter for the MPEG2-data transfer */ .urb = { @@ -640,6 +693,11 @@ static struct dvb_usb_properties cxusb_bluebird_dtt7579_properties = { .i2c_algo = &cxusb_i2c_algo, + .rc_interval = 100, + .rc_key_map = dvico_portable_rc_keys, + .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys), + .rc_query = cxusb_rc_query, + .generic_bulk_ctrl_endpoint = 0x01, /* parameter for the MPEG2-data transfer */ .urb = { -- cgit v1.2.3 From 1513c16af8fe4dd3f0afa6548cb39331c24bd01d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 26 Mar 2006 08:53:06 -0300 Subject: Some cleanups at make xconfig From: Mauro Carvalho Chehab Now, it doesn't depend on kernel Kconfig stuff: - It generates a Kconfig.kern based on unsolved dependencies. - It assumes that all needed dependencies were compiled as module. Only Multimedia tree is showed to the user. To work, user should have runned xconfig before at the normal kernel tree. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/Kconfig | 68 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 linux/drivers/media/Kconfig (limited to 'linux/drivers') diff --git a/linux/drivers/media/Kconfig b/linux/drivers/media/Kconfig new file mode 100644 index 000000000..baa9f58be --- /dev/null +++ b/linux/drivers/media/Kconfig @@ -0,0 +1,68 @@ +# +# Multimedia device configuration +# + +menu "Multimedia devices" + +config VIDEO_DEV + tristate "Video For Linux" + ---help--- + Support for audio/video capture and overlay devices and FM radio + cards. The exact capabilities of each device vary. User tools for + this are available from + . + + This kernel includes support for the new Video for Linux Two API, + (V4L2) as well as the original system. Drivers and applications + need to be rewritten to use V4L2, but drivers for popular cards + and applications for most video capture functions already exist. + + Documentation for the original API is included in the file + . Documentation for V4L2 is + available on the web at . + + To compile this driver as a module, choose M here: the + module will be called videodev. + +source "drivers/media/video/Kconfig" + +source "drivers/media/radio/Kconfig" + +source "drivers/media/dvb/Kconfig" + +source "drivers/media/common/Kconfig" + +config VIDEO_TUNER + tristate + +config VIDEO_BUF + tristate + +config VIDEO_BUF_DVB + tristate + +config VIDEO_BTCX + tristate + +config VIDEO_IR + tristate + +config VIDEO_TVEEPROM + tristate + +config USB_DABUSB + tristate "DABUSB driver" + depends on USB + ---help--- + A Digital Audio Broadcasting (DAB) Receiver for USB and Linux + brought to you by the DAB-Team + . This driver can be taken + as an example for URB-based bulk, control, and isochronous + transactions. URB's are explained in + . + + To compile this driver as a module, choose M here: the + module will be called dabusb. + +endmenu + -- cgit v1.2.3 From 666910f34117901b1db8e6baf030d84451d6e4ab Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 26 Mar 2006 08:54:09 -0300 Subject: Whitespace cleanup From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/Kconfig | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/Kconfig b/linux/drivers/media/Kconfig index baa9f58be..fffc711c2 100644 --- a/linux/drivers/media/Kconfig +++ b/linux/drivers/media/Kconfig @@ -51,18 +51,18 @@ config VIDEO_TVEEPROM tristate config USB_DABUSB - tristate "DABUSB driver" - depends on USB - ---help--- - A Digital Audio Broadcasting (DAB) Receiver for USB and Linux - brought to you by the DAB-Team - . This driver can be taken - as an example for URB-based bulk, control, and isochronous - transactions. URB's are explained in - . - - To compile this driver as a module, choose M here: the - module will be called dabusb. + tristate "DABUSB driver" + depends on USB + ---help--- + A Digital Audio Broadcasting (DAB) Receiver for USB and Linux + brought to you by the DAB-Team + . This driver can be taken + as an example for URB-based bulk, control, and isochronous + transactions. URB's are explained in + . + + To compile this driver as a module, choose M here: the + module will be called dabusb. endmenu -- cgit v1.2.3 From d8d74e1971146106ca651efbbac772a93f968a41 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 26 Mar 2006 16:59:45 -0500 Subject: Fix camera key on FusionHDTV portable remote control From: Michael Krufky Thanks to: Andrew Cohen Signed-off-by: Michael Krufky --- linux/drivers/media/dvb/dvb-usb/cxusb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/dvb-usb/cxusb.c b/linux/drivers/media/dvb/dvb-usb/cxusb.c index 56ea5c6dc..d63f6ec4f 100644 --- a/linux/drivers/media/dvb/dvb-usb/cxusb.c +++ b/linux/drivers/media/dvb/dvb-usb/cxusb.c @@ -246,11 +246,7 @@ static struct dvb_usb_rc_key dvico_portable_rc_keys[] = { { 0xfc, 0x09, KEY_VOLUMEDOWN }, { 0xfc, 0x54, KEY_CHANNELUP }, { 0xfc, 0x0b, KEY_CHANNELDOWN }, - /* - { 0xfc, 0x56, KEY_CAMERA }, - Camera and Record keys both send the same code, - but the camera key doesn't repeat. - */ + { 0xfc, 0x16, KEY_CAMERA }, { 0xfc, 0x40, KEY_TUNER }, /* ATV/DTV */ { 0xfc, 0x45, KEY_OPEN }, { 0xfc, 0x19, KEY_1 }, -- cgit v1.2.3 From af3723d04cc119034880f365c1e71edf0b0cde83 Mon Sep 17 00:00:00 2001 From: Ricardo Cerqueira Date: Mon, 27 Mar 2006 09:16:31 -0300 Subject: Fix video-buf PCI wrappers From: Ricardo Cerqueira After the recent video-buf "generic" adaptation, the PCI wrappers got completely broken, and all of the DMA sound modules stopped working (and failed with an oops) Signed-off-by: Ricardo Cerqueira --- linux/drivers/media/video/video-buf.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c index 715feea6b..4ae4e1e7a 100644 --- a/linux/drivers/media/video/video-buf.c +++ b/linux/drivers/media/video/video-buf.c @@ -406,19 +406,25 @@ void videobuf_queue_pci(struct videobuf_queue* q) int videobuf_pci_dma_map(struct pci_dev *pci,struct videobuf_dmabuf *dma) { struct videobuf_queue q; + struct videobuf_queue_ops qops; q.dev=pci; - q.ops->vb_map_sg=(vb_map_sg_t *)pci_unmap_sg; + qops.vb_map_sg=(vb_map_sg_t *)pci_map_sg; + qops.vb_unmap_sg=(vb_map_sg_t *)pci_unmap_sg; + q.ops = &qops; - return (videobuf_dma_unmap(&q,dma)); + return (videobuf_dma_map(&q,dma)); } int videobuf_pci_dma_unmap(struct pci_dev *pci,struct videobuf_dmabuf *dma) { struct videobuf_queue q; + struct videobuf_queue_ops qops; q.dev=pci; - q.ops->vb_map_sg=(vb_map_sg_t *)pci_unmap_sg; + qops.vb_map_sg=(vb_map_sg_t *)pci_map_sg; + qops.vb_unmap_sg=(vb_map_sg_t *)pci_unmap_sg; + q.ops = &qops; return (videobuf_dma_unmap(&q,dma)); } -- cgit v1.2.3 From d5b86b18b3c5bbd2b7f6ab6333ba4b858f48d656 Mon Sep 17 00:00:00 2001 From: Hartmut Hackmann Date: Tue, 28 Mar 2006 00:04:48 +0200 Subject: Added PCI IDs of 2 LifeView Cards From: Hartmut Hackmann Added ID entries for the Genius VideoWonder DVB-T and the LifeView FlyTV Platinum Gold Signed-off-by: Hartmut Hackmann --- linux/drivers/media/video/saa7134/saa7134-cards.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index 45eef4148..0e9ee8715 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -210,7 +210,7 @@ struct saa7134_board saa7134_boards[] = { [SAA7134_BOARD_FLYTVPLATINUM_FM] = { /* LifeView FlyTV Platinum FM (LR214WF) */ /* "Peter Missel */ - .name = "LifeView FlyTV Platinum FM", + .name = "LifeView FlyTV Platinum FM / Gold", .audio_clock = 0x00200000, .tuner_type = TUNER_PHILIPS_TDA8290, .radio_type = UNSET, @@ -2673,7 +2673,7 @@ struct saa7134_board saa7134_boards[] = { [SAA7134_BOARD_FLYDVBT_LR301] = { /* LifeView FlyDVB-T */ /* Giampiero Giancipoli */ - .name = "LifeView FlyDVB-T", + .name = "LifeView FlyDVB-T / Genius VideoWonder DVB-T", .audio_clock = 0x00200000, .tuner_type = TUNER_ABSENT, .radio_type = UNSET, @@ -3373,6 +3373,18 @@ struct pci_device_id saa7134_pci_tbl[] = { .subvendor = 0x16be, .subdevice = 0x0005, .driver_data = SAA7134_BOARD_MD7134_BRIDGE_2, + },{ + .vendor = PCI_VENDOR_ID_PHILIPS, + .device = PCI_DEVICE_ID_PHILIPS_SAA7134, + .subvendor = 0x1489, + .subdevice = 0x0301, + .driver_data = SAA7134_BOARD_FLYDVBT_LR301, + },{ + .vendor = PCI_VENDOR_ID_PHILIPS, + .device = PCI_DEVICE_ID_PHILIPS_SAA7133, + .subvendor = 0x5168, /* Animation Technologies (LifeView) */ + .subdevice = 0x0304, + .driver_data = SAA7134_BOARD_FLYTVPLATINUM_FM, },{ /* --- boards without eeprom + subsystem ID --- */ .vendor = PCI_VENDOR_ID_PHILIPS, -- cgit v1.2.3 From 40af1c784bed034e3c7dbfa7e804146dc8052e6a Mon Sep 17 00:00:00 2001 From: Hartmut Hackmann Date: Tue, 28 Mar 2006 00:15:47 +0200 Subject: Corrected CVBS input for the AVERMEDIA 777 DVB-T From: Hartmut Hackmann The .vmux entry needs to be 1 instead of 0 Signed-off-by: Hartmut Hackmann --- linux/drivers/media/video/saa7134/saa7134-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index 0e9ee8715..efdfc23db 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -2662,7 +2662,7 @@ struct saa7134_board saa7134_boards[] = { .mpeg = SAA7134_MPEG_DVB, .inputs = {{ .name = name_comp1, - .vmux = 0, + .vmux = 1, .amux = LINE1, },{ .name = name_svideo, -- cgit v1.2.3 From 071e2e8bc4c57532926a7a6e2b502cc065f33fbd Mon Sep 17 00:00:00 2001 From: Hartmut Hackmann Date: Tue, 28 Mar 2006 00:39:30 +0200 Subject: Added support for the new Lifeview hybrid cardbus modules From: Hartmut Hackmann There seem to be many variants of this cards with different feature sets. This entry supports analog TV, CVBS and s-video input, FM radio and DVB-T if they are supported by the hardware. Signed-off-by: Hartmut Hackmann --- linux/drivers/media/video/saa7134/saa7134-cards.c | 48 +++++++++++++++++++++++ linux/drivers/media/video/saa7134/saa7134-dvb.c | 4 ++ linux/drivers/media/video/saa7134/saa7134.h | 1 + 3 files changed, 53 insertions(+) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index efdfc23db..20d0327c4 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -2849,6 +2849,40 @@ struct saa7134_board saa7134_boards[] = { .tuner_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET, }, + [SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS] = { + .name = "LifeView FlyDVB-T Hybrid Cardbus", + .audio_clock = 0x00200000, + .tuner_type = TUNER_PHILIPS_TDA8290, + .radio_type = UNSET, + .tuner_addr = ADDR_UNSET, + .radio_addr = ADDR_UNSET, + .mpeg = SAA7134_MPEG_DVB, + .gpiomask = 0x00600000, /* Bit 21 0=Radio, Bit 22 0=TV */ + .inputs = {{ + .name = name_tv, + .vmux = 1, + .amux = TV, + .gpio = 0x200000, /* GPIO21=High for TV input */ + .tv = 1, + },{ + .name = name_svideo, /* S-Video signal on S-Video input */ + .vmux = 8, + .amux = LINE2, + },{ + .name = name_comp1, /* Composite signal on S-Video input */ + .vmux = 0, + .amux = LINE2, + },{ + .name = name_comp2, /* Composite input */ + .vmux = 3, + .amux = LINE2, + }}, + .radio = { + .name = name_radio, + .amux = TV, + .gpio = 0x000000, /* GPIO21=Low for FM radio antenna */ + }, + }, }; const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); @@ -3385,6 +3419,18 @@ struct pci_device_id saa7134_pci_tbl[] = { .subvendor = 0x5168, /* Animation Technologies (LifeView) */ .subdevice = 0x0304, .driver_data = SAA7134_BOARD_FLYTVPLATINUM_FM, + },{ + .vendor = PCI_VENDOR_ID_PHILIPS, + .device = PCI_DEVICE_ID_PHILIPS_SAA7133, + .subvendor = 0x5168, + .subdevice = 0x3306, + .driver_data = SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS, + },{ + .vendor = PCI_VENDOR_ID_PHILIPS, + .device = PCI_DEVICE_ID_PHILIPS_SAA7133, + .subvendor = 0x5168, + .subdevice = 0x3502, /* whats the difference to 0x3306 ?*/ + .driver_data = SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS, },{ /* --- boards without eeprom + subsystem ID --- */ .vendor = PCI_VENDOR_ID_PHILIPS, @@ -3552,6 +3598,7 @@ int saa7134_board_init1(struct saa7134_dev *dev) saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x06); break; case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: + case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: saa_writeb(SAA7134_GPIO_GPMODE3, 0x08); saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x00); break; @@ -3723,6 +3770,7 @@ int saa7134_board_init2(struct saa7134_dev *dev) } break; case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: + case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: /* make the tda10046 find its eeprom */ { u8 data[] = { 0x3c, 0x33, 0x62}; diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c index 1697fe6f8..9cbc8343d 100644 --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c @@ -1066,6 +1066,10 @@ static int dvb_init(struct saa7134_dev *dev) dev->dvb.frontend = tda10046_attach(&tevion_dvbt220rf_config, &dev->i2c_adap); break; + case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: + dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config, + &dev->i2c_adap); + break; #endif #ifdef HAVE_NXT200X case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180: diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index cbcf9adf7..703b28731 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -230,6 +230,7 @@ struct saa7134_format { #define SAA7134_BOARD_AVERMEDIA_A169_B 91 #define SAA7134_BOARD_AVERMEDIA_A169_B1 92 #define SAA7134_BOARD_MD7134_BRIDGE_2 93 +#define SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS 94 #define SAA7134_MAXBOARDS 8 #define SAA7134_INPUT_MAX 8 -- cgit v1.2.3 From 51f36ae06143e1dd3b668635d02831f0e3d617f9 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 28 Mar 2006 10:02:28 -0300 Subject: Fix default values for tvp5150 controls From: Mauro Carvalho Chehab Default values were wrong. Fixing it. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/tvp5150.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/tvp5150.c b/linux/drivers/media/video/tvp5150.c index 571ed11dd..8a6c5c0d0 100644 --- a/linux/drivers/media/video/tvp5150.c +++ b/linux/drivers/media/video/tvp5150.c @@ -80,7 +80,7 @@ static struct v4l2_queryctrl tvp5150_qctrl[] = { .minimum = 0, .maximum = 255, .step = 1, - .default_value = 0, + .default_value = 128, .flags = 0, }, { .id = V4L2_CID_CONTRAST, @@ -89,7 +89,7 @@ static struct v4l2_queryctrl tvp5150_qctrl[] = { .minimum = 0, .maximum = 255, .step = 0x1, - .default_value = 0x10, + .default_value = 128, .flags = 0, }, { .id = V4L2_CID_SATURATION, @@ -98,7 +98,7 @@ static struct v4l2_queryctrl tvp5150_qctrl[] = { .minimum = 0, .maximum = 255, .step = 0x1, - .default_value = 0x10, + .default_value = 128, .flags = 0, }, { .id = V4L2_CID_HUE, @@ -107,7 +107,7 @@ static struct v4l2_queryctrl tvp5150_qctrl[] = { .minimum = -128, .maximum = 127, .step = 0x1, - .default_value = 0x10, + .default_value = 0, .flags = 0, } }; -- cgit v1.2.3 From 5dd31c09dfb61c90f4d5e8a8f51824647cc9a3ad Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 28 Mar 2006 11:33:49 -0300 Subject: Only saa7134-dvb depends on FW_LOADER. Fixing. From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/saa7134/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/saa7134/Kconfig b/linux/drivers/media/video/saa7134/Kconfig index 263498660..e1c1805df 100644 --- a/linux/drivers/media/video/saa7134/Kconfig +++ b/linux/drivers/media/video/saa7134/Kconfig @@ -5,7 +5,6 @@ config VIDEO_SAA7134 select VIDEO_IR select VIDEO_TUNER select CRC32 - select FW_LOADER ---help--- This is a video4linux driver for Philips SAA713x based TV cards. @@ -40,6 +39,7 @@ config VIDEO_SAA7134_DVB tristate "DVB/ATSC Support for saa7134 based TV cards" depends on VIDEO_SAA7134 && DVB_CORE select VIDEO_BUF_DVB + select FW_LOADER ---help--- This adds support for DVB cards based on the Philips saa7134 chip. -- cgit v1.2.3 From 69325b06271b237759dcca0a35907568b8700ac8 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 28 Mar 2006 13:35:41 -0300 Subject: Those files were modified only at -git. Updating v4l-dvb From: Mauro Carvalho Chehab kernel-sync Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/Kconfig | 234 ++++++++++++++++++++++++++++++++++++- linux/drivers/media/video/Makefile | 20 +++- 2 files changed, 249 insertions(+), 5 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/Kconfig b/linux/drivers/media/video/Kconfig index 762e35670..f31a19890 100644 --- a/linux/drivers/media/video/Kconfig +++ b/linux/drivers/media/video/Kconfig @@ -291,10 +291,6 @@ config VIDEO_HEXIUM_GEMINI source "drivers/media/video/cx88/Kconfig" -source "drivers/media/video/em28xx/Kconfig" - -source "drivers/media/video/pvrusb2/Kconfig" - config VIDEO_OVCAMCHIP tristate "OmniVision Camera Chip support" depends on VIDEO_DEV && I2C @@ -369,4 +365,234 @@ config VIDEO_SAA7127 To compile this driver as a module, choose M here: the module will be called saa7127 +# +# USB Multimedia device configuration +# + +menu "V4L USB devices" + depends on USB && VIDEO_DEV + +source "drivers/media/video/em28xx/Kconfig" + +config USB_VICAM + tristate "USB 3com HomeConnect (aka vicam) support (EXPERIMENTAL)" + depends on USB && VIDEO_DEV && EXPERIMENTAL + ---help--- + Say Y here if you have 3com homeconnect camera (vicam). + + This driver uses the Video For Linux API. You must say Y or M to + "Video For Linux" (under Multimedia Devices) to use this driver. + Information on this API and pointers to "v4l" programs may be found + at . + + To compile this driver as a module, choose M here: the + module will be called vicam. + +config USB_DSBR + tristate "D-Link USB FM radio support (EXPERIMENTAL)" + depends on USB && VIDEO_DEV && EXPERIMENTAL + ---help--- + Say Y here if you want to connect this type of radio to your + computer's USB port. Note that the audio is not digital, and + you must connect the line out connector to a sound card or a + set of speakers. + + This driver uses the Video For Linux API. You must enable + (Y or M in config) Video For Linux (under Character Devices) + to use this driver. Information on this API and pointers to + "v4l" programs may be found at + . + + To compile this driver as a module, choose M here: the + module will be called dsbr100. + +config USB_ET61X251 + tristate "USB ET61X[12]51 PC Camera Controller support" + depends on USB && VIDEO_DEV + ---help--- + Say Y here if you want support for cameras based on Etoms ET61X151 + or ET61X251 PC Camera Controllers. + + See for more informations. + + This driver uses the Video For Linux API. You must say Y or M to + "Video For Linux" to use this driver. + + To compile this driver as a module, choose M here: the + module will be called et61x251. + +config USB_IBMCAM + tristate "USB IBM (Xirlink) C-it Camera support" + depends on USB && VIDEO_DEV + ---help--- + Say Y here if you want to connect a IBM "C-It" camera, also known as + "Xirlink PC Camera" to your computer's USB port. For more + information, read . + + This driver uses the Video For Linux API. You must enable + (Y or M in config) Video For Linux (under Character Devices) + to use this driver. Information on this API and pointers to + "v4l" programs may be found at + . + + To compile this driver as a module, choose M here: the + module will be called ibmcam. + + This camera has several configuration options which + can be specified when you load the module. Read + to learn more. + +config USB_KONICAWC + tristate "USB Konica Webcam support" + depends on USB && VIDEO_DEV + ---help--- + Say Y here if you want support for webcams based on a Konica + chipset. This is known to work with the Intel YC76 webcam. + + This driver uses the Video For Linux API. You must enable + (Y or M in config) Video For Linux (under Character Devices) + to use this driver. Information on this API and pointers to + "v4l" programs may be found at + . + + To compile this driver as a module, choose M here: the + module will be called konicawc. + +config USB_OV511 + tristate "USB OV511 Camera support" + depends on USB && VIDEO_DEV + ---help--- + Say Y here if you want to connect this type of camera to your + computer's USB port. See for more + information and for a list of supported cameras. + + This driver uses the Video For Linux API. You must say Y or M to + "Video For Linux" (under Character Devices) to use this driver. + Information on this API and pointers to "v4l" programs may be found + at . + + To compile this driver as a module, choose M here: the + module will be called ov511. + +config USB_SE401 + tristate "USB SE401 Camera support" + depends on USB && VIDEO_DEV + ---help--- + Say Y here if you want to connect this type of camera to your + computer's USB port. See for more + information and for a list of supported cameras. + + This driver uses the Video For Linux API. You must say Y or M to + "Video For Linux" (under Multimedia Devices) to use this driver. + Information on this API and pointers to "v4l" programs may be found + at . + + To compile this driver as a module, choose M here: the + module will be called se401. + +config USB_SN9C102 + tristate "USB SN9C10x PC Camera Controller support" + depends on USB && VIDEO_DEV + ---help--- + Say Y here if you want support for cameras based on SONiX SN9C101, + SN9C102 or SN9C103 PC Camera Controllers. + + See for more informations. + + This driver uses the Video For Linux API. You must say Y or M to + "Video For Linux" to use this driver. + + To compile this driver as a module, choose M here: the + module will be called sn9c102. + +config USB_STV680 + tristate "USB STV680 (Pencam) Camera support" + depends on USB && VIDEO_DEV + ---help--- + Say Y here if you want to connect this type of camera to your + computer's USB port. This includes the Pencam line of cameras. + See for more information and for + a list of supported cameras. + + This driver uses the Video For Linux API. You must say Y or M to + "Video For Linux" (under Multimedia Devices) to use this driver. + Information on this API and pointers to "v4l" programs may be found + at . + + To compile this driver as a module, choose M here: the + module will be called stv680. + +config USB_W9968CF + tristate "USB W996[87]CF JPEG Dual Mode Camera support" + depends on USB && VIDEO_DEV && I2C && VIDEO_OVCAMCHIP + ---help--- + Say Y here if you want support for cameras based on OV681 or + Winbond W9967CF/W9968CF JPEG USB Dual Mode Camera Chips. + + This driver has an optional plugin, which is distributed as a + separate module only (released under GPL). It allows to use higher + resolutions and framerates, but cannot be included in the official + Linux kernel for performance purposes. + + See for more informations. + + This driver uses the Video For Linux and the I2C APIs. It needs the + OmniVision Camera Chip support as well. You must say Y or M to + "Video For Linux", "I2C Support" and "OmniVision Camera Chip + support" to use this driver. + + To compile this driver as a module, choose M here: the + module will be called w9968cf. + +config USB_ZC0301 + tristate "USB ZC0301 Image Processor and Control Chip support" + depends on USB && VIDEO_DEV + ---help--- + Say Y here if you want support for cameras based on the ZC0301 + Image Processor and Control Chip. + + See for more informations. + + This driver uses the Video For Linux API. You must say Y or M to + "Video For Linux" to use this driver. + + To compile this driver as a module, choose M here: the + module will be called zc0301. + +config USB_PWC + tristate "USB Philips Cameras" + depends on USB && VIDEO_DEV + ---help--- + Say Y or M here if you want to use one of these Philips & OEM + webcams: + * Philips PCA645, PCA646 + * Philips PCVC675, PCVC680, PCVC690 + * Philips PCVC720/40, PCVC730, PCVC740, PCVC750 + * Askey VC010 + * Logitech QuickCam Pro 3000, 4000, 'Zoom', 'Notebook Pro' + and 'Orbit'/'Sphere' + * Samsung MPC-C10, MPC-C30 + * Creative Webcam 5, Pro Ex + * SOTEC Afina Eye + * Visionite VCS-UC300, VCS-UM100 + + The PCA635, PCVC665 and PCVC720/20 are not supported by this driver + and never will be, but the 665 and 720/20 are supported by other + drivers. + + See for more information and + installation instructions. + + The built-in microphone is enabled by selecting USB Audio support. + + This driver uses the Video For Linux API. You must say Y or M to + "Video For Linux" (under Character Devices) to use this driver. + Information on this API and pointers to "v4l" programs may be found + at . + + To compile this driver as a module, choose M here: the + module will be called pwc. + +endmenu # V4L USB devices + endmenu diff --git a/linux/drivers/media/video/Makefile b/linux/drivers/media/video/Makefile index 27e7b37b1..1c0e72e5a 100644 --- a/linux/drivers/media/video/Makefile +++ b/linux/drivers/media/video/Makefile @@ -42,7 +42,6 @@ obj-$(CONFIG_VIDEO_SAA7134) += ir-kbd-i2c.o saa7134/ obj-$(CONFIG_VIDEO_CX88) += cx88/ obj-$(CONFIG_VIDEO_EM28XX) += em28xx/ obj-$(CONFIG_VIDEO_EM28XX) += tvp5150.o -obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2/ obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o obj-$(CONFIG_VIDEO_WM8775) += wm8775.o @@ -66,4 +65,23 @@ obj-$(CONFIG_VIDEO_CX25840) += cx25840/ obj-$(CONFIG_VIDEO_SAA711X) += saa7115.o obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o +et61x251-objs := et61x251_core.o et61x251_tas5130d1b.o +zc0301-objs := zc0301_core.o zc0301_pas202bcb.o + +obj-$(CONFIG_USB_DABUSB) += dabusb.o +obj-$(CONFIG_USB_DSBR) += dsbr100.o +obj-$(CONFIG_USB_OV511) += ov511.o +obj-$(CONFIG_USB_SE401) += se401.o +obj-$(CONFIG_USB_STV680) += stv680.o +obj-$(CONFIG_USB_W9968CF) += w9968cf.o + +obj-$(CONFIG_USB_SN9C102) += sn9c102/ +obj-$(CONFIG_USB_ET61X251) += et61x251/ +obj-$(CONFIG_USB_PWC) += pwc/ +obj-$(CONFIG_USB_ZC0301) += zc0301/ + +obj-$(CONFIG_USB_IBMCAM) += usbvideo/ +obj-$(CONFIG_USB_KONICAWC) += usbvideo/ +obj-$(CONFIG_USB_VICAM) += usbvideo/ + EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core -- cgit v1.2.3 From 86cdf6980ce363417a611ef9a6f689875fb1b79e Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Tue, 28 Mar 2006 12:13:08 -0500 Subject: fix pvrusb2 build regression caused by last commit (changeset 4b95340cd669) From: Michael Krufky Signed-off-by: Michael Krufky --- linux/drivers/media/video/Kconfig | 2 ++ linux/drivers/media/video/Makefile | 1 + 2 files changed, 3 insertions(+) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/Kconfig b/linux/drivers/media/video/Kconfig index f31a19890..62e71b527 100644 --- a/linux/drivers/media/video/Kconfig +++ b/linux/drivers/media/video/Kconfig @@ -372,6 +372,8 @@ config VIDEO_SAA7127 menu "V4L USB devices" depends on USB && VIDEO_DEV +source "drivers/media/video/pvrusb2/Kconfig" + source "drivers/media/video/em28xx/Kconfig" config USB_VICAM diff --git a/linux/drivers/media/video/Makefile b/linux/drivers/media/video/Makefile index 1c0e72e5a..289ef1abf 100644 --- a/linux/drivers/media/video/Makefile +++ b/linux/drivers/media/video/Makefile @@ -42,6 +42,7 @@ obj-$(CONFIG_VIDEO_SAA7134) += ir-kbd-i2c.o saa7134/ obj-$(CONFIG_VIDEO_CX88) += cx88/ obj-$(CONFIG_VIDEO_EM28XX) += em28xx/ obj-$(CONFIG_VIDEO_EM28XX) += tvp5150.o +obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2/ obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o obj-$(CONFIG_VIDEO_WM8775) += wm8775.o -- cgit v1.2.3 From c599755e8210ed32a69a488d22dac0aca121fef5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 28 Mar 2006 14:22:59 -0300 Subject: Make code sync with recent ALSA changes on -git From: Mauro Carvalho Chehab kernel-sync Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-alsa.c | 98 ++++++++++++++++++ linux/drivers/media/video/saa7134/saa7134-alsa.c | 120 +++++++++++++++++++++++ linux/drivers/media/video/saa7134/saa7134.h | 6 +- 3 files changed, 223 insertions(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index 8ecdb41af..cd3fa72fc 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -65,7 +65,11 @@ struct cx88_audio_dev { /* audio controls */ int irq; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_card_t *card; +#else + struct snd_card *card; +#endif spinlock_t reg_lock; @@ -84,7 +88,11 @@ struct cx88_audio_dev { struct cx88_buffer *buf; long opened; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_substream_t *substream; +#else + struct snd_pcm_substream *substream; +#endif }; typedef struct cx88_audio_dev snd_cx88_card_t; @@ -101,7 +109,11 @@ typedef struct cx88_audio_dev snd_cx88_card_t; static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 1}; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_card_t *snd_cx88_cards[SNDRV_CARDS]; +#else +static struct snd_card *snd_cx88_cards[SNDRV_CARDS]; +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) static unsigned int dummy; @@ -334,7 +346,11 @@ static int dsp_buffer_free(snd_cx88_card_t *chip) /* * Digital hardware definition */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_pcm_hardware_t snd_cx88_digital_hw = { +#else +static struct snd_pcm_hardware snd_cx88_digital_hw = { +#endif .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | @@ -356,16 +372,28 @@ static snd_pcm_hardware_t snd_cx88_digital_hw = { /* * audio pcm capture runtime free */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static void snd_card_cx88_runtime_free(snd_pcm_runtime_t *runtime) +#else +static void snd_card_cx88_runtime_free(struct snd_pcm_runtime *runtime) +#endif { } /* * audio pcm capture open callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_pcm_open(snd_pcm_substream_t *substream) +#else +static int snd_cx88_pcm_open(struct snd_pcm_substream *substream) +#endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_runtime_t *runtime = substream->runtime; +#else + struct snd_pcm_runtime *runtime = substream->runtime; +#endif int err; if (test_and_set_bit(0, &chip->opened)) @@ -394,7 +422,11 @@ _error: /* * audio close callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_close(snd_pcm_substream_t *substream) +#else +static int snd_cx88_close(struct snd_pcm_substream *substream) +#endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); @@ -407,8 +439,13 @@ static int snd_cx88_close(snd_pcm_substream_t *substream) /* * hw_params callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_hw_params(snd_pcm_substream_t * substream, snd_pcm_hw_params_t * hw_params) +#else +static int snd_cx88_hw_params(struct snd_pcm_substream * substream, + struct snd_pcm_hw_params * hw_params) +#endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); struct cx88_buffer *buf; @@ -467,7 +504,11 @@ static int snd_cx88_hw_params(snd_pcm_substream_t * substream, /* * hw free callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_hw_free(snd_pcm_substream_t * substream) +#else +static int snd_cx88_hw_free(struct snd_pcm_substream * substream) +#endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); @@ -483,7 +524,11 @@ static int snd_cx88_hw_free(snd_pcm_substream_t * substream) /* * prepare callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_prepare(snd_pcm_substream_t *substream) +#else +static int snd_cx88_prepare(struct snd_pcm_substream *substream) +#endif { return 0; } @@ -492,7 +537,11 @@ static int snd_cx88_prepare(snd_pcm_substream_t *substream) /* * trigger callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_card_trigger(snd_pcm_substream_t *substream, int cmd) +#else +static int snd_cx88_card_trigger(struct snd_pcm_substream *substream, int cmd) +#endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); int err; @@ -519,10 +568,18 @@ static int snd_cx88_card_trigger(snd_pcm_substream_t *substream, int cmd) /* * pointer callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_pcm_uframes_t snd_cx88_pointer(snd_pcm_substream_t *substream) +#else +static snd_pcm_uframes_t snd_cx88_pointer(struct snd_pcm_substream *substream) +#endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_runtime_t *runtime = substream->runtime; +#else + struct snd_pcm_runtime *runtime = substream->runtime; +#endif if (chip->read_count) { chip->read_count -= snd_pcm_lib_period_bytes(substream); @@ -539,7 +596,11 @@ static snd_pcm_uframes_t snd_cx88_pointer(snd_pcm_substream_t *substream) /* * operators */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_pcm_ops_t snd_cx88_pcm_ops = { +#else +static struct snd_pcm_ops snd_cx88_pcm_ops = { +#endif .open = snd_cx88_pcm_open, .close = snd_cx88_close, .ioctl = snd_pcm_lib_ioctl, @@ -556,7 +617,11 @@ static snd_pcm_ops_t snd_cx88_pcm_ops = { static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, char *name) { int err; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_t *pcm; +#else + struct snd_pcm *pcm; +#endif err = snd_pcm_new(chip->card, name, device, 0, 1, &pcm); if (err < 0) @@ -571,7 +636,12 @@ static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, char *name) /**************************************************************************** CONTROL INTERFACE ****************************************************************************/ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_capture_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *info) +#else +static int snd_cx88_capture_volume_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *info) +#endif { info->type = SNDRV_CTL_ELEM_TYPE_INTEGER; info->count = 1; @@ -582,7 +652,12 @@ static int snd_cx88_capture_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i } /* OK - TODO: test it */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_capture_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value) +#else +static int snd_cx88_capture_volume_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *value) +#endif { snd_cx88_card_t *chip = snd_kcontrol_chip(kcontrol); struct cx88_core *core=chip->core; @@ -593,7 +668,12 @@ static int snd_cx88_capture_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_va } /* OK - TODO: test it */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_capture_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value) +#else +static int snd_cx88_capture_volume_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *value) +#endif { snd_cx88_card_t *chip = snd_kcontrol_chip(kcontrol); struct cx88_core *core=chip->core; @@ -609,7 +689,11 @@ static int snd_cx88_capture_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_va return v != old_control; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_kcontrol_new_t snd_cx88_capture_volume = { +#else +static struct snd_kcontrol_new snd_cx88_capture_volume = { +#endif .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Capture Volume", .info = snd_cx88_capture_volume_info, @@ -655,7 +739,11 @@ static int snd_cx88_free(snd_cx88_card_t *chip) /* * Component Destructor */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static void snd_cx88_dev_free(snd_card_t * card) +#else +static void snd_cx88_dev_free(struct snd_card * card) +#endif { snd_cx88_card_t *chip = card->private_data; @@ -668,8 +756,14 @@ static void snd_cx88_dev_free(snd_card_t * card) */ static int devno; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci, snd_cx88_card_t **rchip) +#else +static int __devinit snd_cx88_create(struct snd_card *card, + struct pci_dev *pci, + snd_cx88_card_t **rchip) +#endif { snd_cx88_card_t *chip; struct cx88_core *core; @@ -740,7 +834,11 @@ static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci, static int __devinit cx88_audio_initdev(struct pci_dev *pci, const struct pci_device_id *pci_id) { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_card_t *card; +#else + struct snd_card *card; +#endif snd_cx88_card_t *chip; int err; diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index 393a3a3bd..f670f4c8c 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -80,7 +80,11 @@ MODULE_PARM_DESC(enable, "Enable (or not) the SAA7134 capture interface(s)."); */ typedef struct snd_card_saa7134 { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_card_t *card; +#else + struct snd_card *card; +#endif spinlock_t mixer_lock; int mixer_volume[MIXER_ADDR_LAST+1][2]; int capture_source[MIXER_ADDR_LAST+1][2]; @@ -107,10 +111,18 @@ typedef struct snd_card_saa7134_pcm { spinlock_t lock; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_substream_t *substream; +#else + struct snd_pcm_substream *substream; +#endif } snd_card_saa7134_pcm_t; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_card_t *snd_saa7134_cards[SNDRV_CARDS]; +#else +static struct snd_card *snd_saa7134_cards[SNDRV_CARDS]; +#endif /* @@ -263,10 +275,18 @@ out: * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_card_saa7134_capture_trigger(snd_pcm_substream_t * substream, +#else +static int snd_card_saa7134_capture_trigger(struct snd_pcm_substream * substream, +#endif int cmd) { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_runtime_t *runtime = substream->runtime; +#else + struct snd_pcm_runtime *runtime = substream->runtime; +#endif snd_card_saa7134_pcm_t *pcm = runtime->private_data; struct saa7134_dev *dev=pcm->dev; int err = 0; @@ -344,9 +364,17 @@ static int dsp_buffer_free(struct saa7134_dev *dev) * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_card_saa7134_capture_prepare(snd_pcm_substream_t * substream) +#else +static int snd_card_saa7134_capture_prepare(struct snd_pcm_substream * substream) +#endif { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_runtime_t *runtime = substream->runtime; +#else + struct snd_pcm_runtime *runtime = substream->runtime; +#endif int bswap, sign; u32 fmt, control; snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); @@ -433,9 +461,18 @@ static int snd_card_saa7134_capture_prepare(snd_pcm_substream_t * substream) * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_pcm_uframes_t snd_card_saa7134_capture_pointer(snd_pcm_substream_t * substream) +#else +static snd_pcm_uframes_t +snd_card_saa7134_capture_pointer(struct snd_pcm_substream * substream) +#endif { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_runtime_t *runtime = substream->runtime; +#else + struct snd_pcm_runtime *runtime = substream->runtime; +#endif snd_card_saa7134_pcm_t *pcm = runtime->private_data; struct saa7134_dev *dev=pcm->dev; @@ -453,7 +490,11 @@ static snd_pcm_uframes_t snd_card_saa7134_capture_pointer(snd_pcm_substream_t * * ALSA hardware capabilities definition */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_pcm_hardware_t snd_card_saa7134_capture = +#else +static struct snd_pcm_hardware snd_card_saa7134_capture = +#endif { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | @@ -476,7 +517,11 @@ static snd_pcm_hardware_t snd_card_saa7134_capture = .periods_max = 1024, }; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static void snd_card_saa7134_runtime_free(snd_pcm_runtime_t *runtime) +#else +static void snd_card_saa7134_runtime_free(struct snd_pcm_runtime *runtime) +#endif { snd_card_saa7134_pcm_t *pcm = runtime->private_data; @@ -493,8 +538,13 @@ static void snd_card_saa7134_runtime_free(snd_pcm_runtime_t *runtime) * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_card_saa7134_hw_params(snd_pcm_substream_t * substream, snd_pcm_hw_params_t * hw_params) +#else +static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, + struct snd_pcm_hw_params * hw_params) +#endif { snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); struct saa7134_dev *dev; @@ -573,7 +623,11 @@ static int snd_card_saa7134_hw_params(snd_pcm_substream_t * substream, * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_card_saa7134_hw_free(snd_pcm_substream_t * substream) +#else +static int snd_card_saa7134_hw_free(struct snd_pcm_substream * substream) +#endif { snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); struct saa7134_dev *dev; @@ -599,7 +653,11 @@ static int snd_card_saa7134_hw_free(snd_pcm_substream_t * substream) * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_card_saa7134_capture_close(snd_pcm_substream_t * substream) +#else +static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream) +#endif { return 0; } @@ -614,9 +672,17 @@ static int snd_card_saa7134_capture_close(snd_pcm_substream_t * substream) * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_card_saa7134_capture_open(snd_pcm_substream_t * substream) +#else +static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream) +#endif { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_runtime_t *runtime = substream->runtime; +#else + struct snd_pcm_runtime *runtime = substream->runtime; +#endif snd_card_saa7134_pcm_t *pcm; snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); struct saa7134_dev *dev = saa7134->dev; @@ -652,7 +718,11 @@ static int snd_card_saa7134_capture_open(snd_pcm_substream_t * substream) * ALSA capture callbacks definition */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_pcm_ops_t snd_card_saa7134_capture_ops = { +#else +static struct snd_pcm_ops snd_card_saa7134_capture_ops = { +#endif .open = snd_card_saa7134_capture_open, .close = snd_card_saa7134_capture_close, .ioctl = snd_pcm_lib_ioctl, @@ -673,7 +743,11 @@ static snd_pcm_ops_t snd_card_saa7134_capture_ops = { static int snd_card_saa7134_pcm(snd_card_saa7134_t *saa7134, int device) { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_t *pcm; +#else + struct snd_pcm *pcm; +#endif int err; if ((err = snd_pcm_new(saa7134->card, "SAA7134 PCM", device, 0, 1, &pcm)) < 0) @@ -691,7 +765,12 @@ static int snd_card_saa7134_pcm(snd_card_saa7134_t *saa7134, int device) .get = snd_saa7134_volume_get, .put = snd_saa7134_volume_put, \ .private_value = addr } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_saa7134_volume_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) +#else +static int snd_saa7134_volume_info(struct snd_kcontrol * kcontrol, + struct snd_ctl_elem_info * uinfo) +#endif { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; @@ -700,7 +779,12 @@ static int snd_saa7134_volume_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_ return 0; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_saa7134_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) +#else +static int snd_saa7134_volume_get(struct snd_kcontrol * kcontrol, + struct snd_ctl_elem_value * ucontrol) +#endif { snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol); int addr = kcontrol->private_value; @@ -710,7 +794,12 @@ static int snd_saa7134_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ return 0; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_saa7134_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) +#else +static int snd_saa7134_volume_put(struct snd_kcontrol * kcontrol, + struct snd_ctl_elem_value * ucontrol) +#endif { snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol); int change, addr = kcontrol->private_value; @@ -741,7 +830,12 @@ static int snd_saa7134_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ .get = snd_saa7134_capsrc_get, .put = snd_saa7134_capsrc_put, \ .private_value = addr } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_saa7134_capsrc_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) +#else +static int snd_saa7134_capsrc_info(struct snd_kcontrol * kcontrol, + struct snd_ctl_elem_info * uinfo) +#endif { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = 2; @@ -750,7 +844,12 @@ static int snd_saa7134_capsrc_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_ return 0; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_saa7134_capsrc_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) +#else +static int snd_saa7134_capsrc_get(struct snd_kcontrol * kcontrol, + struct snd_ctl_elem_value * ucontrol) +#endif { snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol); int addr = kcontrol->private_value; @@ -763,7 +862,12 @@ static int snd_saa7134_capsrc_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ return 0; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) +#else +static int snd_saa7134_capsrc_put(struct snd_kcontrol * kcontrol, + struct snd_ctl_elem_value * ucontrol) +#endif { snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol); int change, addr = kcontrol->private_value; @@ -840,7 +944,11 @@ static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ return change; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_kcontrol_new_t snd_saa7134_controls[] = { +#else +static struct snd_kcontrol_new snd_saa7134_controls[] = { +#endif SAA713x_VOLUME("Video Volume", 0, MIXER_ADDR_TVTUNER), SAA713x_CAPSRC("Video Capture Switch", 0, MIXER_ADDR_TVTUNER), SAA713x_VOLUME("Line Volume", 1, MIXER_ADDR_LINE1), @@ -859,7 +967,11 @@ SAA713x_CAPSRC("Line Capture Switch", 2, MIXER_ADDR_LINE2), static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip) { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_card_t *card = chip->card; +#else + struct snd_card *card = chip->card; +#endif unsigned int idx; int err; @@ -873,7 +985,11 @@ static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip) return 0; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static void snd_saa7134_free(snd_card_t * card) +#else +static void snd_saa7134_free(struct snd_card * card) +#endif { snd_card_saa7134_t *chip = card->private_data; @@ -900,7 +1016,11 @@ static void snd_saa7134_free(snd_card_t * card) static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum) { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_card_t *card; +#else + struct snd_card *card; +#endif snd_card_saa7134_t *chip; int err; diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 703b28731..54070d135 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -412,7 +412,11 @@ struct saa7134_dmasound { unsigned int read_count; void * priv_data; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) - snd_pcm_substream_t *substream; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) + snd_pcm_substream_t *substream; +#else + struct snd_pcm_substream *substream; +#endif #endif }; -- cgit v1.2.3 From f4ab1974fbec51307a7a929e99203da3e4251596 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 28 Mar 2006 14:31:06 -0300 Subject: Wrong version testing... fixed. From: Mauro Carvalho Chehab kernel-sync. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-alsa.c | 46 +++++++++---------- linux/drivers/media/video/saa7134/saa7134-alsa.c | 56 ++++++++++++------------ linux/drivers/media/video/saa7134/saa7134.h | 2 +- 3 files changed, 52 insertions(+), 52 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index cd3fa72fc..80aef2421 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -65,7 +65,7 @@ struct cx88_audio_dev { /* audio controls */ int irq; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_card_t *card; #else struct snd_card *card; @@ -88,7 +88,7 @@ struct cx88_audio_dev { struct cx88_buffer *buf; long opened; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_pcm_substream_t *substream; #else struct snd_pcm_substream *substream; @@ -109,7 +109,7 @@ typedef struct cx88_audio_dev snd_cx88_card_t; static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 1}; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static snd_card_t *snd_cx88_cards[SNDRV_CARDS]; #else static struct snd_card *snd_cx88_cards[SNDRV_CARDS]; @@ -346,7 +346,7 @@ static int dsp_buffer_free(snd_cx88_card_t *chip) /* * Digital hardware definition */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static snd_pcm_hardware_t snd_cx88_digital_hw = { #else static struct snd_pcm_hardware snd_cx88_digital_hw = { @@ -372,7 +372,7 @@ static struct snd_pcm_hardware snd_cx88_digital_hw = { /* * audio pcm capture runtime free */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static void snd_card_cx88_runtime_free(snd_pcm_runtime_t *runtime) #else static void snd_card_cx88_runtime_free(struct snd_pcm_runtime *runtime) @@ -382,14 +382,14 @@ static void snd_card_cx88_runtime_free(struct snd_pcm_runtime *runtime) /* * audio pcm capture open callback */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_cx88_pcm_open(snd_pcm_substream_t *substream) #else static int snd_cx88_pcm_open(struct snd_pcm_substream *substream) #endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_pcm_runtime_t *runtime = substream->runtime; #else struct snd_pcm_runtime *runtime = substream->runtime; @@ -422,7 +422,7 @@ _error: /* * audio close callback */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_cx88_close(snd_pcm_substream_t *substream) #else static int snd_cx88_close(struct snd_pcm_substream *substream) @@ -439,7 +439,7 @@ static int snd_cx88_close(struct snd_pcm_substream *substream) /* * hw_params callback */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_cx88_hw_params(snd_pcm_substream_t * substream, snd_pcm_hw_params_t * hw_params) #else @@ -504,7 +504,7 @@ static int snd_cx88_hw_params(struct snd_pcm_substream * substream, /* * hw free callback */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_cx88_hw_free(snd_pcm_substream_t * substream) #else static int snd_cx88_hw_free(struct snd_pcm_substream * substream) @@ -524,7 +524,7 @@ static int snd_cx88_hw_free(struct snd_pcm_substream * substream) /* * prepare callback */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_cx88_prepare(snd_pcm_substream_t *substream) #else static int snd_cx88_prepare(struct snd_pcm_substream *substream) @@ -537,7 +537,7 @@ static int snd_cx88_prepare(struct snd_pcm_substream *substream) /* * trigger callback */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_cx88_card_trigger(snd_pcm_substream_t *substream, int cmd) #else static int snd_cx88_card_trigger(struct snd_pcm_substream *substream, int cmd) @@ -568,14 +568,14 @@ static int snd_cx88_card_trigger(struct snd_pcm_substream *substream, int cmd) /* * pointer callback */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static snd_pcm_uframes_t snd_cx88_pointer(snd_pcm_substream_t *substream) #else static snd_pcm_uframes_t snd_cx88_pointer(struct snd_pcm_substream *substream) #endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_pcm_runtime_t *runtime = substream->runtime; #else struct snd_pcm_runtime *runtime = substream->runtime; @@ -596,7 +596,7 @@ static snd_pcm_uframes_t snd_cx88_pointer(struct snd_pcm_substream *substream) /* * operators */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static snd_pcm_ops_t snd_cx88_pcm_ops = { #else static struct snd_pcm_ops snd_cx88_pcm_ops = { @@ -617,7 +617,7 @@ static struct snd_pcm_ops snd_cx88_pcm_ops = { static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, char *name) { int err; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_pcm_t *pcm; #else struct snd_pcm *pcm; @@ -636,7 +636,7 @@ static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, char *name) /**************************************************************************** CONTROL INTERFACE ****************************************************************************/ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_cx88_capture_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *info) #else static int snd_cx88_capture_volume_info(struct snd_kcontrol *kcontrol, @@ -652,7 +652,7 @@ static int snd_cx88_capture_volume_info(struct snd_kcontrol *kcontrol, } /* OK - TODO: test it */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_cx88_capture_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value) #else static int snd_cx88_capture_volume_get(struct snd_kcontrol *kcontrol, @@ -668,7 +668,7 @@ static int snd_cx88_capture_volume_get(struct snd_kcontrol *kcontrol, } /* OK - TODO: test it */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_cx88_capture_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value) #else static int snd_cx88_capture_volume_put(struct snd_kcontrol *kcontrol, @@ -689,7 +689,7 @@ static int snd_cx88_capture_volume_put(struct snd_kcontrol *kcontrol, return v != old_control; } -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static snd_kcontrol_new_t snd_cx88_capture_volume = { #else static struct snd_kcontrol_new snd_cx88_capture_volume = { @@ -739,7 +739,7 @@ static int snd_cx88_free(snd_cx88_card_t *chip) /* * Component Destructor */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static void snd_cx88_dev_free(snd_card_t * card) #else static void snd_cx88_dev_free(struct snd_card * card) @@ -756,7 +756,7 @@ static void snd_cx88_dev_free(struct snd_card * card) */ static int devno; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci, snd_cx88_card_t **rchip) #else @@ -834,7 +834,7 @@ static int __devinit snd_cx88_create(struct snd_card *card, static int __devinit cx88_audio_initdev(struct pci_dev *pci, const struct pci_device_id *pci_id) { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_card_t *card; #else struct snd_card *card; diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index f670f4c8c..54fc877ba 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -80,7 +80,7 @@ MODULE_PARM_DESC(enable, "Enable (or not) the SAA7134 capture interface(s)."); */ typedef struct snd_card_saa7134 { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_card_t *card; #else struct snd_card *card; @@ -111,14 +111,14 @@ typedef struct snd_card_saa7134_pcm { spinlock_t lock; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_pcm_substream_t *substream; #else struct snd_pcm_substream *substream; #endif } snd_card_saa7134_pcm_t; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static snd_card_t *snd_saa7134_cards[SNDRV_CARDS]; #else static struct snd_card *snd_saa7134_cards[SNDRV_CARDS]; @@ -275,14 +275,14 @@ out: * */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_card_saa7134_capture_trigger(snd_pcm_substream_t * substream, #else static int snd_card_saa7134_capture_trigger(struct snd_pcm_substream * substream, #endif int cmd) { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_pcm_runtime_t *runtime = substream->runtime; #else struct snd_pcm_runtime *runtime = substream->runtime; @@ -364,13 +364,13 @@ static int dsp_buffer_free(struct saa7134_dev *dev) * */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_card_saa7134_capture_prepare(snd_pcm_substream_t * substream) #else static int snd_card_saa7134_capture_prepare(struct snd_pcm_substream * substream) #endif { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_pcm_runtime_t *runtime = substream->runtime; #else struct snd_pcm_runtime *runtime = substream->runtime; @@ -461,14 +461,14 @@ static int snd_card_saa7134_capture_prepare(struct snd_pcm_substream * substream * */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static snd_pcm_uframes_t snd_card_saa7134_capture_pointer(snd_pcm_substream_t * substream) #else static snd_pcm_uframes_t snd_card_saa7134_capture_pointer(struct snd_pcm_substream * substream) #endif { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_pcm_runtime_t *runtime = substream->runtime; #else struct snd_pcm_runtime *runtime = substream->runtime; @@ -490,7 +490,7 @@ snd_card_saa7134_capture_pointer(struct snd_pcm_substream * substream) * ALSA hardware capabilities definition */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static snd_pcm_hardware_t snd_card_saa7134_capture = #else static struct snd_pcm_hardware snd_card_saa7134_capture = @@ -517,7 +517,7 @@ static struct snd_pcm_hardware snd_card_saa7134_capture = .periods_max = 1024, }; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static void snd_card_saa7134_runtime_free(snd_pcm_runtime_t *runtime) #else static void snd_card_saa7134_runtime_free(struct snd_pcm_runtime *runtime) @@ -538,7 +538,7 @@ static void snd_card_saa7134_runtime_free(struct snd_pcm_runtime *runtime) * */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_card_saa7134_hw_params(snd_pcm_substream_t * substream, snd_pcm_hw_params_t * hw_params) #else @@ -623,7 +623,7 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, * */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_card_saa7134_hw_free(snd_pcm_substream_t * substream) #else static int snd_card_saa7134_hw_free(struct snd_pcm_substream * substream) @@ -653,7 +653,7 @@ static int snd_card_saa7134_hw_free(struct snd_pcm_substream * substream) * */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_card_saa7134_capture_close(snd_pcm_substream_t * substream) #else static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream) @@ -672,13 +672,13 @@ static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream) * */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_card_saa7134_capture_open(snd_pcm_substream_t * substream) #else static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream) #endif { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_pcm_runtime_t *runtime = substream->runtime; #else struct snd_pcm_runtime *runtime = substream->runtime; @@ -718,7 +718,7 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream) * ALSA capture callbacks definition */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static snd_pcm_ops_t snd_card_saa7134_capture_ops = { #else static struct snd_pcm_ops snd_card_saa7134_capture_ops = { @@ -743,7 +743,7 @@ static struct snd_pcm_ops snd_card_saa7134_capture_ops = { static int snd_card_saa7134_pcm(snd_card_saa7134_t *saa7134, int device) { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_pcm_t *pcm; #else struct snd_pcm *pcm; @@ -765,7 +765,7 @@ static int snd_card_saa7134_pcm(snd_card_saa7134_t *saa7134, int device) .get = snd_saa7134_volume_get, .put = snd_saa7134_volume_put, \ .private_value = addr } -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_saa7134_volume_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) #else static int snd_saa7134_volume_info(struct snd_kcontrol * kcontrol, @@ -779,7 +779,7 @@ static int snd_saa7134_volume_info(struct snd_kcontrol * kcontrol, return 0; } -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_saa7134_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) #else static int snd_saa7134_volume_get(struct snd_kcontrol * kcontrol, @@ -794,7 +794,7 @@ static int snd_saa7134_volume_get(struct snd_kcontrol * kcontrol, return 0; } -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_saa7134_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) #else static int snd_saa7134_volume_put(struct snd_kcontrol * kcontrol, @@ -830,7 +830,7 @@ static int snd_saa7134_volume_put(struct snd_kcontrol * kcontrol, .get = snd_saa7134_capsrc_get, .put = snd_saa7134_capsrc_put, \ .private_value = addr } -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_saa7134_capsrc_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) #else static int snd_saa7134_capsrc_info(struct snd_kcontrol * kcontrol, @@ -844,7 +844,7 @@ static int snd_saa7134_capsrc_info(struct snd_kcontrol * kcontrol, return 0; } -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_saa7134_capsrc_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) #else static int snd_saa7134_capsrc_get(struct snd_kcontrol * kcontrol, @@ -862,7 +862,7 @@ static int snd_saa7134_capsrc_get(struct snd_kcontrol * kcontrol, return 0; } -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) #else static int snd_saa7134_capsrc_put(struct snd_kcontrol * kcontrol, @@ -944,7 +944,7 @@ static int snd_saa7134_capsrc_put(struct snd_kcontrol * kcontrol, return change; } -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static snd_kcontrol_new_t snd_saa7134_controls[] = { #else static struct snd_kcontrol_new snd_saa7134_controls[] = { @@ -967,7 +967,7 @@ SAA713x_CAPSRC("Line Capture Switch", 2, MIXER_ADDR_LINE2), static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip) { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_card_t *card = chip->card; #else struct snd_card *card = chip->card; @@ -985,7 +985,7 @@ static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip) return 0; } -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) static void snd_saa7134_free(snd_card_t * card) #else static void snd_saa7134_free(struct snd_card * card) @@ -1016,7 +1016,7 @@ static void snd_saa7134_free(struct snd_card * card) static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum) { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_card_t *card; #else struct snd_card *card; diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 54070d135..8600c57b1 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -412,7 +412,7 @@ struct saa7134_dmasound { unsigned int read_count; void * priv_data; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_pcm_substream_t *substream; #else struct snd_pcm_substream *substream; -- cgit v1.2.3 From fe57e9e343b68651e0666447d96d2db4fbb0a83d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 28 Mar 2006 14:54:46 -0300 Subject: Removing proper __stringfy according with kernel ver From: Mauro Carvalho Chehab kernel-sync Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/tda9840.c | 5 +++++ linux/drivers/media/video/tea6415c.c | 5 +++++ linux/drivers/media/video/tea6420.c | 6 +++++- 3 files changed, 15 insertions(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c index 42a842aec..cc6de147c 100644 --- a/linux/drivers/media/video/tda9840.c +++ b/linux/drivers/media/video/tda9840.c @@ -35,8 +35,13 @@ static int debug = 0; /* insmod parameter */ module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) #define dprintk(args...) \ do { if (debug) { printk("%s: %s()[%d]: ",__stringify(KBUILD_MODNAME), __FUNCTION__, __LINE__); printk(args); } } while (0) +#else +#define dprintk(args...) \ + do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __FUNCTION__, __LINE__); printk(args); } } while (0) +#endif #define SWITCH 0x00 #define LEVEL_ADJUST 0x02 diff --git a/linux/drivers/media/video/tea6415c.c b/linux/drivers/media/video/tea6415c.c index 98434efb0..4e6038324 100644 --- a/linux/drivers/media/video/tea6415c.c +++ b/linux/drivers/media/video/tea6415c.c @@ -37,8 +37,13 @@ static int debug = 0; /* insmod parameter */ module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) #define dprintk(args...) \ do { if (debug) { printk("%s: %s()[%d]: ",__stringify(KBUILD_MODNAME), __FUNCTION__, __LINE__); printk(args); } } while (0) +#else +#define dprintk(args...) \ + do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __FUNCTION__, __LINE__); printk(args); } } while (0) +#endif #define TEA6415C_NUM_INPUTS 8 #define TEA6415C_NUM_OUTPUTS 6 diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c index b5e41f49b..74af061b2 100644 --- a/linux/drivers/media/video/tea6420.c +++ b/linux/drivers/media/video/tea6420.c @@ -37,8 +37,12 @@ static int debug = 0; /* insmod parameter */ module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); -#define dprintk(args...) \ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) do { if (debug) { printk("%s: %s()[%d]: ",__stringify(KBUILD_MODNAME), __FUNCTION__, __LINE__); printk(args); } } while (0) +#else +#define dprintk(args...) \ + do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __FUNCTION__, __LINE__); printk(args); } } while (0) +#endif /* addresses to scan, found only at 0x4c and/or 0x4d (7-Bit) */ static unsigned short normal_i2c[] = { I2C_ADDR_TEA6420_1, I2C_ADDR_TEA6420_2, I2C_CLIENT_END }; -- cgit v1.2.3