diff options
-rw-r--r-- | linux/arch/arm/mach-pxa/pcm990-baseboard.c | 33 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/af9015.c | 27 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/anysee.c | 30 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 1 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/af9013.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/au8522.c | 133 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/au8522.h | 17 | ||||
-rw-r--r-- | linux/drivers/media/radio/dsbr100.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/radio/radio-mr800.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/radio/radio-zoltrix.c | 17 | ||||
-rw-r--r-- | linux/drivers/media/video/au0828/au0828-dvb.c | 39 | ||||
-rw-r--r-- | linux/drivers/media/video/pxa_camera.c | 12 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-alsa.c | 13 | ||||
-rw-r--r-- | linux/firmware/Makefile | 1 | ||||
-rw-r--r-- | linux/sound/pci/bt87x.c | 5 | ||||
-rw-r--r-- | v4l/compat.h | 13 |
16 files changed, 286 insertions, 70 deletions
diff --git a/linux/arch/arm/mach-pxa/pcm990-baseboard.c b/linux/arch/arm/mach-pxa/pcm990-baseboard.c index 973370295..e8eb8cbc3 100644 --- a/linux/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/linux/arch/arm/mach-pxa/pcm990-baseboard.c @@ -280,8 +280,7 @@ static void pcm990_irq_handler(unsigned int irq, struct irq_desc *desc) GPIO_bit(PCM990_CTRL_INT_IRQ_GPIO); if (likely(pending)) { irq = PCM027_IRQ(0) + __ffs(pending); - desc = irq_desc + irq; - desc_handle_irq(irq, desc); + generic_handle_irq(irq); } pending = (~PCM990_INTSETCLR) & pcm990_irq_enabled; } while (pending); @@ -346,36 +345,10 @@ static struct pxamci_platform_data pcm990_mci_platform_data = { .exit = pcm990_mci_exit, }; -/* - * init OHCI hardware to work with - * - * Note: Only USB port 1 (host only) is connected - * - * GPIO88 (USBHPWR#1): overcurrent in, overcurrent when low - * GPIO89 (USBHPEN#1): power-on out, on when low - */ -static int pcm990_ohci_init(struct device *dev) -{ - /* - * disable USB port 2 and 3 - * power sense is active low - */ - UHCHR = ((UHCHR) | UHCHR_PCPL | UHCHR_PSPL | UHCHR_SSEP2 | - UHCHR_SSEP3) & ~(UHCHR_SSEP1 | UHCHR_SSE); - /* - * wait 10ms after Power on - * overcurrent per port - * power switch per port - */ - UHCRHDA = (5<<24) | (1<<11) | (1<<8); /* FIXME: Required? */ - - return 0; -} - static struct pxaohci_platform_data pcm990_ohci_platform_data = { .port_mode = PMM_PERPORT_MODE, - .init = pcm990_ohci_init, - .exit = NULL, + .flags = ENABLE_PORT1 | POWER_CONTROL_LOW | POWER_SENSE_LOW, + .power_on_delay = 10, }; /* diff --git a/linux/drivers/media/dvb/dvb-usb/af9015.c b/linux/drivers/media/dvb/dvb-usb/af9015.c index 776d01d4a..64d2d0f8c 100644 --- a/linux/drivers/media/dvb/dvb-usb/af9015.c +++ b/linux/drivers/media/dvb/dvb-usb/af9015.c @@ -54,7 +54,6 @@ static struct af9013_config af9015_af9013_config[] = { .output_mode = AF9013_OUTPUT_MODE_USB, .api_version = { 0, 1, 9, 0 }, .gpio[0] = AF9013_GPIO_HI, - .gpio[1] = AF9013_GPIO_LO, .gpio[3] = AF9013_GPIO_TUNER_ON, }, { @@ -662,7 +661,7 @@ static int af9015_download_firmware(struct usb_device *udev, len = remainder; req.data_len = len; - req.data = (fw->data + i * FW_PACKET_MAX_DATA); + req.data = (u8 *)(fw->data + i * FW_PACKET_MAX_DATA); req.addr = addr; addr += FW_PACKET_MAX_DATA; @@ -673,7 +672,6 @@ static int af9015_download_firmware(struct usb_device *udev, goto error; } } - #undef FW_PACKET_MAX_DATA /* firmware loaded, request boot */ req.cmd = BOOT; @@ -744,7 +742,7 @@ static int af9015_read_config(struct usb_device *udev) } } else { switch (udev->descriptor.idVendor) { - case cpu_to_le16(USB_VID_LEADTEK): + case USB_VID_LEADTEK: af9015_properties[i].rc_key_map = af9015_rc_keys_leadtek; af9015_properties[i].rc_key_map_size = @@ -754,9 +752,9 @@ static int af9015_read_config(struct usb_device *udev) af9015_config.ir_table_size = ARRAY_SIZE(af9015_ir_table_leadtek); break; - case cpu_to_le16(USB_VID_VISIONPLUS): + case USB_VID_VISIONPLUS: if (udev->descriptor.idProduct == - cpu_to_le16(USB_PID_AZUREWAVE_AD_TU700)) { + USB_PID_AZUREWAVE_AD_TU700) { af9015_properties[i].rc_key_map = af9015_rc_keys_twinhan; af9015_properties[i].rc_key_map_size = @@ -767,7 +765,7 @@ static int af9015_read_config(struct usb_device *udev) ARRAY_SIZE(af9015_ir_table_twinhan); } break; - case cpu_to_le16(USB_VID_KWORLD_2): + case USB_VID_KWORLD_2: /* TODO: use correct rc keys */ af9015_properties[i].rc_key_map = af9015_rc_keys_twinhan; @@ -780,7 +778,7 @@ static int af9015_read_config(struct usb_device *udev) /* Check USB manufacturer and product strings and try to determine correct remote in case of chip vendor reference IDs are used. */ - case cpu_to_le16(USB_VID_AFATECH): + case USB_VID_AFATECH: memset(manufacturer, 0, sizeof(manufacturer)); usb_string(udev, udev->descriptor.iManufacturer, manufacturer, sizeof(manufacturer)); @@ -1089,7 +1087,7 @@ static struct mxl5005s_config af9015_mxl5003_config = { .xtal_freq = CRYSTAL_FREQ_16000000HZ, .agc_mode = MXL_SINGLE_AGC, .tracking_filter = MXL_TF_DEFAULT, - .rssi_enable = MXL_RSSI_DISABLE, + .rssi_enable = MXL_RSSI_ENABLE, .cap_select = MXL_CAP_SEL_ENABLE, .div_out = MXL_DIV_OUT_4, .clock_out = MXL_CLOCK_OUT_DISABLE, @@ -1106,7 +1104,7 @@ static struct mxl5005s_config af9015_mxl5005_config = { .xtal_freq = CRYSTAL_FREQ_16000000HZ, .agc_mode = MXL_SINGLE_AGC, .tracking_filter = MXL_TF_OFF, - .rssi_enable = MXL_RSSI_DISABLE, + .rssi_enable = MXL_RSSI_ENABLE, .cap_select = MXL_CAP_SEL_ENABLE, .div_out = MXL_DIV_OUT_4, .clock_out = MXL_CLOCK_OUT_DISABLE, @@ -1198,6 +1196,7 @@ static struct usb_device_id af9015_usb_table[] = { {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_VOLAR_X_2)}, {USB_DEVICE(USB_VID_TELESTAR, USB_PID_TELESTAR_STARSTICK_2)}, {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A309)}, +/* 15 */{USB_DEVICE(USB_VID_MSI_2, USB_PID_MSI_DIGI_VOX_MINI_III)}, {0}, }; MODULE_DEVICE_TABLE(usb, af9015_usb_table); @@ -1348,7 +1347,7 @@ static struct dvb_usb_device_properties af9015_properties[] = { .i2c_algo = &af9015_i2c_algo, - .num_device_descs = 5, + .num_device_descs = 6, .devices = { { .name = "Xtensions XD-380", @@ -1375,10 +1374,14 @@ static struct dvb_usb_device_properties af9015_properties[] = { .cold_ids = {&af9015_usb_table[14], NULL}, .warm_ids = {NULL}, }, + { + .name = "MSI Digi VOX mini III", + .cold_ids = {&af9015_usb_table[15], NULL}, + .warm_ids = {NULL}, + }, } } }; -#undef AF9015_DEFAULT_PROPERTIES static int af9015_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) diff --git a/linux/drivers/media/dvb/dvb-usb/anysee.c b/linux/drivers/media/dvb/dvb-usb/anysee.c index 2f408d2e1..c786359fb 100644 --- a/linux/drivers/media/dvb/dvb-usb/anysee.c +++ b/linux/drivers/media/dvb/dvb-usb/anysee.c @@ -41,6 +41,9 @@ static int dvb_usb_anysee_debug; module_param_named(debug, dvb_usb_anysee_debug, int, 0644); MODULE_PARM_DESC(debug, "set debugging level" DVB_USB_DEBUG_STATUS); +int dvb_usb_anysee_delsys; +module_param_named(delsys, dvb_usb_anysee_delsys, int, 0644); +MODULE_PARM_DESC(delsys, "select delivery mode (0=DVB-C, 1=DVB-T)"); DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); static struct mutex anysee_usb_mutex; @@ -178,14 +181,14 @@ static int anysee_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, inc = 1; } if (ret) - return ret; + break; i += inc; } mutex_unlock(&d->i2c_mutex); - return i; + return ret ? ret : i; } static u32 anysee_i2c_func(struct i2c_adapter *adapter) @@ -272,9 +275,11 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) model demod hw firmware 1. E30 MT352 02 0.2.1 2. E30 ZL10353 02 0.2.1 - 3. E30 Plus ZL10353 06 0.1.0 - 4. E30C Plus TDA10023 0a 0.1.0 rev 0.2 - 4. E30C Plus TDA10023 0f 0.1.2 rev 0.4 + 3. E30 Combo ZL10353 0f 0.1.2 DVB-T/C combo + 4. E30 Plus ZL10353 06 0.1.0 + 5. E30C Plus TDA10023 0a 0.1.0 rev 0.2 + E30C Plus TDA10023 0f 0.1.2 rev 0.4 + E30 Combo TDA10023 0f 0.1.2 DVB-T/C combo */ /* Zarlink MT352 DVB-T demod inside of Samsung DNOS404ZH102A NIM */ @@ -293,6 +298,21 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) return 0; } + /* for E30 Combo Plus DVB-T demodulator */ + if (dvb_usb_anysee_delsys) { + ret = anysee_write_reg(adap->dev, 0xb0, 0x01); + if (ret) + return ret; + + /* Zarlink ZL10353 DVB-T demod */ + adap->fe = dvb_attach(zl10353_attach, &anysee_zl10353_config, + &adap->dev->i2c_adap); + if (adap->fe != NULL) { + state->tuner = DVB_PLL_SAMSUNG_DTOS403IH102A; + return 0; + } + } + /* connect demod on IO port D for TDA10023 & ZL10353 */ ret = anysee_write_reg(adap->dev, 0xb0, 0x25); if (ret) diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h index dfaf1d257..7380b94b3 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h @@ -232,5 +232,6 @@ #define USB_PID_DW2102 0x2102 #define USB_PID_XTENSIONS_XD_380 0x0381 #define USB_PID_TELESTAR_STARSTICK_2 0x8000 +#define USB_PID_MSI_DIGI_VOX_MINI_III 0x8807 #endif diff --git a/linux/drivers/media/dvb/frontends/af9013.c b/linux/drivers/media/dvb/frontends/af9013.c index 50e1e3f30..21c1060cf 100644 --- a/linux/drivers/media/dvb/frontends/af9013.c +++ b/linux/drivers/media/dvb/frontends/af9013.c @@ -1490,7 +1490,7 @@ static int af9013_download_firmware(struct af9013_state *state) if (i == packets) /* set size of the last packet */ len = remainder; - data = (fw->data + i * FW_PACKET_MAX_DATA); + data = (u8 *)(fw->data + i * FW_PACKET_MAX_DATA); ret = af9013_write_ofsm_regs(state, addr, data, len); addr += FW_PACKET_MAX_DATA; @@ -1500,8 +1500,6 @@ static int af9013_download_firmware(struct af9013_state *state) } } - #undef FW_PACKET_MAX_DATA - /* request boot firmware */ ret = af9013_write_reg(state, 0xe205, 1); if (ret) diff --git a/linux/drivers/media/dvb/frontends/au8522.c b/linux/drivers/media/dvb/frontends/au8522.c index 78e270ee0..1e3ad2302 100644 --- a/linux/drivers/media/dvb/frontends/au8522.c +++ b/linux/drivers/media/dvb/frontends/au8522.c @@ -40,6 +40,8 @@ struct au8522_state { u32 current_frequency; fe_modulation_t current_modulation; + u32 fe_status; + unsigned int led_state; }; static int debug; @@ -538,11 +540,98 @@ static int au8522_init(struct dvb_frontend *fe) return 0; } +static int au8522_led_gpio_enable(struct au8522_state *state, int onoff) +{ + struct au8522_led_config *led_config = state->config->led_cfg; + u8 val; + + /* bail out if we cant control an LED */ + if (!led_config || !led_config->gpio_output || + !led_config->gpio_output_enable || !led_config->gpio_output_disable) + return 0; + + val = au8522_readreg(state, 0x4000 | + (led_config->gpio_output & ~0xc000)); + if (onoff) { + /* enable GPIO output */ + val &= ~((led_config->gpio_output_enable >> 8) & 0xff); + val |= (led_config->gpio_output_enable & 0xff); + } else { + /* disable GPIO output */ + val &= ~((led_config->gpio_output_disable >> 8) & 0xff); + val |= (led_config->gpio_output_disable & 0xff); + } + return au8522_writereg(state, 0x8000 | + (led_config->gpio_output & ~0xc000), val); +} + +/* led = 0 | off + * led = 1 | signal ok + * led = 2 | signal strong + * led < 0 | only light led if leds are currently off + */ +static int au8522_led_ctrl(struct au8522_state *state, int led) +{ + struct au8522_led_config *led_config = state->config->led_cfg; + int i, ret = 0; + + /* bail out if we cant control an LED */ + if (!led_config || !led_config->gpio_leds || + !led_config->num_led_states || !led_config->led_states) + return 0; + + if (led < 0) { + /* if LED is already lit, then leave it as-is */ + if (state->led_state) + return 0; + else + led *= -1; + } + + /* toggle LED if changing state */ + if (state->led_state != led) { + u8 val; + + dprintk("%s: %d\n", __func__, led); + + au8522_led_gpio_enable(state, 1); + + val = au8522_readreg(state, 0x4000 | + (led_config->gpio_leds & ~0xc000)); + + /* start with all leds off */ + for (i = 0; i < led_config->num_led_states; i++) + val &= ~led_config->led_states[i]; + + /* set selected LED state */ + if (led < led_config->num_led_states) + val |= led_config->led_states[led]; + else if (led_config->num_led_states) + val |= + led_config->led_states[led_config->num_led_states - 1]; + + ret = au8522_writereg(state, 0x8000 | + (led_config->gpio_leds & ~0xc000), val); + if (ret < 0) + return ret; + + state->led_state = led; + + if (led == 0) + au8522_led_gpio_enable(state, 0); + } + + return 0; +} + static int au8522_sleep(struct dvb_frontend *fe) { struct au8522_state *state = fe->demodulator_priv; dprintk("%s()\n", __func__); + /* turn off led */ + au8522_led_ctrl(state, 0); + state->current_frequency = 0; return 0; @@ -592,12 +681,53 @@ static int au8522_read_status(struct dvb_frontend *fe, fe_status_t *status) *status |= FE_HAS_CARRIER | FE_HAS_SIGNAL; break; } + state->fe_status = *status; + + if (*status & FE_HAS_LOCK) + /* turn on LED, if it isn't on already */ + au8522_led_ctrl(state, -1); + else + /* turn off LED */ + au8522_led_ctrl(state, 0); dprintk("%s() status 0x%08x\n", __func__, *status); return 0; } +static int au8522_led_status(struct au8522_state *state, const u16 *snr) +{ + struct au8522_led_config *led_config = state->config->led_cfg; + int led; + u16 strong; + + /* bail out if we cant control an LED */ + if (!led_config) + return 0; + + if (0 == (state->fe_status & FE_HAS_LOCK)) + return au8522_led_ctrl(state, 0); + else if (state->current_modulation == QAM_256) + strong = led_config->qam256_strong; + else if (state->current_modulation == QAM_64) + strong = led_config->qam64_strong; + else /* (state->current_modulation == VSB_8) */ + strong = led_config->vsb8_strong; + + if (*snr >= strong) + led = 2; + else + led = 1; + + if ((state->led_state) && + (((strong < *snr) ? (*snr - strong) : (strong - *snr)) <= 10)) + /* snr didn't change enough to bother + * changing the color of the led */ + return 0; + + return au8522_led_ctrl(state, led); +} + static int au8522_read_snr(struct dvb_frontend *fe, u16 *snr) { struct au8522_state *state = fe->demodulator_priv; @@ -621,6 +751,9 @@ static int au8522_read_snr(struct dvb_frontend *fe, u16 *snr) au8522_readreg(state, 0x4311), snr); + if (state->config->led_cfg) + au8522_led_status(state, snr); + return ret; } diff --git a/linux/drivers/media/dvb/frontends/au8522.h b/linux/drivers/media/dvb/frontends/au8522.h index 595915ade..7b94f554a 100644 --- a/linux/drivers/media/dvb/frontends/au8522.h +++ b/linux/drivers/media/dvb/frontends/au8522.h @@ -30,6 +30,21 @@ enum au8522_if_freq { AU8522_IF_3_25MHZ, }; +struct au8522_led_config { + u16 vsb8_strong; + u16 qam64_strong; + u16 qam256_strong; + + u16 gpio_output; + /* unset hi bits, set low bits */ + u16 gpio_output_enable; + u16 gpio_output_disable; + + u16 gpio_leds; + u8 *led_states; + unsigned int num_led_states; +}; + struct au8522_config { /* the demodulator's i2c address */ u8 demod_address; @@ -39,6 +54,8 @@ struct au8522_config { #define AU8522_DEMODLOCKING 1 u8 status_mode; + struct au8522_led_config *led_cfg; + enum au8522_if_freq vsb_if; enum au8522_if_freq qam_if; }; diff --git a/linux/drivers/media/radio/dsbr100.c b/linux/drivers/media/radio/dsbr100.c index f3af92b59..7172977c7 100644 --- a/linux/drivers/media/radio/dsbr100.c +++ b/linux/drivers/media/radio/dsbr100.c @@ -361,11 +361,15 @@ static int vidioc_s_ctrl(struct file *file, void *priv, switch (ctrl->id) { case V4L2_CID_AUDIO_MUTE: if (ctrl->value) { - if (dsbr100_stop(radio)==-1) + if (dsbr100_stop(radio) == -1) { warn("Radio did not respond properly"); + return -EBUSY; + } } else { - if (dsbr100_start(radio)==-1) + if (dsbr100_start(radio) == -1) { warn("Radio did not respond properly"); + return -EBUSY; + } } return 0; } diff --git a/linux/drivers/media/radio/radio-mr800.c b/linux/drivers/media/radio/radio-mr800.c index a33717c48..2ae8e1447 100644 --- a/linux/drivers/media/radio/radio-mr800.c +++ b/linux/drivers/media/radio/radio-mr800.c @@ -58,6 +58,7 @@ #include <media/v4l2-ioctl.h> #include <linux/usb.h> #include <linux/version.h> /* for KERNEL_VERSION MACRO */ +#include "compat.h" /* driver and module definitions */ #define DRIVER_AUTHOR "Alexey Klimov <klimov.linux@gmail.com>" @@ -159,7 +160,9 @@ static struct usb_driver usb_amradio_driver = { .disconnect = usb_amradio_disconnect, .suspend = usb_amradio_suspend, .resume = usb_amradio_resume, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) .reset_resume = usb_amradio_resume, +#endif .id_table = usb_amradio_device_table, .supports_autosuspend = 1, }; diff --git a/linux/drivers/media/radio/radio-zoltrix.c b/linux/drivers/media/radio/radio-zoltrix.c index 615165b57..61b0366ab 100644 --- a/linux/drivers/media/radio/radio-zoltrix.c +++ b/linux/drivers/media/radio/radio-zoltrix.c @@ -124,8 +124,11 @@ static int zol_setfreq(struct zol_device *dev, unsigned long freq) unsigned int stereo = dev->stereo; int i; - if (freq == 0) - return 1; + if (freq == 0) { + printk(KERN_WARNING "zoltrix: received zero freq. Failed to set.\n"); + return -EINVAL; + } + m = (freq / 160 - 8800) * 2; f = (unsigned long long) m + 0x4d1c; @@ -280,7 +283,10 @@ static int vidioc_s_frequency(struct file *file, void *priv, struct zol_device *zol = video_drvdata(file); zol->curfreq = f->frequency; - zol_setfreq(zol, zol->curfreq); + if (zol_setfreq(zol, zol->curfreq) != 0) { + printk(KERN_WARNING "zoltrix: Set frequency failed.\n"); + return -EINVAL; + } return 0; } @@ -344,7 +350,10 @@ static int vidioc_s_ctrl(struct file *file, void *priv, return 0; } zol->stereo = 1; - zol_setfreq(zol, zol->curfreq); + if (zol_setfreq(zol, zol->curfreq) != 0) { + printk(KERN_WARNING "zoltrix: Set frequency failed.\n"); + return -EINVAL; + } #if 0 /*keep*/ /* FIXME: Implement stereo/mono switch on V4L2 */ if (v->mode & VIDEO_SOUND_STEREO) { diff --git a/linux/drivers/media/video/au0828/au0828-dvb.c b/linux/drivers/media/video/au0828/au0828-dvb.c index 82474a4a8..bc76e4079 100644 --- a/linux/drivers/media/video/au0828/au0828-dvb.c +++ b/linux/drivers/media/video/au0828/au0828-dvb.c @@ -37,11 +37,39 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); #define _AU0828_BULKPIPE 0x83 #define _BULKPIPESIZE 0xe522 +static u8 hauppauge_hvr950q_led_states[] = { + 0x00, /* off */ + 0x02, /* yellow */ + 0x04, /* green */ +}; + +static struct au8522_led_config hauppauge_hvr950q_led_cfg = { + .gpio_output = 0x00e0, + .gpio_output_enable = 0x6006, + .gpio_output_disable = 0x0660, + + .gpio_leds = 0x00e2, + .led_states = hauppauge_hvr950q_led_states, + .num_led_states = sizeof(hauppauge_hvr950q_led_states), + + .vsb8_strong = 20 /* dB */ * 10, + .qam64_strong = 25 /* dB */ * 10, + .qam256_strong = 32 /* dB */ * 10, +}; + static struct au8522_config hauppauge_hvr950q_config = { .demod_address = 0x8e >> 1, .status_mode = AU8522_DEMODLOCKING, .qam_if = AU8522_IF_6MHZ, .vsb_if = AU8522_IF_6MHZ, + .led_cfg = &hauppauge_hvr950q_led_cfg, +}; + +static struct au8522_config fusionhdtv7usb_config = { + .demod_address = 0x8e >> 1, + .status_mode = AU8522_DEMODLOCKING, + .qam_if = AU8522_IF_6MHZ, + .vsb_if = AU8522_IF_6MHZ, }; static struct au8522_config hauppauge_woodbury_config = { @@ -357,7 +385,6 @@ int au0828_dvb_register(struct au0828_dev *dev) switch (dev->board) { case AU0828_BOARD_HAUPPAUGE_HVR850: case AU0828_BOARD_HAUPPAUGE_HVR950Q: - case AU0828_BOARD_DVICO_FUSIONHDTV7: dvb->frontend = dvb_attach(au8522_attach, &hauppauge_hvr950q_config, &dev->i2c_adap); @@ -383,6 +410,16 @@ int au0828_dvb_register(struct au0828_dev *dev) 0x60, &dev->i2c_adap, &hauppauge_woodbury_tunerconfig); break; + case AU0828_BOARD_DVICO_FUSIONHDTV7: + dvb->frontend = dvb_attach(au8522_attach, + &fusionhdtv7usb_config, + &dev->i2c_adap); + if (dvb->frontend != NULL) { + dvb_attach(xc5000_attach, dvb->frontend, + &dev->i2c_adap, + &hauppauge_hvr950q_tunerconfig); + } + break; default: printk(KERN_WARNING "The frontend of your DVB/ATSC card " "isn't supported yet\n"); diff --git a/linux/drivers/media/video/pxa_camera.c b/linux/drivers/media/video/pxa_camera.c index 00aa421fe..08723ed84 100644 --- a/linux/drivers/media/video/pxa_camera.c +++ b/linux/drivers/media/video/pxa_camera.c @@ -1006,9 +1006,9 @@ static int pxa_camera_resume(struct soc_camera_device *icd) struct pxa_camera_dev *pcdev = ici->priv; int i = 0, ret = 0; - DRCMR68 = pcdev->dma_chans[0] | DRCMR_MAPVLD; - DRCMR69 = pcdev->dma_chans[1] | DRCMR_MAPVLD; - DRCMR70 = pcdev->dma_chans[2] | DRCMR_MAPVLD; + DRCMR(68) = pcdev->dma_chans[0] | DRCMR_MAPVLD; + DRCMR(69) = pcdev->dma_chans[1] | DRCMR_MAPVLD; + DRCMR(70) = pcdev->dma_chans[2] | DRCMR_MAPVLD; CICR0 = pcdev->save_cicr[i++] & ~CICR0_ENB; CICR1 = pcdev->save_cicr[i++]; @@ -1152,9 +1152,9 @@ static int pxa_camera_probe(struct platform_device *pdev) pcdev->dma_chans[2] = err; dev_dbg(pcdev->dev, "got DMA channel (V) %d\n", pcdev->dma_chans[2]); - DRCMR68 = pcdev->dma_chans[0] | DRCMR_MAPVLD; - DRCMR69 = pcdev->dma_chans[1] | DRCMR_MAPVLD; - DRCMR70 = pcdev->dma_chans[2] | DRCMR_MAPVLD; + DRCMR(68) = pcdev->dma_chans[0] | DRCMR_MAPVLD; + DRCMR(69) = pcdev->dma_chans[1] | DRCMR_MAPVLD; + DRCMR(70) = pcdev->dma_chans[2] | DRCMR_MAPVLD; /* request irq */ err = request_irq(pcdev->irq, pxa_camera_irq, 0, PXA_CAM_DRV_NAME, diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index 6293eba34..5182d958c 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -493,10 +493,12 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, period_size = params_period_bytes(hw_params); periods = params_periods(hw_params); - snd_assert(period_size >= 0x100 && period_size <= 0x10000, - return -EINVAL); - snd_assert(periods >= 4, return -EINVAL); - snd_assert(period_size * periods <= 1024 * 1024, return -EINVAL); + if (period_size < 0x100 || period_size > 0x10000) + return -EINVAL; + if (periods < 4) + return -EINVAL; + if (period_size * periods > 1024 * 1024) + return -EINVAL; dev = saa7134->dev; @@ -947,7 +949,8 @@ static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip) unsigned int idx; int err; - snd_assert(chip != NULL, return -EINVAL); + if (snd_BUG_ON(!chip)) + return -EINVAL; strcpy(card->mixername, "SAA7134 Mixer"); for (idx = 0; idx < ARRAY_SIZE(snd_saa7134_controls); idx++) { diff --git a/linux/firmware/Makefile b/linux/firmware/Makefile index 9fe86041f..bc3dc8100 100644 --- a/linux/firmware/Makefile +++ b/linux/firmware/Makefile @@ -22,6 +22,7 @@ fw-external-y := $(subst ",,$(CONFIG_EXTRA_FIRMWARE)) fw-shipped-$(CONFIG_ATARI_DSP56K) += dsp56k/bootstrap.bin fw-shipped-$(CONFIG_ATM_AMBASSADOR) += atmsar11.fw +fw-shipped-$(CONFIG_CASSINI) += sun/cassini.bin fw-shipped-$(CONFIG_COMPUTONE) += intelliport2.bin fw-shipped-$(CONFIG_DVB_TTUSB_BUDGET) += ttusb-budget/dspbootcode.bin fw-shipped-$(CONFIG_SMCTR) += tr_smctr.bin diff --git a/linux/sound/pci/bt87x.c b/linux/sound/pci/bt87x.c index c33300f22..6c70b246d 100644 --- a/linux/sound/pci/bt87x.c +++ b/linux/sound/pci/bt87x.c @@ -242,7 +242,6 @@ static inline void snd_bt87x_writel(struct snd_bt87x *chip, u32 reg, u32 value) static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substream *substream, unsigned int periods, unsigned int period_bytes) { - struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream); unsigned int i, offset; u32 *risc; @@ -261,6 +260,7 @@ static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substrea rest = period_bytes; do { u32 cmd, len; + unsigned int addr; len = PAGE_SIZE - (offset % PAGE_SIZE); if (len > rest) @@ -275,7 +275,8 @@ static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substrea if (len == rest) cmd |= RISC_EOL | RISC_IRQ; *risc++ = cpu_to_le32(cmd); - *risc++ = cpu_to_le32((u32)snd_pcm_sgbuf_get_addr(sgbuf, offset)); + addr = snd_pcm_sgbuf_get_addr(substream, offset); + *risc++ = cpu_to_le32(addr); offset += len; rest -= len; } while (rest > 0); diff --git a/v4l/compat.h b/v4l/compat.h index 6e90c0e63..0e2ccd7a9 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -237,4 +237,17 @@ static inline int list_is_singular(const struct list_head *head) #define current_uid() (current->uid) #endif +#ifndef WARN +#define WARN(condition, format...) ({ \ + int __ret_warn_on = !!(condition); \ + if (unlikely(__ret_warn_on)) \ + printk(KERN_WARNING format); \ + unlikely(__ret_warn_on); \ +}) +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) +#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond)) +#endif + #endif |