ASoC: Intel: Skylake: Add enum control for mic selection
User may prefer to select data from particular mics. A mic-select module in DSP allows this selection. Create possible enum controls to allow user to select a combination of mics to capture data from. Based on the user selection, parameters are generated and passed to mic-select module during init. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -39,6 +39,11 @@
|
||||
#define MODULE_MAX_IN_PINS 8
|
||||
#define MODULE_MAX_OUT_PINS 8
|
||||
|
||||
#define SKL_MIC_CH_SUPPORT 4
|
||||
#define SKL_MIC_MAX_CH_SUPPORT 8
|
||||
#define SKL_DEFAULT_MIC_SEL_GAIN 0x3FF
|
||||
#define SKL_MIC_SEL_SWITCH 0x3
|
||||
|
||||
enum skl_channel_index {
|
||||
SKL_CHANNEL_LEFT = 0,
|
||||
SKL_CHANNEL_RIGHT = 1,
|
||||
@@ -309,6 +314,8 @@ struct skl_module_cfg {
|
||||
u8 dev_type;
|
||||
u8 dma_id;
|
||||
u8 time_slot;
|
||||
u8 dmic_ch_combo_index;
|
||||
u32 dmic_ch_type;
|
||||
u32 params_fixup;
|
||||
u32 converter;
|
||||
u32 vbus_id;
|
||||
@@ -342,6 +349,19 @@ struct skl_module_deferred_bind {
|
||||
struct list_head node;
|
||||
};
|
||||
|
||||
struct skl_mic_sel_config {
|
||||
u16 mic_switch;
|
||||
u16 flags;
|
||||
u16 blob[SKL_MIC_MAX_CH_SUPPORT][SKL_MIC_MAX_CH_SUPPORT];
|
||||
} __packed;
|
||||
|
||||
enum skl_channel {
|
||||
SKL_CH_MONO = 1,
|
||||
SKL_CH_STEREO = 2,
|
||||
SKL_CH_TRIO = 3,
|
||||
SKL_CH_QUATRO = 4,
|
||||
};
|
||||
|
||||
static inline struct skl *get_skl_ctx(struct device *dev)
|
||||
{
|
||||
struct hdac_ext_bus *ebus = dev_get_drvdata(dev);
|
||||
|
Reference in New Issue
Block a user