Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306378
b: refs/heads/master
c: da98350
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed May 14, 2012
1 parent 0558530 commit 5bb2c55
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 155 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: d51dbecc85618a75ec0c76dad27c45d9b8d64c66
refs/heads/master: da983503ba485e3ef50662a65d0d03e80a586387
18 changes: 11 additions & 7 deletions trunk/drivers/media/video/cx231xx/cx231xx-417.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ static int cx231xx_initialize_codec(struct cx231xx *dev)
{
int version;
int retval;
u32 i, data[7];
u32 i;
u32 val = 0;

dprintk(1, "%s()\n", __func__);
Expand Down Expand Up @@ -1154,6 +1154,11 @@ static int cx231xx_initialize_codec(struct cx231xx *dev)
CX231xx_CUSTOM_EXTENSION_USR_DATA, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0);
*/

#if 0
/* TODO */
u32 data[7];

/* Setup to capture VBI */
data[0] = 0x0001BD00;
data[1] = 1; /* frames per interrupt */
Expand All @@ -1162,7 +1167,7 @@ static int cx231xx_initialize_codec(struct cx231xx *dev)
data[4] = 0x206080C0; /* stop codes */
data[5] = 6; /* lines */
data[6] = 64; /* BPL */
/*

cx231xx_api_cmd(dev, CX2341X_ENC_SET_VBI_CONFIG, 7, 0, data[0], data[1],
data[2], data[3], data[4], data[5], data[6]);

Expand All @@ -1175,7 +1180,7 @@ static int cx231xx_initialize_codec(struct cx231xx *dev)
cx231xx_api_cmd(dev, CX2341X_ENC_SET_VBI_LINE, 5, 0,
i | 0x80000000, valid, 0, 0, 0);
}
*/
#endif
/* cx231xx_api_cmd(dev, CX2341X_ENC_MUTE_AUDIO, 1, 0, CX231xx_UNMUTE);
msleep(60);
*/
Expand Down Expand Up @@ -1792,17 +1797,16 @@ static int vidioc_streamon(struct file *file, void *priv,
struct cx231xx_fh *fh = file->private_data;

struct cx231xx *dev = fh->dev;
int rc = 0;
dprintk(3, "enter vidioc_streamon()\n");
cx231xx_set_alt_setting(dev, INDEX_TS1, 0);
rc = cx231xx_set_mode(dev, CX231XX_DIGITAL_MODE);
cx231xx_set_mode(dev, CX231XX_DIGITAL_MODE);
if (dev->USE_ISO)
rc = cx231xx_init_isoc(dev, CX231XX_NUM_PACKETS,
cx231xx_init_isoc(dev, CX231XX_NUM_PACKETS,
CX231XX_NUM_BUFS,
dev->video_mode.max_pkt_size,
cx231xx_isoc_copy);
else {
rc = cx231xx_init_bulk(dev, 320,
cx231xx_init_bulk(dev, 320,
5,
dev->ts1_mode.max_pkt_size,
cx231xx_bulk_copy);
Expand Down
18 changes: 11 additions & 7 deletions trunk/drivers/media/video/cx231xx/cx231xx-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,21 +523,24 @@ static int snd_cx231xx_pcm_close(struct snd_pcm_substream *substream)
static int snd_cx231xx_hw_capture_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params)
{
unsigned int channels, rate, format;
int ret;

dprintk("Setting capture parameters\n");

ret = snd_pcm_alloc_vmalloc_buffer(substream,
params_buffer_bytes(hw_params));
#if 0
/* TODO: set up cx231xx audio chip to deliver the correct audio format,
current default is 48000hz multiplexed => 96000hz mono
which shouldn't matter since analogue TV only supports mono */
unsigned int channels, rate, format;

format = params_format(hw_params);
rate = params_rate(hw_params);
channels = params_channels(hw_params);
#endif

/* TODO: set up cx231xx audio chip to deliver the correct audio format,
current default is 48000hz multiplexed => 96000hz mono
which shouldn't matter since analogue TV only supports mono */
return 0;
return ret;
}

static int snd_cx231xx_hw_capture_free(struct snd_pcm_substream *substream)
Expand Down Expand Up @@ -586,7 +589,7 @@ static int snd_cx231xx_capture_trigger(struct snd_pcm_substream *substream,
int cmd)
{
struct cx231xx *dev = snd_pcm_substream_chip(substream);
int retval;
int retval = 0;

if (dev->state & DEV_DISCONNECTED)
return -ENODEV;
Expand All @@ -601,12 +604,13 @@ static int snd_cx231xx_capture_trigger(struct snd_pcm_substream *substream,
break;
default:
retval = -EINVAL;
break;
}
spin_unlock(&dev->adev.slock);

schedule_work(&dev->wq_trigger);

return 0;
return retval;
}

static snd_pcm_uframes_t snd_cx231xx_capture_pointer(struct snd_pcm_substream
Expand Down
Loading

0 comments on commit 5bb2c55

Please sign in to comment.