Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219375
b: refs/heads/master
c: f6eeece
h: refs/heads/master
i:
  219373: 661bf7e
  219371: c070270
  219367: 675be9a
  219359: a2a660a
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent 4cb2d10 commit e1693a5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a97781ac918073117bb8e63619c77e0380bbcc8d
refs/heads/master: f6eeece8ec2a323f004265527282f443e083d25a
11 changes: 11 additions & 0 deletions trunk/drivers/media/video/saa7164/saa7164-api.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ int saa7164_api_set_encoder(struct saa7164_port *port)
if (ret != SAA_OK)
printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);

/* Resolution */
ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, SET_CUR,
EU_PROFILE_CONTROL, sizeof(u8), &port->encoder_profile);
if (ret != SAA_OK)
printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);

/* Establish video bitrates */
if (port->encoder_params.bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_CBR)
vb.ucVideoBitRateMode = EU_VIDEO_BIT_RATE_MODE_CONSTANT;
Expand Down Expand Up @@ -110,6 +116,11 @@ int saa7164_api_get_encoder(struct saa7164_port *port)
if (ret != SAA_OK)
printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);

ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, GET_CUR,
EU_VIDEO_RESOLUTION_CONTROL, sizeof(u8), &port->video_resolution);
if (ret != SAA_OK)
printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);

ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, GET_CUR,
EU_VIDEO_FORMAT_CONTROL, sizeof(u8), &port->video_format);
if (ret != SAA_OK)
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/media/video/saa7164/saa7164-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ static void saa7164_work_enchandler(struct work_struct *w)

if (buf->actual_size <= ubuf->actual_size) {

memcpy_fromio(ubuf->data, buf->cpu, ubuf->actual_size);
memcpy_fromio(ubuf->data, port->shadow_buf[rp],
ubuf->actual_size);

/* Throw a new checksum on the read buffer */
ubuf->crc = crc32(0, ubuf->data, ubuf->actual_size);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/saa7164/saa7164-reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
#define EU_PROFILE_CONTROL 0x00
#define EU_VIDEO_FORMAT_CONTROL 0x01
#define EU_VIDEO_BIT_RATE_CONTROL 0x02
#define EU_VIDEO_RESOLUTION_CONTROL 0x03
#define EU_VIDEO_GOP_STRUCTURE_CONTROL 0x04
#define EU_VIDEO_INPUT_ASPECT_CONTROL 0x0A
#define EU_AUDIO_FORMAT_CONTROL 0x0C
Expand Down

0 comments on commit e1693a5

Please sign in to comment.