Commit 24298b0e authored by Lu Guanqun's avatar Lu Guanqun Committed by Greg Kroah-Hartman

intel_sst: move jack detection related configs to init time

The old policy will not enable MIC2BIAS on Moorstown platform
by default, it's only enabled when the user selects HS_MIC as input source.
Therefore when user selects DMIC and then inserts the jack,
no interrupt will be generated to notify the driver about the
jack insertion event and to take action to auto mute the speaker.

The new policy will enable this bit by default,
then no matter what the output device is, an interrupt will be generated.

This behaviour is more likely what a user expects.
Signed-off-by: default avatarLu Guanqun <guanqun.lu@intel.com>
Reviewed-by: default avatarWu Fengguang <fengguang.wu@intel.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 59bd2abe
...@@ -113,18 +113,19 @@ static int nc_init_card(void) ...@@ -113,18 +113,19 @@ static int nc_init_card(void)
{VOICEVOL, 0x0e, 0}, {VOICEVOL, 0x0e, 0},
{HPLVOL, 0x06, 0}, {HPLVOL, 0x06, 0},
{HPRVOL, 0x06, 0}, {HPRVOL, 0x06, 0},
{MICCTRL, 0x41, 0x00}, {MICCTRL, 0x51, 0x00},
{ADCSAMPLERATE, 0x8B, 0x00}, {ADCSAMPLERATE, 0x8B, 0x00},
{MICSELVOL, 0x5B, 0x00}, {MICSELVOL, 0x5B, 0x00},
{LILSEL, 0x06, 0}, {LILSEL, 0x06, 0},
{LIRSEL, 0x46, 0}, {LIRSEL, 0x46, 0},
{LOANTIPOP, 0x00, 0}, {LOANTIPOP, 0x00, 0},
{DMICCTRL1, 0x40, 0}, {DMICCTRL1, 0x40, 0},
{AUXDBNC, 0xff, 0},
}; };
snd_pmic_ops_nc.card_status = SND_CARD_INIT_DONE; snd_pmic_ops_nc.card_status = SND_CARD_INIT_DONE;
snd_pmic_ops_nc.master_mute = UNMUTE; snd_pmic_ops_nc.master_mute = UNMUTE;
snd_pmic_ops_nc.mute_status = UNMUTE; snd_pmic_ops_nc.mute_status = UNMUTE;
sst_sc_reg_access(sc_access, PMIC_WRITE, 26); sst_sc_reg_access(sc_access, PMIC_WRITE, 27);
pr_debug("init complete!!\n"); pr_debug("init complete!!\n");
return 0; return 0;
} }
...@@ -833,7 +834,7 @@ static int nc_set_selected_input_dev(u8 value) ...@@ -833,7 +834,7 @@ static int nc_set_selected_input_dev(u8 value)
pr_debug("Selecting AMIC\n"); pr_debug("Selecting AMIC\n");
sc_access[0].reg_addr = 0x107; sc_access[0].reg_addr = 0x107;
sc_access[0].value = 0x40; sc_access[0].value = 0x40;
sc_access[0].mask = MASK6|MASK4|MASK3|MASK1|MASK0; sc_access[0].mask = MASK6|MASK3|MASK1|MASK0;
sc_access[1].reg_addr = 0x10a; sc_access[1].reg_addr = 0x10a;
sc_access[1].value = 0x40; sc_access[1].value = 0x40;
sc_access[1].mask = MASK6; sc_access[1].mask = MASK6;
...@@ -848,9 +849,9 @@ static int nc_set_selected_input_dev(u8 value) ...@@ -848,9 +849,9 @@ static int nc_set_selected_input_dev(u8 value)
case HS_MIC: case HS_MIC:
pr_debug("Selecting HS_MIC\n"); pr_debug("Selecting HS_MIC\n");
sc_access[0].reg_addr = 0x107; sc_access[0].reg_addr = MICCTRL;
sc_access[0].mask = MASK6|MASK4|MASK3|MASK1|MASK0; sc_access[0].mask = MASK6|MASK3|MASK1|MASK0;
sc_access[0].value = 0x10; sc_access[0].value = 0x00;
sc_access[1].reg_addr = 0x109; sc_access[1].reg_addr = 0x109;
sc_access[1].mask = MASK6; sc_access[1].mask = MASK6;
sc_access[1].value = 0x40; sc_access[1].value = 0x40;
...@@ -860,19 +861,16 @@ static int nc_set_selected_input_dev(u8 value) ...@@ -860,19 +861,16 @@ static int nc_set_selected_input_dev(u8 value)
sc_access[3].reg_addr = 0x105; sc_access[3].reg_addr = 0x105;
sc_access[3].value = 0x40; sc_access[3].value = 0x40;
sc_access[3].mask = MASK6; sc_access[3].mask = MASK6;
sc_access[4].reg_addr = AUXDBNC; sc_access[4].reg_addr = ADCSAMPLERATE;
sc_access[4].mask = MASK7|MASK6|MASK5|MASK4|MASK3|MASK2|MASK1|MASK0; sc_access[4].mask = MASK7|MASK6|MASK5|MASK4|MASK3;
sc_access[4].value = 0xff; sc_access[4].value = 0xc8;
sc_access[5].reg_addr = ADCSAMPLERATE; num_val = 5;
sc_access[5].mask = MASK7|MASK6|MASK5|MASK4|MASK3;
sc_access[5].value = 0xc8;
num_val = 6;
break; break;
case DMIC: case DMIC:
pr_debug("DMIC\n"); pr_debug("DMIC\n");
sc_access[0].reg_addr = 0x107; sc_access[0].reg_addr = MICCTRL;
sc_access[0].mask = MASK6|MASK4|MASK3|MASK1|MASK0; sc_access[0].mask = MASK6|MASK3|MASK1|MASK0;
sc_access[0].value = 0x0B; sc_access[0].value = 0x0B;
sc_access[1].reg_addr = 0x105; sc_access[1].reg_addr = 0x105;
sc_access[1].value = 0x80; sc_access[1].value = 0x80;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment