diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-15 09:58:00 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:02:12 -0500 |
commit | a82200fb59e7d12a1365199d9fe350bbf74255e4 (patch) | |
tree | 85050e27b746a464448752d9943041a050498bcb /drivers/media/video/tuner-xc2028.c | |
parent | d6964aa8d4a418d69da1652121940fabc6b5d591 (diff) |
V4L/DVB (6605): Add a modprobe option to manually select audio standard
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 'drivers/media/video/tuner-xc2028.c')
-rw-r--r-- | drivers/media/video/tuner-xc2028.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-xc2028.c b/drivers/media/video/tuner-xc2028.c index 492181d8de87..371e822fb4cc 100644 --- a/drivers/media/video/tuner-xc2028.c +++ b/drivers/media/video/tuner-xc2028.c | |||
@@ -28,6 +28,20 @@ static int debug; | |||
28 | module_param(debug, int, 0644); | 28 | module_param(debug, int, 0644); |
29 | MODULE_PARM_DESC(debug, "enable verbose debug messages"); | 29 | MODULE_PARM_DESC(debug, "enable verbose debug messages"); |
30 | 30 | ||
31 | static char audio_std[8]; | ||
32 | module_param_string(audio_std, audio_std, sizeof(audio_std), 0); | ||
33 | MODULE_PARM_DESC(audio_std, | ||
34 | "Audio standard. XC3028 audio decoder explicitly " | ||
35 | "needs to know what audio\n" | ||
36 | "standard is needed for some video standards with audio A2 or NICAM.\n" | ||
37 | "The valid values are:\n" | ||
38 | "A2\n" | ||
39 | "A2/A\n" | ||
40 | "A2/B\n" | ||
41 | "NICAM\n" | ||
42 | "NICAM/A\n" | ||
43 | "NICAM/B\n"); | ||
44 | |||
31 | static LIST_HEAD(xc2028_list); | 45 | static LIST_HEAD(xc2028_list); |
32 | /* struct for storing firmware table */ | 46 | /* struct for storing firmware table */ |
33 | struct firmware_description { | 47 | struct firmware_description { |
@@ -180,6 +194,24 @@ void dump_firm_type(unsigned int type) | |||
180 | printk("SCODE "); | 194 | printk("SCODE "); |
181 | } | 195 | } |
182 | 196 | ||
197 | static v4l2_std_id parse_audio_std_option(void) | ||
198 | { | ||
199 | if (strcasecmp(audio_std, "A2")) | ||
200 | return V4L2_STD_A2; | ||
201 | if (strcasecmp(audio_std, "A2/A")) | ||
202 | return V4L2_STD_A2_A; | ||
203 | if (strcasecmp(audio_std, "A2/B")) | ||
204 | return V4L2_STD_A2_B; | ||
205 | if (strcasecmp(audio_std, "NICAM")) | ||
206 | return V4L2_STD_NICAM; | ||
207 | if (strcasecmp(audio_std, "NICAM/A")) | ||
208 | return V4L2_STD_NICAM_A; | ||
209 | if (strcasecmp(audio_std, "NICAM/B")) | ||
210 | return V4L2_STD_NICAM_B; | ||
211 | |||
212 | return 0; | ||
213 | } | ||
214 | |||
183 | static void free_firmware(struct xc2028_data *priv) | 215 | static void free_firmware(struct xc2028_data *priv) |
184 | { | 216 | { |
185 | int i; | 217 | int i; |
@@ -613,6 +645,9 @@ static int check_firmware(struct dvb_frontend *fe, enum tuner_mode new_mode, | |||
613 | return 0; | 645 | return 0; |
614 | } | 646 | } |
615 | 647 | ||
648 | /* Add audio hack to std mask */ | ||
649 | std |= parse_audio_std_option(); | ||
650 | |||
616 | rc = load_firmware(fe, type, &std); | 651 | rc = load_firmware(fe, type, &std); |
617 | if (rc < 0) | 652 | if (rc < 0) |
618 | return rc; | 653 | return rc; |