summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-03-28 22:05:31 -0600
committerMike Isely <isely@pobox.com>2006-03-28 22:05:31 -0600
commitd213c7fd61512ba8605208f6b785829ff1da017b (patch)
treea8f34ceb8e0d0df1c59aa1dcebf0e52c00fab98f /linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
parent867f09ddc4c765a136402a0bd10a54ec45b7d820 (diff)
downloadmediapointer-dvb-s2-d213c7fd61512ba8605208f6b785829ff1da017b.tar.gz
mediapointer-dvb-s2-d213c7fd61512ba8605208f6b785829ff1da017b.tar.bz2
Major pvrusb2 rework to remove translations
From: Mike Isely <isely@pobox.com> Rework entire internal controls interface to eliminate the need for visibly defined control IDs which must otherwise be translated by the V4L2 public interface. As part of this work, internal structures which mimiced various V4L2 structures (video standards, audio modes) have been reworked to actually use the native structures. This triggered a _significant_ rework for how video standards are dealt with (and what is in place now should be much more flexible and forgiving for various handling less-common video standards). Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-audio.c')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-audio.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c b/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
index 79395d540..ae34ff9e4 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
@@ -37,26 +37,6 @@ struct pvr2_msp3400_handler {
};
-static int xlat_audiomode_to_v4l2(int id)
-{
- switch (id) {
- case PVR2_CVAL_AUDIOMODE_MONO:
- return V4L2_TUNER_MODE_MONO;
- case PVR2_CVAL_AUDIOMODE_STEREO:
- return V4L2_TUNER_MODE_STEREO;
- case PVR2_CVAL_AUDIOMODE_SAP:
- return V4L2_TUNER_MODE_SAP;
- case PVR2_CVAL_AUDIOMODE_LANG1:
- return V4L2_TUNER_MODE_LANG1;
- case PVR2_CVAL_AUDIOMODE_LANG2:
- return V4L2_TUNER_MODE_LANG2;
- case PVR2_CVAL_AUDIOMODE_LANG1_LANG2:
- return V4L2_TUNER_MODE_LANG1_LANG2;
- }
- return V4L2_TUNER_MODE_STEREO;
-}
-
-
/* This function selects the correct audio input source */
static void set_stereo(struct pvr2_msp3400_handler *ctxt)
{
@@ -68,8 +48,7 @@ static void set_stereo(struct pvr2_msp3400_handler *ctxt)
if (hdw->controls[PVR2_CID_INPUT].value == PVR2_CVAL_INPUT_TV) {
struct v4l2_tuner vt;
memset(&vt,0,sizeof(vt));
- vt.audmode = xlat_audiomode_to_v4l2(
- hdw->controls[PVR2_CID_AUDIOMODE].value);
+ vt.audmode = hdw->controls[PVR2_CID_AUDIOMODE].value;
pvr2_i2c_client_cmd(ctxt->client,VIDIOC_S_TUNER,&vt);
}