Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283835
b: refs/heads/master
c: cd1707a
h: refs/heads/master
i:
  283833: ceb4bf3
  283831: 54bcf92
v: v3
  • Loading branch information
Mark Brown committed Dec 1, 2011
1 parent 2d4a66e commit bec91eb
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 52ac7ab2475da2b577e4a4616c98b5d1fa3a3cfd
refs/heads/master: cd1707a99a2cb43cd8ab0c1952b455b218f15884
20 changes: 20 additions & 0 deletions trunk/include/linux/mfd/wm8994/pdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,23 @@ struct wm8958_enh_eq_cfg {
u16 regs[WM8958_ENH_EQ_REGS];
};

/**
* Microphone detection rates, used to tune response rates and power
* consumption for WM8958/WM1811 microphone detection.
*
* @sysclk: System clock rate to use this configuration for.
* @idle: True if this configuration should use when no accessory is detected,
* false otherwise.
* @start: Value for MICD_BIAS_START_TIME register field (not shifted).
* @rate: Value for MICD_RATE register field (not shifted).
*/
struct wm8958_micd_rate {
int sysclk;
bool idle;
int start;
int rate;
};

struct wm8994_pdata {
int gpio_base;

Expand Down Expand Up @@ -144,6 +161,9 @@ struct wm8994_pdata {
int num_enh_eq_cfgs;
struct wm8958_enh_eq_cfg *enh_eq_cfgs;

int num_micd_rates;
struct wm8958_micd_rate *micd_rates;

/* LINEOUT can be differential or single ended */
unsigned int lineout1_diff:1;
unsigned int lineout2_diff:1;
Expand Down
12 changes: 4 additions & 8 deletions trunk/sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@ static int wm8994_retune_mobile_base[] = {

static void wm8958_default_micdet(u16 status, void *data);

struct wm8958_micd_rate {
int sysclk;
bool idle;
int start;
int rate;
};

static const struct wm8958_micd_rate micdet_rates[] = {
{ 32768, true, 1, 4 },
{ 32768, false, 1, 1 },
Expand Down Expand Up @@ -100,7 +93,10 @@ static void wm8958_micd_set_rate(struct snd_soc_codec *codec)
else
sysclk = wm8994->aifclk[0];

if (wm8994->jackdet) {
if (wm8994->pdata && wm8994->pdata->micd_rates) {
rates = wm8994->pdata->micd_rates;
num_rates = wm8994->pdata->num_micd_rates;
} else if (wm8994->jackdet) {
rates = jackdet_rates;
num_rates = ARRAY_SIZE(jackdet_rates);
} else {
Expand Down

0 comments on commit bec91eb

Please sign in to comment.