aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIstvan Varga <istvan_v@mailbox.hu>2011-06-04 11:15:51 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 16:52:39 -0400
commit923137a4037d1b9f19d175708eeced209dff9320 (patch)
tree6a6d5288b4b77b594f942acf9292f86b9ee5e9c1 /drivers
parent30f544ec56eefc628e73e23324dc18105ad13012 (diff)
[media] xc4000: added audio_std module parameter
The 'audio_std' module parameter makes it possible to fine tune some audio related aspects of the driver, like setting the exact audio standard (NICAM, A2, etc.) to be used for some video standards. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/common/tuners/xc4000.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/common/tuners/xc4000.c b/drivers/media/common/tuners/xc4000.c
index bf3f6f1664cd..2a20d0e63da6 100644
--- a/drivers/media/common/tuners/xc4000.c
+++ b/drivers/media/common/tuners/xc4000.c
@@ -49,6 +49,27 @@ MODULE_PARM_DESC(no_poweroff, "\n\t\t1: keep device energized and with tuner "
49 "\t\t2: powers device off when not used.\n" 49 "\t\t2: powers device off when not used.\n"
50 "\t\t0 (default): use device-specific default mode."); 50 "\t\t0 (default): use device-specific default mode.");
51 51
52#define XC4000_AUDIO_STD_B 1
53#define XC4000_AUDIO_STD_A2 2
54#define XC4000_AUDIO_STD_K3 4
55#define XC4000_AUDIO_STD_L 8
56#define XC4000_AUDIO_STD_INPUT1 16
57#define XC4000_AUDIO_STD_MONO 32
58
59static int audio_std;
60module_param(audio_std, int, 0644);
61MODULE_PARM_DESC(audio_std, "\n\t\tAudio standard. XC4000 audio decoder "
62 "explicitly needs to know\n"
63 "\t\twhat audio standard is needed for some video standards with\n"
64 "\t\taudio A2 or NICAM.\n"
65 "\t\tThe valid settings are a sum of:\n"
66 "\t\t 1: use NICAM/B or A2/B instead of NICAM/A or A2/A\n"
67 "\t\t 2: use A2 instead of NICAM or BTSC\n"
68 "\t\t 4: use SECAM/K3 instead of K1\n"
69 "\t\t 8: use PAL-D/K audio for SECAM-D/K\n"
70 "\t\t16: use FM radio input 1 instead of input 2\n"
71 "\t\t32: use mono audio (the lower three bits are ignored)");
72
52#define XC4000_DEFAULT_FIRMWARE "xc4000.fw" 73#define XC4000_DEFAULT_FIRMWARE "xc4000.fw"
53 74
54static char firmware_name[30]; 75static char firmware_name[30];
@@ -1343,6 +1364,8 @@ tune_channel:
1343 if (priv->card_type == XC4000_CARD_WINFAST_CX88 && 1364 if (priv->card_type == XC4000_CARD_WINFAST_CX88 &&
1344 priv->firm_version == 0x0102) 1365 priv->firm_version == 0x0102)
1345 video_mode &= 0xFEFF; 1366 video_mode &= 0xFEFF;
1367 if (audio_std & XC4000_AUDIO_STD_B)
1368 video_mode |= 0x0080;
1346 } 1369 }
1347 ret = xc_SetTVStandard(priv, video_mode, audio_mode); 1370 ret = xc_SetTVStandard(priv, video_mode, audio_mode);
1348 if (ret != XC_RESULT_SUCCESS) { 1371 if (ret != XC_RESULT_SUCCESS) {