mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 18:26:43 +07:00
821edd2fb5
The WM8958 contains an advanced accessory detection feature which allows detection of up to seven different impedence levels on the microphone bias output, including detection of video outputs. Since some of the more involved accessory interfaces may involve noticable interactions with external components a simple detection scheme is provided by default with the option to provide custom handling of accessory detect. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
48 lines
1.3 KiB
C
48 lines
1.3 KiB
C
/*
|
|
* wm8994.h -- WM8994 Soc Audio driver
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef _WM8994_H
|
|
#define _WM8994_H
|
|
|
|
#include <sound/soc.h>
|
|
|
|
/* Sources for AIF1/2 SYSCLK - use with set_dai_sysclk() */
|
|
#define WM8994_SYSCLK_MCLK1 1
|
|
#define WM8994_SYSCLK_MCLK2 2
|
|
#define WM8994_SYSCLK_FLL1 3
|
|
#define WM8994_SYSCLK_FLL2 4
|
|
|
|
/* OPCLK is also configured with set_dai_sysclk, specify division*10 as rate. */
|
|
#define WM8994_SYSCLK_OPCLK 5
|
|
|
|
#define WM8994_FLL1 1
|
|
#define WM8994_FLL2 2
|
|
|
|
#define WM8994_FLL_SRC_MCLK1 1
|
|
#define WM8994_FLL_SRC_MCLK2 2
|
|
#define WM8994_FLL_SRC_LRCLK 3
|
|
#define WM8994_FLL_SRC_BCLK 4
|
|
|
|
typedef void (*wm8958_micdet_cb)(u16 status, void *data);
|
|
|
|
int wm8994_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
|
|
int micbias, int det, int shrt);
|
|
int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
|
|
wm8958_micdet_cb cb, void *cb_data);
|
|
|
|
#define WM8994_CACHE_SIZE 1570
|
|
|
|
struct wm8994_access_mask {
|
|
unsigned short readable; /* Mask of readable bits */
|
|
unsigned short writable; /* Mask of writable bits */
|
|
};
|
|
|
|
extern const struct wm8994_access_mask wm8994_access_masks[WM8994_CACHE_SIZE];
|
|
|
|
#endif
|