Skip to content

Commit

Permalink
Add dump_coef to the available option
Browse files Browse the repository at this point in the history
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
tiwai committed Aug 30, 2019
1 parent 9d79ba4 commit 482cc83
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
21 changes: 14 additions & 7 deletions hda-ctlsh.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,21 +379,28 @@ static void handle_module_option(char *line)
char *opt;

opt = gettoken(&line);
if (!opt) {
usage("option");
return;
}
if (!opt)
goto usage;
if (!strcmp(opt, "power_save")) {
char *p = gettoken(&line);
if (!p)
hda_log(HDA_LOG_INFO, "Power-save = %d\n",
hda_get_power_save());
else
hda_set_power_save(atoi(p));
} else {
hda_log(HDA_LOG_INFO, "Available options: power_save\n");
return;
}
return;
if (!strcmp(opt, "dump_coef")) {
char *p = gettoken(&line);
if (!p)
hda_log(HDA_LOG_INFO, "Dump-COEF = %d\n",
hda_get_dump_coef());
else
hda_set_dump_coef(atoi(p));
return;
}
usage:
hda_log(HDA_LOG_INFO, "Available options: power_save, dump_coef\n");
}

static void set_jack(char *line)
Expand Down
10 changes: 10 additions & 0 deletions hda-emu.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,16 @@ void hda_set_power_save(int val)
#endif /* HDA_OLD_POWER_SAVE */
}

int hda_get_dump_coef(void)
{
return _codec->dump_coef;
}

void hda_set_dump_coef(int val)
{
_codec->dump_coef = val;
}

/*
* proc dump
*/
Expand Down
2 changes: 2 additions & 0 deletions include/hda-log.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ void hda_test_pcm(int stream, int op, int substream,

int hda_get_power_save(void);
void hda_set_power_save(int val);
int hda_get_dump_coef(void);
void hda_set_dump_coef(int val);

struct xhda_codec;

Expand Down

0 comments on commit 482cc83

Please sign in to comment.