summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-15 12:58:00 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-15 12:58:00 -0200
commit52227110efbe3a7e7b28a0aa7185b126a6d3b9d7 (patch)
tree4bd7e2d1571aea71deb5dc82ae43db851d7a2e4c /linux
parentdc742d4b0ab1ce74bd3bb1c996b132254a8dc052 (diff)
downloadmediapointer-dvb-s2-52227110efbe3a7e7b28a0aa7185b126a6d3b9d7.tar.gz
mediapointer-dvb-s2-52227110efbe3a7e7b28a0aa7185b126a6d3b9d7.tar.bz2
Add a modprobe option to manually select audio standard
From: Mauro Carvalho Chehab <mchehab@infradead.org> While there's no public API to define audio standard, adds a hack option for select them. This is needed only for NICAM and A2 firmwares, since AM, BTSC and EAIJ are already properly handled, on firmware version 2.7. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/tuner-xc2028.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tuner-xc2028.c b/linux/drivers/media/video/tuner-xc2028.c
index 3378c8d91..40f785bed 100644
--- a/linux/drivers/media/video/tuner-xc2028.c
+++ b/linux/drivers/media/video/tuner-xc2028.c
@@ -36,6 +36,20 @@ static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "enable verbose debug messages");
+static char audio_std[8];
+module_param_string(audio_std, audio_std, sizeof(audio_std), 0);
+MODULE_PARM_DESC(audio_std,
+ "Audio standard. XC3028 audio decoder explicitly "
+ "needs to know what audio\n"
+ "standard is needed for some video standards with audio A2 or NICAM.\n"
+ "The valid values are:\n"
+ "A2\n"
+ "A2/A\n"
+ "A2/B\n"
+ "NICAM\n"
+ "NICAM/A\n"
+ "NICAM/B\n");
+
static LIST_HEAD(xc2028_list);
/* struct for storing firmware table */
struct firmware_description {
@@ -192,6 +206,24 @@ void dump_firm_type(unsigned int type)
printk("SCODE ");
}
+static v4l2_std_id parse_audio_std_option(void)
+{
+ if (strcasecmp(audio_std, "A2"))
+ return V4L2_STD_A2;
+ if (strcasecmp(audio_std, "A2/A"))
+ return V4L2_STD_A2_A;
+ if (strcasecmp(audio_std, "A2/B"))
+ return V4L2_STD_A2_B;
+ if (strcasecmp(audio_std, "NICAM"))
+ return V4L2_STD_NICAM;
+ if (strcasecmp(audio_std, "NICAM/A"))
+ return V4L2_STD_NICAM_A;
+ if (strcasecmp(audio_std, "NICAM/B"))
+ return V4L2_STD_NICAM_B;
+
+ return 0;
+}
+
static void free_firmware(struct xc2028_data *priv)
{
int i;
@@ -625,6 +657,9 @@ static int check_firmware(struct dvb_frontend *fe, enum tuner_mode new_mode,
return 0;
}
+ /* Add audio hack to std mask */
+ std |= parse_audio_std_option();
+
rc = load_firmware(fe, type, &std);
if (rc < 0)
return rc;