0001
0002
0003 #ifndef __TEGRA_ASOC_MACHINE_H__
0004 #define __TEGRA_ASOC_MACHINE_H__
0005
0006 struct clk;
0007 struct gpio_desc;
0008 struct snd_soc_card;
0009 struct snd_soc_jack;
0010 struct platform_device;
0011 struct snd_soc_jack_gpio;
0012 struct snd_soc_pcm_runtime;
0013
0014 struct tegra_asoc_data {
0015 unsigned int (*mclk_rate)(unsigned int srate);
0016 const char *codec_dev_name;
0017 const char *hp_jack_name;
0018 struct snd_soc_card *card;
0019 unsigned int mclk_id;
0020 bool hp_jack_gpio_active_low;
0021 bool add_common_dapm_widgets;
0022 bool add_common_controls;
0023 bool add_common_snd_ops;
0024 bool add_headset_jack;
0025 bool add_mic_jack;
0026 bool add_hp_jack;
0027 bool set_ac97;
0028 };
0029
0030 struct tegra_machine {
0031 struct clk *clk_pll_a_out0;
0032 struct clk *clk_pll_a;
0033 struct clk *clk_cdev1;
0034 unsigned int set_baseclock;
0035 unsigned int set_mclk;
0036 const struct tegra_asoc_data *asoc;
0037 struct gpio_desc *gpiod_ext_mic_en;
0038 struct gpio_desc *gpiod_int_mic_en;
0039 struct gpio_desc *gpiod_spkr_en;
0040 struct gpio_desc *gpiod_mic_det;
0041 struct gpio_desc *gpiod_ear_sel;
0042 struct gpio_desc *gpiod_hp_mute;
0043 struct gpio_desc *gpiod_hp_det;
0044 struct snd_soc_jack *mic_jack;
0045 struct snd_soc_jack_gpio *hp_jack_gpio;
0046 };
0047
0048 int tegra_asoc_machine_probe(struct platform_device *pdev);
0049 int tegra_asoc_machine_init(struct snd_soc_pcm_runtime *rtd);
0050
0051 #endif