diff options
Diffstat (limited to 'drivers/media/radio')
-rw-r--r-- | drivers/media/radio/Kconfig | 54 | ||||
-rw-r--r-- | drivers/media/radio/si470x/Kconfig | 6 | ||||
-rw-r--r-- | drivers/media/radio/si4713/Kconfig | 6 | ||||
-rw-r--r-- | drivers/media/radio/si4713/si4713.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/wl128x/fmdrv_common.c | 14 |
5 files changed, 43 insertions, 39 deletions
diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index 9b99dfb2d0c6..9cd00f64af32 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig @@ -7,7 +7,7 @@ menuconfig RADIO_ADAPTERS depends on VIDEO_V4L2 depends on MEDIA_RADIO_SUPPORT default y - ---help--- + help Say Y here to enable selecting AM/FM radio adapters. if RADIO_ADAPTERS && VIDEO_V4L2 @@ -29,7 +29,7 @@ config RADIO_SI476X depends on MFD_SI476X_CORE depends on SND_SOC select SND_SOC_SI476X - ---help--- + help Choose Y here if you have this FM radio chip. In order to control your radio card, you will need to use programs @@ -43,7 +43,7 @@ config RADIO_SI476X config USB_MR800 tristate "AverMedia MR 800 USB FM radio support" depends on USB && VIDEO_V4L2 - ---help--- + 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 @@ -55,7 +55,7 @@ config USB_MR800 config USB_DSBR tristate "D-Link/GemTek USB FM radio support" depends on USB && VIDEO_V4L2 - ---help--- + 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 @@ -68,7 +68,7 @@ config RADIO_MAXIRADIO tristate "Guillemot MAXI Radio FM 2000 radio" depends on VIDEO_V4L2 && PCI select RADIO_TEA575X - ---help--- + help Choose Y here if you have this radio card. This card may also be found as Gemtek PCI FM. @@ -84,7 +84,7 @@ config RADIO_SHARK tristate "Griffin radioSHARK USB radio receiver" depends on USB select RADIO_TEA575X - ---help--- + help Choose Y here if you have this radio receiver. There are 2 versions of this device, this driver is for version 1, @@ -101,7 +101,7 @@ config RADIO_SHARK config RADIO_SHARK2 tristate "Griffin radioSHARK2 USB radio receiver" depends on USB - ---help--- + help Choose Y here if you have this radio receiver. There are 2 versions of this device, this driver is for version 2, @@ -118,7 +118,7 @@ config RADIO_SHARK2 config USB_KEENE tristate "Keene FM Transmitter USB support" depends on USB && VIDEO_V4L2 - ---help--- + help Say Y here if you want to connect this type of FM transmitter to your computer's USB port. @@ -128,7 +128,7 @@ config USB_KEENE config USB_RAREMONO tristate "Thanko's Raremono AM/FM/SW radio support" depends on USB && VIDEO_V4L2 - ---help--- + help The 'Thanko's Raremono' device contains the Si4734 chip from Silicon Labs Inc. It is one of the very few or perhaps the only consumer USB radio device to receive the AM/FM/SW bands. @@ -142,7 +142,7 @@ config USB_RAREMONO config USB_MA901 tristate "Masterkit MA901 USB FM radio support" depends on USB && VIDEO_V4L2 - ---help--- + 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 @@ -154,7 +154,7 @@ config USB_MA901 config RADIO_TEA5764 tristate "TEA5764 I2C FM radio support" depends on I2C && VIDEO_V4L2 - ---help--- + help Say Y here if you want to use the TEA5764 FM chip found in EZX phones. This FM chip is present in EZX phones from Motorola, connected to internal pxa I2C bus. @@ -173,7 +173,7 @@ config RADIO_TEA5764_XTAL config RADIO_SAA7706H tristate "SAA7706H Car Radio DSP" depends on I2C && VIDEO_V4L2 - ---help--- + help Say Y here if you want to use the SAA7706H Car radio Digital Signal Processor, found for instance on the Russellville development board. On the russellville the device is connected to internal @@ -185,7 +185,7 @@ config RADIO_SAA7706H config RADIO_TEF6862 tristate "TEF6862 Car Radio Enhanced Selectivity Tuner" depends on I2C && VIDEO_V4L2 - ---help--- + help Say Y here if you want to use the TEF6862 Car Radio Enhanced Selectivity Tuner, found for instance on the Russellville development board. On the russellville the device is connected to internal @@ -200,7 +200,7 @@ config RADIO_TIMBERDALE depends on I2C # for RADIO_SAA7706H select RADIO_TEF6862 select RADIO_SAA7706H - ---help--- + help This is a kind of umbrella driver for the Radio Tuner and DSP found behind the Timberdale FPGA on the Russellville board. Enabling this driver will automatically select the DSP and tuner. @@ -211,7 +211,7 @@ config RADIO_WL1273 select MFD_CORE select MFD_WL1273_CORE select FW_LOADER - ---help--- + help Choose Y here if you have this FM radio chip. In order to control your radio card, you will need to use programs @@ -233,7 +233,7 @@ menuconfig V4L_RADIO_ISA_DRIVERS bool "ISA radio devices" depends on ISA || COMPILE_TEST default n - ---help--- + help Say Y here to enable support for these ISA drivers. if V4L_RADIO_ISA_DRIVERS @@ -246,7 +246,7 @@ config RADIO_CADET tristate "ADS Cadet AM/FM Tuner" depends on ISA || COMPILE_TEST depends on VIDEO_V4L2 - ---help--- + help Choose Y here if you have one of these AM/FM radio cards, and then fill in the port address below. @@ -258,7 +258,7 @@ config RADIO_RTRACK depends on ISA || COMPILE_TEST depends on VIDEO_V4L2 select RADIO_ISA - ---help--- + help Choose Y here if you have one of these FM radio cards, and then fill in the port address below. @@ -290,7 +290,7 @@ config RADIO_RTRACK2 depends on ISA || COMPILE_TEST depends on VIDEO_V4L2 select RADIO_ISA - ---help--- + help Choose Y here if you have this FM radio card, and then fill in the port address below. @@ -314,7 +314,7 @@ config RADIO_AZTECH depends on ISA || COMPILE_TEST depends on VIDEO_V4L2 select RADIO_ISA - ---help--- + help Choose Y here if you have one of these FM radio cards, and then fill in the port address below. @@ -335,7 +335,7 @@ config RADIO_GEMTEK depends on ISA || COMPILE_TEST depends on VIDEO_V4L2 select RADIO_ISA - ---help--- + help Choose Y here if you have this FM radio card, and then fill in the I/O port address and settings below. The following cards either have GemTek Radio tuner or are rebranded GemTek Radio cards: @@ -377,7 +377,7 @@ config RADIO_MIROPCM20 depends on ISA_DMA_API && VIDEO_V4L2 && SND select SND_ISA select SND_MIRO - ---help--- + help Choose Y here if you have this FM radio card. You also need to enable the ALSA sound system. This choice automatically selects the ALSA sound card driver "Miro miroSOUND PCM1pro/PCM12/PCM20radio" as this @@ -390,7 +390,7 @@ config RADIO_SF16FMI tristate "SF16-FMI/SF16-FMP/SF16-FMD Radio" depends on ISA || COMPILE_TEST depends on VIDEO_V4L2 - ---help--- + help Choose Y here if you have one of these FM radio cards. To compile this driver as a module, choose M here: the @@ -401,7 +401,7 @@ config RADIO_SF16FMR2 depends on ISA || COMPILE_TEST depends on VIDEO_V4L2 select RADIO_TEA575X - ---help--- + help Choose Y here if you have one of these FM radio cards. To compile this driver as a module, choose M here: the @@ -412,7 +412,7 @@ config RADIO_TERRATEC depends on ISA || COMPILE_TEST depends on VIDEO_V4L2 select RADIO_ISA - ---help--- + help Choose Y here if you have this FM radio card. Note: this driver hasn't been tested since a long time due to lack @@ -451,7 +451,7 @@ config RADIO_TYPHOON depends on ISA || COMPILE_TEST depends on VIDEO_V4L2 select RADIO_ISA - ---help--- + help Choose Y here if you have one of these FM radio cards, and then fill in the port address and the frequency used for muting below. @@ -486,7 +486,7 @@ config RADIO_ZOLTRIX depends on ISA || COMPILE_TEST depends on VIDEO_V4L2 select RADIO_ISA - ---help--- + help Choose Y here if you have one of these FM radio cards, and then fill in the port address below. diff --git a/drivers/media/radio/si470x/Kconfig b/drivers/media/radio/si470x/Kconfig index 6dbb158cd2a0..21026488de90 100644 --- a/drivers/media/radio/si470x/Kconfig +++ b/drivers/media/radio/si470x/Kconfig @@ -1,7 +1,7 @@ config RADIO_SI470X tristate "Silicon Labs Si470x FM Radio Receiver support" depends on VIDEO_V4L2 - ---help--- + help This is a driver for devices with the Silicon Labs SI470x chip (either via USB or I2C buses). @@ -15,7 +15,7 @@ config RADIO_SI470X config USB_SI470X tristate "Silicon Labs Si470x FM Radio Receiver support with USB" depends on USB && RADIO_SI470X - ---help--- + help This is a driver for USB devices with the Silicon Labs SI470x chip. Currently these devices are known to work: - 10c4:818a: Silicon Labs USB FM Radio Reference Design @@ -40,7 +40,7 @@ config USB_SI470X config I2C_SI470X tristate "Silicon Labs Si470x FM Radio Receiver support with I2C" depends on I2C && RADIO_SI470X - ---help--- + help This is a driver for I2C devices with the Silicon Labs SI470x chip. diff --git a/drivers/media/radio/si4713/Kconfig b/drivers/media/radio/si4713/Kconfig index 9c8b887cff75..17567c917554 100644 --- a/drivers/media/radio/si4713/Kconfig +++ b/drivers/media/radio/si4713/Kconfig @@ -2,7 +2,7 @@ config USB_SI4713 tristate "Silicon Labs Si4713 FM Radio Transmitter support with USB" depends on USB && I2C && RADIO_SI4713 select I2C_SI4713 - ---help--- + help This is a driver for USB devices with the Silicon Labs SI4713 chip. Currently these devices are known to work. - 10c4:8244: Silicon Labs FM Transmitter USB device. @@ -17,7 +17,7 @@ config PLATFORM_SI4713 tristate "Silicon Labs Si4713 FM Radio Transmitter support with I2C" depends on I2C && RADIO_SI4713 select I2C_SI4713 - ---help--- + help This is a driver for I2C devices with the Silicon Labs SI4713 chip. @@ -30,7 +30,7 @@ config PLATFORM_SI4713 config I2C_SI4713 tristate "Silicon Labs Si4713 FM Radio Transmitter support" depends on I2C && RADIO_SI4713 - ---help--- + help Say Y here if you want support to Si4713 FM Radio Transmitter. This device can transmit audio through FM. It can transmit RDS and RBDS signals as well. This module is the v4l2 radio diff --git a/drivers/media/radio/si4713/si4713.c b/drivers/media/radio/si4713/si4713.c index f4a53f1e856e..a8584371a32d 100644 --- a/drivers/media/radio/si4713/si4713.c +++ b/drivers/media/radio/si4713/si4713.c @@ -1272,7 +1272,7 @@ static int si4713_g_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *vm) if (vm->index > 0) return -EINVAL; - strncpy(vm->name, "FM Modulator", 32); + strscpy(vm->name, "FM Modulator", sizeof(vm->name)); vm->capability = V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_CONTROLS; diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c index 3c8987af3772..053d51a5890a 100644 --- a/drivers/media/radio/wl128x/fmdrv_common.c +++ b/drivers/media/radio/wl128x/fmdrv_common.c @@ -489,7 +489,8 @@ int fmc_send_cmd(struct fmdev *fmdev, u8 fm_op, u16 type, void *payload, return -EIO; } /* Send response data to caller */ - if (response != NULL && response_len != NULL && evt_hdr->dlen) { + if (response != NULL && response_len != NULL && evt_hdr->dlen && + evt_hdr->dlen <= payload_len) { /* Skip header info and copy only response data */ skb_pull(skb, sizeof(struct fm_event_msg_hdr)); memcpy(response, skb->data, evt_hdr->dlen); @@ -583,6 +584,8 @@ static void fm_irq_handle_flag_getcmd_resp(struct fmdev *fmdev) return; fm_evt_hdr = (void *)skb->data; + if (fm_evt_hdr->dlen > sizeof(fmdev->irq_info.flag)) + return; /* Skip header info and copy only response data */ skb_pull(skb, sizeof(struct fm_event_msg_hdr)); @@ -1268,8 +1271,9 @@ static int fm_download_firmware(struct fmdev *fmdev, const u8 *fw_name) switch (action->type) { case ACTION_SEND_COMMAND: /* Send */ - if (fmc_send_cmd(fmdev, 0, 0, action->data, - action->size, NULL, NULL)) + ret = fmc_send_cmd(fmdev, 0, 0, action->data, + action->size, NULL, NULL); + if (ret) goto rel_fw; cmd_cnt++; @@ -1308,7 +1312,7 @@ static int load_default_rx_configuration(struct fmdev *fmdev) static int fm_power_up(struct fmdev *fmdev, u8 mode) { u16 payload; - __be16 asic_id, asic_ver; + __be16 asic_id = 0, asic_ver = 0; int resp_len, ret; u8 fw_name[50]; @@ -1520,7 +1524,7 @@ int fmc_prepare(struct fmdev *fmdev) } ret = 0; - } else if (ret == -1) { + } else if (ret < 0) { fmerr("st_register failed %d\n", ret); return -EAGAIN; } |