Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76418
b: refs/heads/master
c: a82200f
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jan 25, 2008
1 parent 1073fb5 commit 296e900
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6964aa8d4a418d69da1652121940fabc6b5d591
refs/heads/master: a82200fb59e7d12a1365199d9fe350bbf74255e4
35 changes: 35 additions & 0 deletions trunk/drivers/media/video/tuner-xc2028.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,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 {
Expand Down Expand Up @@ -180,6 +194,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;
Expand Down Expand Up @@ -613,6 +645,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;
Expand Down

0 comments on commit 296e900

Please sign in to comment.