diff options
author | UK KIM <w0806.kim@samsung.com> | 2010-10-19 23:47:43 -0700 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2011-11-17 17:50:11 -0800 |
commit | bfaeee91ce5a03c8e0481a1b660c99e7c6b86a35 (patch) | |
tree | 10f880bb3478d471512bf8bd3aceaee10b49aee5 /sound/soc/codecs/wm8994_samsung.c | |
parent | fe9fd2ce97dc63c0862091cd0ba06057a6a412b2 (diff) | |
download | kernel_samsung_crespo-bfaeee91ce5a03c8e0481a1b660c99e7c6b86a35.zip kernel_samsung_crespo-bfaeee91ce5a03c8e0481a1b660c99e7c6b86a35.tar.gz kernel_samsung_crespo-bfaeee91ce5a03c8e0481a1b660c99e7c6b86a35.tar.bz2 |
S5PC11X: SOUND: devide gain table using gain code
devide gain table with default table not to effect default gain table value.
Change-Id: I369fa9e3dfe3c733e0ba6797a44d75b0c26baf15
Signed-off-by: UK KIM <w0806.kim@samsung.com>
Diffstat (limited to 'sound/soc/codecs/wm8994_samsung.c')
-rwxr-xr-x | sound/soc/codecs/wm8994_samsung.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994_samsung.c b/sound/soc/codecs/wm8994_samsung.c index c872249..7eadc6a 100755 --- a/sound/soc/codecs/wm8994_samsung.c +++ b/sound/soc/codecs/wm8994_samsung.c @@ -133,6 +133,8 @@ select_mic_route universal_wm8994_mic_paths[] = { select_clock_control universal_clock_controls = wm8994_configure_clock; +int gain_code; + /* * Implementation of I2C functions */ @@ -1190,6 +1192,28 @@ struct snd_soc_dai wm8994_dai = { .ops = &wm8994_ops, }; +static int __init gain_code_setup(char *str) +{ + + gain_code = 0; + + if (!strcmp(str, "")) { + pr_info("gain_code field is empty. use default value\n"); + return 0; + } + + if (!strcmp(str, "1")) + gain_code = 1; + + return 0; +} +__setup("gain_code=", gain_code_setup); + +int gain_code_check(void) +{ + return gain_code; +} + /* * initialise the WM8994 driver * register the mixer and dsp interfaces with the kernel @@ -1229,6 +1253,8 @@ static int wm8994_init(struct wm8994_priv *wm8994_private, wm8994->ringtone_active = RING_OFF; wm8994->pdata = pdata; + wm8994->gain_code = gain_code_check(); + wm8994->universal_clock_control(codec, CODEC_ON); wm8994->codec_clk = clk_get(NULL, "usb_osc"); |