brintos

brintos / linux-shallow public Read only

0
0
Text · 1.9 KiB · 58398d8 Raw
60 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/*3 * Platform data for Madera codec driver4 *5 * Copyright (C) 2016-2019 Cirrus Logic, Inc. and6 *                         Cirrus Logic International Semiconductor Ltd.7 */8 9#ifndef MADERA_CODEC_PDATA_H10#define MADERA_CODEC_PDATA_H11 12#include <linux/types.h>13 14#define MADERA_MAX_INPUT		615#define MADERA_MAX_MUXED_CHANNELS	416#define MADERA_MAX_OUTPUT		617#define MADERA_MAX_AIF			418#define MADERA_MAX_PDM_SPK		219#define MADERA_MAX_DSP			720 21/**22 * struct madera_codec_pdata23 *24 * @max_channels_clocked: Maximum number of channels that I2S clocks will be25 *			  generated for. Useful when clock master for systems26 *			  where the I2S bus has multiple data lines.27 * @dmic_ref:		  Indicates how the MICBIAS pins have been externally28 *			  connected to DMICs on each input. A value of 029 *			  indicates MICVDD and is the default. Other values are:30 *			  For CS47L35 one of the CS47L35_DMIC_REF_xxx values31 *			  For all other codecs one of the MADERA_DMIC_REF_xxx32 *			  Also see the datasheet for a description of the33 *			  INn_DMIC_SUP field.34 * @inmode:		  Mode for the ADC inputs. One of the MADERA_INMODE_xxx35 *			  values. Two-dimensional array36 *			  [input_number][channel number], with four slots per37 *			  input in the order38 *			  [n][0]=INnAL [n][1]=INnAR [n][2]=INnBL [n][3]=INnBR39 * @out_mono:		  For each output set the value to TRUE to indicate that40 *			  the output is mono. [0]=OUT1, [1]=OUT2, ...41 * @pdm_fmt:		  PDM speaker data format. See the PDM_SPKn_FMT field in42 *			  the datasheet for a description of this value.43 * @pdm_mute:		  PDM mute format. See the PDM_SPKn_CTRL_1 register44 *			  in the datasheet for a description of this value.45 */46struct madera_codec_pdata {47	u32 max_channels_clocked[MADERA_MAX_AIF];48 49	u32 dmic_ref[MADERA_MAX_INPUT];50 51	u32 inmode[MADERA_MAX_INPUT][MADERA_MAX_MUXED_CHANNELS];52 53	bool out_mono[MADERA_MAX_OUTPUT];54 55	u32 pdm_fmt[MADERA_MAX_PDM_SPK];56	u32 pdm_mute[MADERA_MAX_PDM_SPK];57};58 59#endif60