162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Platform data for MAX98095 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright 2011 Maxim Integrated Products 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#ifndef __SOUND_MAX98095_PDATA_H__ 962306a36Sopenharmony_ci#define __SOUND_MAX98095_PDATA_H__ 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci/* Equalizer filter response configuration */ 1262306a36Sopenharmony_cistruct max98095_eq_cfg { 1362306a36Sopenharmony_ci const char *name; 1462306a36Sopenharmony_ci unsigned int rate; 1562306a36Sopenharmony_ci u16 band1[5]; 1662306a36Sopenharmony_ci u16 band2[5]; 1762306a36Sopenharmony_ci u16 band3[5]; 1862306a36Sopenharmony_ci u16 band4[5]; 1962306a36Sopenharmony_ci u16 band5[5]; 2062306a36Sopenharmony_ci}; 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci/* Biquad filter response configuration */ 2362306a36Sopenharmony_cistruct max98095_biquad_cfg { 2462306a36Sopenharmony_ci const char *name; 2562306a36Sopenharmony_ci unsigned int rate; 2662306a36Sopenharmony_ci u16 band1[5]; 2762306a36Sopenharmony_ci u16 band2[5]; 2862306a36Sopenharmony_ci}; 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci/* codec platform data */ 3162306a36Sopenharmony_cistruct max98095_pdata { 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci /* Equalizers for DAI1 and DAI2 */ 3462306a36Sopenharmony_ci struct max98095_eq_cfg *eq_cfg; 3562306a36Sopenharmony_ci unsigned int eq_cfgcnt; 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci /* Biquad filter for DAI1 and DAI2 */ 3862306a36Sopenharmony_ci struct max98095_biquad_cfg *bq_cfg; 3962306a36Sopenharmony_ci unsigned int bq_cfgcnt; 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci /* Analog/digital microphone configuration: 4262306a36Sopenharmony_ci * 0 = analog microphone input (normal setting) 4362306a36Sopenharmony_ci * 1 = digital microphone input 4462306a36Sopenharmony_ci */ 4562306a36Sopenharmony_ci unsigned int digmic_left_mode:1; 4662306a36Sopenharmony_ci unsigned int digmic_right_mode:1; 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci /* Pin5 is the mechanical method of sensing jack insertion 4962306a36Sopenharmony_ci * but it is something that might not be supported. 5062306a36Sopenharmony_ci * 0 = PIN5 not supported 5162306a36Sopenharmony_ci * 1 = PIN5 supported 5262306a36Sopenharmony_ci */ 5362306a36Sopenharmony_ci unsigned int jack_detect_pin5en:1; 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci /* Slew amount for jack detection. Calculated as 4 * (delay + 1). 5662306a36Sopenharmony_ci * Default delay is 24 to get a time of 100ms. 5762306a36Sopenharmony_ci */ 5862306a36Sopenharmony_ci unsigned int jack_detect_delay; 5962306a36Sopenharmony_ci}; 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ci#endif 62