summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-03-19 16:41:28 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2006-03-19 16:41:28 +0100
commit09648f958d1c6060e3372c88b6f22b991ee0d633 (patch)
tree4c4136550e85a1752babeba69194657caf1c6a99 /linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
parentfde3e3b6816368fa44ece4a962fd3ef5ed664398 (diff)
parent9000c5024269dbd6f01e6cab6d8eaeb9f90b240f (diff)
downloadmediapointer-dvb-s2-09648f958d1c6060e3372c88b6f22b991ee0d633.tar.gz
mediapointer-dvb-s2-09648f958d1c6060e3372c88b6f22b991ee0d633.tar.bz2
Merge from master
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-audio.c')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-audio.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c b/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
index 79e1bede4..fb69e1ad5 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
@@ -37,21 +37,6 @@ struct pvr2_msp3400_handler {
};
-/*
-
- MCI <isely@pobox.com> 10-Mar-2005 - Rather than operate the msp34xx
- directly, we rely on the msp3400.ko module to do it for us. We
- really have to do this because that $##@!! module is going to attach
- itself to us anyway, so we really can't operate the chip ourselves.
- Unfortunately msp3400.ko is a real train wreck of a piece of code.
- Most of the code below tries to tickle that module in just the right
- way to get the results we need. Yuck. msp3400.c should be taken
- out back and shot. Based on my reading of the actual chip datasheet
- it should in theory be possible to write a far cleaner and simpler
- driver than what is currently there right now.
-
-*/
-
static int xlat_audiomode_to_v4l2(int id)
{
switch (id) {
@@ -76,7 +61,7 @@ static void set_stereo(struct pvr2_msp3400_handler *ctxt)
struct pvr2_hdw *hdw = ctxt->hdw;
struct v4l2_routing route;
- pvr2_trace(PVR2_TRACE_CHIPS,"i2c msp3400 set_stereo");
+ pvr2_trace(PVR2_TRACE_CHIPS,"i2c msp3400 v4l2 set_stereo");
if (hdw->controls[PVR2_CID_INPUT].value == PVR2_CVAL_INPUT_TV) {
struct v4l2_tuner vt;
@@ -161,19 +146,19 @@ static void msp3400_update(struct pvr2_msp3400_handler *ctxt)
}
-/* This reads back the current volume parameters and signal type */
+/* This reads back the current signal type */
static int get_audio_status(struct pvr2_msp3400_handler *ctxt)
{
- struct video_audio vt;
+ struct v4l2_tuner vt;
int stat;
memset(&vt,0,sizeof(vt));
- stat = pvr2_i2c_client_cmd(ctxt->client,VIDIOCGAUDIO,&vt);
+ stat = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_G_TUNER,&vt);
if (stat < 0) return stat;
- ctxt->hdw->flag_stereo = (vt.mode & VIDEO_SOUND_STEREO) != 0;
+ ctxt->hdw->flag_stereo = (vt.audmode & V4L2_TUNER_MODE_STEREO) != 0;
ctxt->hdw->flag_bilingual =
- (vt.mode & (VIDEO_SOUND_LANG1|VIDEO_SOUND_LANG2)) != 0;
+ (vt.audmode & V4L2_TUNER_MODE_LANG2) != 0;
return 0;
}
@@ -189,7 +174,7 @@ static void pvr2_msp3400_detach(struct pvr2_msp3400_handler *ctxt)
static unsigned int pvr2_msp3400_describe(struct pvr2_msp3400_handler *ctxt,
char *buf,unsigned int cnt)
{
- return scnprintf(buf,cnt,"handler: pvrusb2-audio");
+ return scnprintf(buf,cnt,"handler: pvrusb2-audio v4l2");
}
@@ -222,7 +207,7 @@ int pvr2_i2c_msp3400_setup(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp)
sizeof(msp3400_ops[0]))) - 1;
cp->handler = &ctxt->i2c_handler;
hdw->audio_stat = &ctxt->astat;
- pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x msp3400 V4L1 handler set up",
+ pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x msp3400 V4L2 handler set up",
cp->client->addr);
return !0;
}