Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249431
b: refs/heads/master
c: 59bd2ab
h: refs/heads/master
i:
  249429: 2efb1a6
  249427: f0aef58
  249423: f968eb5
v: v3
  • Loading branch information
xingchao authored and Greg Kroah-Hartman committed May 10, 2011
1 parent 25bfcaa commit 14e6fc7
Show file tree
Hide file tree
Showing 2 changed files with 16 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: 26d3b2d97300735c53ae2ad0f646e3db79eda45f
refs/heads/master: 59bd2abe0739548eee4c82ab52edcc9ae7e9969b
15 changes: 15 additions & 0 deletions trunk/drivers/staging/intel_sst/intelmid_v2_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,19 @@ static int nc_get_vol(int dev_id, int *value)
return retval;
}

static void hp_automute(enum snd_jack_types type, int present)
{
u8 in = DMIC;
u8 out = INTERNAL_SPKR;
if (present) {
if (type == SND_JACK_HEADSET)
in = HS_MIC;
out = STEREO_HEADPHONE;
}
nc_set_selected_input_dev(in);
nc_set_selected_output_dev(out);
}

static void nc_pmic_irq_cb(void *cb_data, u8 intsts)
{
u8 value = 0;
Expand All @@ -1015,6 +1028,7 @@ static void nc_pmic_irq_cb(void *cb_data, u8 intsts)
present = (value == 0x1) ? 1 : 0;
jack_event_flag = 1;
mjack->jack.type = SND_JACK_HEADSET;
hp_automute(SND_JACK_HEADSET, present);
}

if (intsts & 0x2) {
Expand All @@ -1023,6 +1037,7 @@ static void nc_pmic_irq_cb(void *cb_data, u8 intsts)
present = (value == 0x2) ? 1 : 0;
jack_event_flag = 1;
mjack->jack.type = SND_JACK_HEADPHONE;
hp_automute(SND_JACK_HEADPHONE, present);
}

if (intsts & 0x4) {
Expand Down

0 comments on commit 14e6fc7

Please sign in to comment.