summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c b/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
index dde031bb8..05f2cddeb 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
@@ -54,9 +54,8 @@ static void set_input(struct pvr2_v4l_decoder *ctxt)
struct pvr2_hdw *hdw = ctxt->hdw;
struct v4l2_routing route;
- pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_input(%d)",
- hdw->controls[PVR2_CID_INPUT].value);
- switch(hdw->controls[PVR2_CID_INPUT].value){
+ pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_input(%d)",hdw->input_val);
+ switch(hdw->input_val) {
case PVR2_CVAL_INPUT_TV:
route.input = SAA7115_COMPOSITE4;
break;
@@ -79,7 +78,7 @@ static void set_input(struct pvr2_v4l_decoder *ctxt)
static int check_input(struct pvr2_v4l_decoder *ctxt)
{
struct pvr2_hdw *hdw = ctxt->hdw;
- return hdw->controls[PVR2_CID_INPUT].dirty != 0;
+ return hdw->input_dirty != 0;
}
@@ -89,15 +88,18 @@ static void set_audio(struct pvr2_v4l_decoder *ctxt)
struct pvr2_hdw *hdw = ctxt->hdw;
pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_audio %d",
- hdw->controls[PVR2_CID_SRATE].value);
- switch (hdw->controls[PVR2_CID_SRATE].value) {
+ hdw->srate_val);
+ switch (hdw->srate_val) {
default:
- case PVR2_CVAL_SRATE_48:
+ case V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000:
val = 48000;
break;
- case PVR2_CVAL_SRATE_44_1:
+ case V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100:
val = 44100;
break;
+ case V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000:
+ val = 32000;
+ break;
}
pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_AUDIO_CLOCK_FREQ,&val);
}
@@ -106,7 +108,7 @@ static void set_audio(struct pvr2_v4l_decoder *ctxt)
static int check_audio(struct pvr2_v4l_decoder *ctxt)
{
struct pvr2_hdw *hdw = ctxt->hdw;
- return hdw->controls[PVR2_CID_SRATE].dirty != 0;
+ return hdw->srate_dirty != 0;
}
@@ -124,8 +126,8 @@ static const struct pvr2_v4l_decoder_ops decoder_ops[] = {
static void decoder_detach(struct pvr2_v4l_decoder *ctxt)
{
- ctxt->client->handler = 0;
- ctxt->hdw->decoder_ctrl = 0;
+ ctxt->client->handler = NULL;
+ ctxt->hdw->decoder_ctrl = NULL;
kfree(ctxt);
}