media fixes for v4.4-rc6
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJWdEIhAAoJEAhfPr2O5OEV+AMP/16Z0z2CTNf+75XmyZpJQyg6 z+K2gfziU/LdRfxN40cDtpBkQf6eSH4MHFhPq0bHUg7yQJinRxJZBJsYZlh6w1K0 714oj5A6QIxdWBUOKMvdHv8j033XB7BYCAOL8eUCebbQ3fvGXPp5bCZZHV/Cxc0c veEhVIMD1EMaJHIWSIAZvQ0ixY5d3c5YrWhJItlsHkwvl8R6vLlSnVTUYGeORN5h P40fS0X2v2w7rhOlGE8pN/3GAYfY3fRy94SBaG6xnOgdvKV/mbw424xkpB+vJ3IQ qHKrVuZVT0dysNXMpOkdfjy1SpJ3iF/scmqSr+OeB/hENrzMs5bgOynmc/ldGkR4 FD3HFZ/3FkpIjtQ0ec9kexFdGF86YzEf6ujr3aX2l8/l75I8APHjt7P80lv6sabr jiPSil0d4g1zd/3UGAeUr+HbiWIP+tDSaJkGUFo5wZz8Q0oHXbTBou4BI11cO2wn CFnPG8PWHE/YVLhkUAz/gkkUnRAqLCi6fWOTwz7oSdxr8Hp85TtG9v47WlZrVM66 StTn8Y7U6FcBC5EU2RL4WWMavOfJOWi7GLp6c+OKcYpL0XI6BG0ViM48pgqgo4I/ Z3p/uN8frZ/VFy628DZUpHs0kZNkvuwPfW9GSrkX1EGGIn/2CpFzJLCt4r5Bi3NY 5GyJisSX1SSaj/25uPtk =81gm -----END PGP SIGNATURE----- Merge tag 'media/v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab. * tag 'media/v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] airspy: increase USB control message buffer size [media] hackrf: move RF gain ctrl enable behind module parameter [media] hackrf: fix possible null ptr on debug printing [media] Revert "[media] ivtv: avoid going past input/audio array"
This commit is contained in:
commit
76b8ebdc4c
|
@ -805,11 +805,11 @@ static void ivtv_init_struct2(struct ivtv *itv)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < IVTV_CARD_MAX_VIDEO_INPUTS - 1; i++)
|
||||
for (i = 0; i < IVTV_CARD_MAX_VIDEO_INPUTS; i++)
|
||||
if (itv->card->video_inputs[i].video_type == 0)
|
||||
break;
|
||||
itv->nof_inputs = i;
|
||||
for (i = 0; i < IVTV_CARD_MAX_AUDIO_INPUTS - 1; i++)
|
||||
for (i = 0; i < IVTV_CARD_MAX_AUDIO_INPUTS; i++)
|
||||
if (itv->card->audio_inputs[i].audio_type == 0)
|
||||
break;
|
||||
itv->nof_audio_inputs = i;
|
||||
|
|
|
@ -134,7 +134,7 @@ struct airspy {
|
|||
int urbs_submitted;
|
||||
|
||||
/* USB control message buffer */
|
||||
#define BUF_SIZE 24
|
||||
#define BUF_SIZE 128
|
||||
u8 buf[BUF_SIZE];
|
||||
|
||||
/* Current configuration */
|
||||
|
|
|
@ -24,6 +24,15 @@
|
|||
#include <media/videobuf2-v4l2.h>
|
||||
#include <media/videobuf2-vmalloc.h>
|
||||
|
||||
/*
|
||||
* Used Avago MGA-81563 RF amplifier could be destroyed pretty easily with too
|
||||
* strong signal or transmitting to bad antenna.
|
||||
* Set RF gain control to 'grabbed' state by default for sure.
|
||||
*/
|
||||
static bool hackrf_enable_rf_gain_ctrl;
|
||||
module_param_named(enable_rf_gain_ctrl, hackrf_enable_rf_gain_ctrl, bool, 0644);
|
||||
MODULE_PARM_DESC(enable_rf_gain_ctrl, "enable RX/TX RF amplifier control (warn: could damage amplifier)");
|
||||
|
||||
/* HackRF USB API commands (from HackRF Library) */
|
||||
enum {
|
||||
CMD_SET_TRANSCEIVER_MODE = 0x01,
|
||||
|
@ -1451,6 +1460,7 @@ static int hackrf_probe(struct usb_interface *intf,
|
|||
dev_err(dev->dev, "Could not initialize controls\n");
|
||||
goto err_v4l2_ctrl_handler_free_rx;
|
||||
}
|
||||
v4l2_ctrl_grab(dev->rx_rf_gain, !hackrf_enable_rf_gain_ctrl);
|
||||
v4l2_ctrl_handler_setup(&dev->rx_ctrl_handler);
|
||||
|
||||
/* Register controls for transmitter */
|
||||
|
@ -1471,6 +1481,7 @@ static int hackrf_probe(struct usb_interface *intf,
|
|||
dev_err(dev->dev, "Could not initialize controls\n");
|
||||
goto err_v4l2_ctrl_handler_free_tx;
|
||||
}
|
||||
v4l2_ctrl_grab(dev->tx_rf_gain, !hackrf_enable_rf_gain_ctrl);
|
||||
v4l2_ctrl_handler_setup(&dev->tx_ctrl_handler);
|
||||
|
||||
/* Register the v4l2_device structure */
|
||||
|
@ -1530,7 +1541,7 @@ err_v4l2_ctrl_handler_free_rx:
|
|||
err_kfree:
|
||||
kfree(dev);
|
||||
err:
|
||||
dev_dbg(dev->dev, "failed=%d\n", ret);
|
||||
dev_dbg(&intf->dev, "failed=%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue