ASoC: Intel: Skylake: Strip T and L from TLV IPCs
[linux-2.6-block.git] / include / sound / madera-pdata.h
CommitLineData
2735b683
RF
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Platform data for Madera codec driver
4 *
5 * Copyright (C) 2016-2019 Cirrus Logic, Inc. and
6 * Cirrus Logic International Semiconductor Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef MADERA_CODEC_PDATA_H
14#define MADERA_CODEC_PDATA_H
15
16#include <linux/kernel.h>
17
18#define MADERA_MAX_INPUT 6
19#define MADERA_MAX_MUXED_CHANNELS 4
20#define MADERA_MAX_OUTPUT 6
21#define MADERA_MAX_AIF 4
22#define MADERA_MAX_PDM_SPK 2
23#define MADERA_MAX_DSP 7
24
25/**
26 * struct madera_codec_pdata
27 *
28 * @max_channels_clocked: Maximum number of channels that I2S clocks will be
29 * generated for. Useful when clock master for systems
30 * where the I2S bus has multiple data lines.
31 * @dmic_ref: Indicates how the MICBIAS pins have been externally
32 * connected to DMICs on each input. A value of 0
33 * indicates MICVDD and is the default. Other values are:
34 * For CS47L35 one of the CS47L35_DMIC_REF_xxx values
35 * For all other codecs one of the MADERA_DMIC_REF_xxx
36 * Also see the datasheet for a description of the
37 * INn_DMIC_SUP field.
38 * @inmode: Mode for the ADC inputs. One of the MADERA_INMODE_xxx
39 * values. Two-dimensional array
40 * [input_number][channel number], with four slots per
41 * input in the order
42 * [n][0]=INnAL [n][1]=INnAR [n][2]=INnBL [n][3]=INnBR
43 * @out_mono: For each output set the value to TRUE to indicate that
44 * the output is mono. [0]=OUT1, [1]=OUT2, ...
45 * @pdm_fmt: PDM speaker data format. See the PDM_SPKn_FMT field in
46 * the datasheet for a description of this value.
47 * @pdm_mute: PDM mute format. See the PDM_SPKn_CTRL_1 register
48 * in the datasheet for a description of this value.
49 */
50struct madera_codec_pdata {
51 u32 max_channels_clocked[MADERA_MAX_AIF];
52
53 u32 dmic_ref[MADERA_MAX_INPUT];
54
55 u32 inmode[MADERA_MAX_INPUT][MADERA_MAX_MUXED_CHANNELS];
56
57 bool out_mono[MADERA_MAX_OUTPUT];
58
59 u32 pdm_fmt[MADERA_MAX_PDM_SPK];
60 u32 pdm_mute[MADERA_MAX_PDM_SPK];
61};
62
63#endif