Skip to content

Commit

Permalink
ASoC: Update WM5100 accessory detection for revision A
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
broonie committed Oct 13, 2011
1 parent 7c04241 commit 1cba77c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/codecs/wm5100.c
Original file line number Diff line number Diff line change
Expand Up @@ -2132,6 +2132,9 @@ static void wm5100_set_detect_mode(struct snd_soc_codec *codec, int the_mode)
WM5100_ACCDET_SRC,
(mode->bias << WM5100_ACCDET_BIAS_SRC_SHIFT) |
mode->micd_src << WM5100_ACCDET_SRC_SHIFT);
snd_soc_update_bits(codec, WM5100_MISC_CONTROL,
WM5100_HPCOM_SRC,
mode->micd_src << WM5100_HPCOM_SRC_SHIFT);

wm5100->jack_mode = the_mode;

Expand Down
7 changes: 7 additions & 0 deletions sound/soc/codecs/wm5100.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ int wm5100_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack);
#define WM5100_MIC_DETECT_1 0x290
#define WM5100_MIC_DETECT_2 0x291
#define WM5100_MIC_DETECT_3 0x292
#define WM5100_MISC_CONTROL 0x2BB
#define WM5100_INPUT_ENABLES 0x301
#define WM5100_INPUT_ENABLES_STATUS 0x302
#define WM5100_IN1L_CONTROL 0x310
Expand Down Expand Up @@ -1388,6 +1389,12 @@ int wm5100_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack);
#define WM5100_ACCDET_STS_SHIFT 0 /* ACCDET_STS */
#define WM5100_ACCDET_STS_WIDTH 1 /* ACCDET_STS */

/*
* R699 (0x2BB) - Misc Control
*/
#define WM5100_HPCOM_SRC 0x200 /* HPCOM_SRC */
#define WM5100_HPCOM_SRC_SHIFT 9 /* HPCOM_SRC */

/*
* R769 (0x301) - Input Enables
*/
Expand Down

0 comments on commit 1cba77c

Please sign in to comment.