Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 216593
b: refs/heads/master
c: a4f28c0
h: refs/heads/master
i:
  216591: 573dac7
v: v3
  • Loading branch information
Mark Brown committed Sep 30, 2010
1 parent 9b34443 commit e383071
Show file tree
Hide file tree
Showing 3 changed files with 19 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: dee0bb9d0fef4535cc52df84b5165cbe2db383d7
refs/heads/master: a4f28c001d9fbe378852771c0734af4f7798d3c0
6 changes: 6 additions & 0 deletions trunk/include/sound/wm8962.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
struct wm8962_pdata {
u32 gpio_init[WM8962_MAX_GPIO];

/* Setup for microphone detection, raw value to be written to
* R48(0x30) - only microphone related bits will be updated.
* Detection may be enabled here for use with signals brought
* out on the GPIOs. */
u32 mic_cfg;

bool irq_active_low;

bool spk_mono; /* Speaker outputs tied together as mono */
Expand Down
12 changes: 12 additions & 0 deletions trunk/sound/soc/codecs/wm8962.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,8 @@ SND_SOC_DAPM_INPUT("IN4L"),
SND_SOC_DAPM_INPUT("IN4R"),
SND_SOC_DAPM_INPUT("Beep"),

SND_SOC_DAPM_MICBIAS("MICBIAS", WM8962_PWR_MGMT_1, 1, 0),

SND_SOC_DAPM_SUPPLY("Class G", WM8962_CHARGE_PUMP_B, 0, 1, NULL, 0),
SND_SOC_DAPM_SUPPLY("SYSCLK", WM8962_CLOCKING2, 5, 0, sysclk_event,
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
Expand Down Expand Up @@ -1755,6 +1757,16 @@ static int wm8962_probe(struct snd_soc_codec *codec)
if (pdata->spk_mono)
wm8962->reg_cache[WM8962_CLASS_D_CONTROL_2]
|= WM8962_SPK_MONO;

/* Micbias setup, detection enable and detection
* threasholds. */
if (pdata->mic_cfg)
snd_soc_update_bits(codec, WM8962_ADDITIONAL_CONTROL_4,
WM8962_MICDET_ENA |
WM8962_MICDET_THR_MASK |
WM8962_MICSHORT_THR_MASK |
WM8962_MICBIAS_LVL,
pdata->mic_cfg);
}

/* Latch volume update bits */
Expand Down

0 comments on commit e383071

Please sign in to comment.