Skip to content

Commit 67dd8f3

Browse files
committed
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab: "A series of driver fixes: - fix DVB-S tuning with tda1071 - fix tuner probe on af9035 when the device has a bad eeprom - some fixes for the new si2168/2157 drivers - one Kconfig build fix (for omap4iss) - fixes at vpif error path - don't lock saa7134 ioctl at driver's base core level, as it now uses V4L2 and VB2 locking schema - fix audio at hdpvr driver - fix the aspect ratio at the digital timings table - one new USB ID (at gspca_pac7302): Genius i-Look 317 webcam" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] gspca_pac7302: Add new usb-id for Genius i-Look 317 [media] tda10071: fix returned symbol rate calculation [media] tda10071: fix spec inversion reporting [media] tda10071: add missing DVB-S2/PSK-8 FEC AUTO [media] tda10071: force modulation to QPSK on DVB-S [media] hdpvr: fix two audio bugs [media] davinci: vpif: missing unlocks on error [media] af9035: override tuner id when bad value set into eeprom [media] saa7134: use unlocked_ioctl instead of ioctl [media] media: v4l2-core: v4l2-dv-timings.c: Cleaning up code wrong value used in aspect ratio [media] si2168: firmware download fix [media] si2157: add one missing parenthesis [media] si2168: add one missing parenthesis [media] staging: tighten omap4iss dependencies
2 parents 6890ad4 + 242841d commit 67dd8f3

File tree

13 files changed

+55
-35
lines changed

13 files changed

+55
-35
lines changed

drivers/media/dvb-frontends/si2168.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static int si2168_cmd_execute(struct si2168 *s, struct si2168_cmd *cmd)
6060
jiffies_to_msecs(jiffies) -
6161
(jiffies_to_msecs(timeout) - TIMEOUT));
6262

63-
if (!(cmd->args[0] >> 7) & 0x01) {
63+
if (!((cmd->args[0] >> 7) & 0x01)) {
6464
ret = -ETIMEDOUT;
6565
goto err_mutex_unlock;
6666
}
@@ -485,20 +485,6 @@ static int si2168_init(struct dvb_frontend *fe)
485485
if (ret)
486486
goto err;
487487

488-
cmd.args[0] = 0x05;
489-
cmd.args[1] = 0x00;
490-
cmd.args[2] = 0xaa;
491-
cmd.args[3] = 0x4d;
492-
cmd.args[4] = 0x56;
493-
cmd.args[5] = 0x40;
494-
cmd.args[6] = 0x00;
495-
cmd.args[7] = 0x00;
496-
cmd.wlen = 8;
497-
cmd.rlen = 1;
498-
ret = si2168_cmd_execute(s, &cmd);
499-
if (ret)
500-
goto err;
501-
502488
/* cold state - try to download firmware */
503489
dev_info(&s->client->dev, "%s: found a '%s' in cold state\n",
504490
KBUILD_MODNAME, si2168_ops.info.name);

drivers/media/dvb-frontends/si2168_priv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <linux/firmware.h>
2323
#include <linux/i2c-mux.h>
2424

25-
#define SI2168_FIRMWARE "dvb-demod-si2168-01.fw"
25+
#define SI2168_FIRMWARE "dvb-demod-si2168-02.fw"
2626

2727
/* state struct */
2828
struct si2168 {

drivers/media/dvb-frontends/tda10071.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
668668
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
669669
int ret, i;
670670
u8 mode, rolloff, pilot, inversion, div;
671+
fe_modulation_t modulation;
671672

672673
dev_dbg(&priv->i2c->dev,
673674
"%s: delivery_system=%d modulation=%d frequency=%d symbol_rate=%d inversion=%d pilot=%d rolloff=%d\n",
@@ -702,10 +703,13 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
702703

703704
switch (c->delivery_system) {
704705
case SYS_DVBS:
706+
modulation = QPSK;
705707
rolloff = 0;
706708
pilot = 2;
707709
break;
708710
case SYS_DVBS2:
711+
modulation = c->modulation;
712+
709713
switch (c->rolloff) {
710714
case ROLLOFF_20:
711715
rolloff = 2;
@@ -750,7 +754,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
750754

751755
for (i = 0, mode = 0xff; i < ARRAY_SIZE(TDA10071_MODCOD); i++) {
752756
if (c->delivery_system == TDA10071_MODCOD[i].delivery_system &&
753-
c->modulation == TDA10071_MODCOD[i].modulation &&
757+
modulation == TDA10071_MODCOD[i].modulation &&
754758
c->fec_inner == TDA10071_MODCOD[i].fec) {
755759
mode = TDA10071_MODCOD[i].val;
756760
dev_dbg(&priv->i2c->dev, "%s: mode found=%02x\n",
@@ -834,10 +838,10 @@ static int tda10071_get_frontend(struct dvb_frontend *fe)
834838

835839
switch ((buf[1] >> 0) & 0x01) {
836840
case 0:
837-
c->inversion = INVERSION_OFF;
841+
c->inversion = INVERSION_ON;
838842
break;
839843
case 1:
840-
c->inversion = INVERSION_ON;
844+
c->inversion = INVERSION_OFF;
841845
break;
842846
}
843847

@@ -856,7 +860,7 @@ static int tda10071_get_frontend(struct dvb_frontend *fe)
856860
if (ret)
857861
goto error;
858862

859-
c->symbol_rate = (buf[0] << 16) | (buf[1] << 8) | (buf[2] << 0);
863+
c->symbol_rate = ((buf[0] << 16) | (buf[1] << 8) | (buf[2] << 0)) * 1000;
860864

861865
return ret;
862866
error:

drivers/media/dvb-frontends/tda10071_priv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ static struct tda10071_modcod {
5555
{ SYS_DVBS2, QPSK, FEC_8_9, 0x0a },
5656
{ SYS_DVBS2, QPSK, FEC_9_10, 0x0b },
5757
/* 8PSK */
58+
{ SYS_DVBS2, PSK_8, FEC_AUTO, 0x00 },
5859
{ SYS_DVBS2, PSK_8, FEC_3_5, 0x0c },
5960
{ SYS_DVBS2, PSK_8, FEC_2_3, 0x0d },
6061
{ SYS_DVBS2, PSK_8, FEC_3_4, 0x0e },

drivers/media/pci/saa7134/saa7134-empress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static const struct v4l2_file_operations ts_fops =
179179
.read = vb2_fop_read,
180180
.poll = vb2_fop_poll,
181181
.mmap = vb2_fop_mmap,
182-
.ioctl = video_ioctl2,
182+
.unlocked_ioctl = video_ioctl2,
183183
};
184184

185185
static const struct v4l2_ioctl_ops ts_ioctl_ops = {

drivers/media/platform/davinci/vpif_capture.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)
269269
list_del(&buf->list);
270270
vb2_buffer_done(&buf->vb, VB2_BUF_STATE_QUEUED);
271271
}
272+
spin_unlock_irqrestore(&common->irqlock, flags);
272273

273274
return ret;
274275
}

drivers/media/platform/davinci/vpif_display.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)
233233
list_del(&buf->list);
234234
vb2_buffer_done(&buf->vb, VB2_BUF_STATE_QUEUED);
235235
}
236+
spin_unlock_irqrestore(&common->irqlock, flags);
236237

237238
return ret;
238239
}

drivers/media/tuners/si2157.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static int si2157_cmd_execute(struct si2157 *s, struct si2157_cmd *cmd)
5757
jiffies_to_msecs(jiffies) -
5858
(jiffies_to_msecs(timeout) - TIMEOUT));
5959

60-
if (!(buf[0] >> 7) & 0x01) {
60+
if (!((buf[0] >> 7) & 0x01)) {
6161
ret = -ETIMEDOUT;
6262
goto err_mutex_unlock;
6363
} else {

drivers/media/usb/dvb-usb-v2/af9035.c

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -704,15 +704,41 @@ static int af9035_read_config(struct dvb_usb_device *d)
704704
if (ret < 0)
705705
goto err;
706706

707-
if (tmp == 0x00)
708-
dev_dbg(&d->udev->dev,
709-
"%s: [%d]tuner not set, using default\n",
710-
__func__, i);
711-
else
707+
dev_dbg(&d->udev->dev, "%s: [%d]tuner=%02x\n",
708+
__func__, i, tmp);
709+
710+
/* tuner sanity check */
711+
if (state->chip_type == 0x9135) {
712+
if (state->chip_version == 0x02) {
713+
/* IT9135 BX (v2) */
714+
switch (tmp) {
715+
case AF9033_TUNER_IT9135_60:
716+
case AF9033_TUNER_IT9135_61:
717+
case AF9033_TUNER_IT9135_62:
718+
state->af9033_config[i].tuner = tmp;
719+
break;
720+
}
721+
} else {
722+
/* IT9135 AX (v1) */
723+
switch (tmp) {
724+
case AF9033_TUNER_IT9135_38:
725+
case AF9033_TUNER_IT9135_51:
726+
case AF9033_TUNER_IT9135_52:
727+
state->af9033_config[i].tuner = tmp;
728+
break;
729+
}
730+
}
731+
} else {
732+
/* AF9035 */
712733
state->af9033_config[i].tuner = tmp;
734+
}
713735

714-
dev_dbg(&d->udev->dev, "%s: [%d]tuner=%02x\n",
715-
__func__, i, state->af9033_config[i].tuner);
736+
if (state->af9033_config[i].tuner != tmp) {
737+
dev_info(&d->udev->dev,
738+
"%s: [%d] overriding tuner from %02x to %02x\n",
739+
KBUILD_MODNAME, i, tmp,
740+
state->af9033_config[i].tuner);
741+
}
716742

717743
switch (state->af9033_config[i].tuner) {
718744
case AF9033_TUNER_TUA9001:

drivers/media/usb/gspca/pac7302.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,7 @@ static const struct usb_device_id device_table[] = {
928928
{USB_DEVICE(0x093a, 0x2620)},
929929
{USB_DEVICE(0x093a, 0x2621)},
930930
{USB_DEVICE(0x093a, 0x2622), .driver_info = FL_VFLIP},
931+
{USB_DEVICE(0x093a, 0x2623), .driver_info = FL_VFLIP},
931932
{USB_DEVICE(0x093a, 0x2624), .driver_info = FL_VFLIP},
932933
{USB_DEVICE(0x093a, 0x2625)},
933934
{USB_DEVICE(0x093a, 0x2626)},

drivers/media/usb/hdpvr/hdpvr-video.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static void hdpvr_read_bulk_callback(struct urb *urb)
8282
}
8383

8484
/*=========================================================================*/
85-
/* bufffer bits */
85+
/* buffer bits */
8686

8787
/* function expects dev->io_mutex to be hold by caller */
8888
int hdpvr_cancel_queue(struct hdpvr_device *dev)
@@ -926,7 +926,7 @@ static int hdpvr_s_ctrl(struct v4l2_ctrl *ctrl)
926926
case V4L2_CID_MPEG_AUDIO_ENCODING:
927927
if (dev->flags & HDPVR_FLAG_AC3_CAP) {
928928
opt->audio_codec = ctrl->val;
929-
return hdpvr_set_audio(dev, opt->audio_input,
929+
return hdpvr_set_audio(dev, opt->audio_input + 1,
930930
opt->audio_codec);
931931
}
932932
return 0;
@@ -1198,7 +1198,7 @@ int hdpvr_register_videodev(struct hdpvr_device *dev, struct device *parent,
11981198
v4l2_ctrl_new_std_menu(hdl, &hdpvr_ctrl_ops,
11991199
V4L2_CID_MPEG_AUDIO_ENCODING,
12001200
ac3 ? V4L2_MPEG_AUDIO_ENCODING_AC3 : V4L2_MPEG_AUDIO_ENCODING_AAC,
1201-
0x7, V4L2_MPEG_AUDIO_ENCODING_AAC);
1201+
0x7, ac3 ? dev->options.audio_codec : V4L2_MPEG_AUDIO_ENCODING_AAC);
12021202
v4l2_ctrl_new_std_menu(hdl, &hdpvr_ctrl_ops,
12031203
V4L2_CID_MPEG_VIDEO_ENCODING,
12041204
V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC, 0x3,

drivers/media/v4l2-core/v4l2-dv-timings.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,10 +610,10 @@ struct v4l2_fract v4l2_calc_aspect_ratio(u8 hor_landscape, u8 vert_portrait)
610610
aspect.denominator = 9;
611611
} else if (ratio == 34) {
612612
aspect.numerator = 4;
613-
aspect.numerator = 3;
613+
aspect.denominator = 3;
614614
} else if (ratio == 68) {
615615
aspect.numerator = 15;
616-
aspect.numerator = 9;
616+
aspect.denominator = 9;
617617
} else {
618618
aspect.numerator = hor_landscape + 99;
619619
aspect.denominator = 100;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
config VIDEO_OMAP4
22
bool "OMAP 4 Camera support"
3-
depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && I2C && ARCH_OMAP4
3+
depends on VIDEO_V4L2=y && VIDEO_V4L2_SUBDEV_API && I2C=y && ARCH_OMAP4
44
select VIDEOBUF2_DMA_CONTIG
55
---help---
66
Driver for an OMAP 4 ISS controller.

0 commit comments

Comments
 (0)