1cc8f70f5SDmitry Osipenko /* SPDX-License-Identifier: GPL-2.0-only */ 2cc8f70f5SDmitry Osipenko 3cc8f70f5SDmitry Osipenko #ifndef __TEGRA_ASOC_MACHINE_H__ 4cc8f70f5SDmitry Osipenko #define __TEGRA_ASOC_MACHINE_H__ 5cc8f70f5SDmitry Osipenko 6*8c1b3b15SDmitry Osipenko struct clk; 7cc8f70f5SDmitry Osipenko struct gpio_desc; 8cc8f70f5SDmitry Osipenko struct snd_soc_card; 9cc8f70f5SDmitry Osipenko struct snd_soc_jack; 10cc8f70f5SDmitry Osipenko struct platform_device; 11cc8f70f5SDmitry Osipenko struct snd_soc_jack_gpio; 12cc8f70f5SDmitry Osipenko struct snd_soc_pcm_runtime; 13cc8f70f5SDmitry Osipenko 14cc8f70f5SDmitry Osipenko struct tegra_asoc_data { 15cc8f70f5SDmitry Osipenko unsigned int (*mclk_rate)(unsigned int srate); 16cc8f70f5SDmitry Osipenko struct snd_soc_card *card; 17cc8f70f5SDmitry Osipenko unsigned int mclk_id; 18cc8f70f5SDmitry Osipenko bool hp_jack_gpio_active_low; 19cc8f70f5SDmitry Osipenko bool add_common_dapm_widgets; 20cc8f70f5SDmitry Osipenko bool add_common_controls; 21cc8f70f5SDmitry Osipenko bool add_common_snd_ops; 22cc8f70f5SDmitry Osipenko bool add_headset_jack; 23cc8f70f5SDmitry Osipenko bool add_mic_jack; 24cc8f70f5SDmitry Osipenko bool add_hp_jack; 25cc8f70f5SDmitry Osipenko bool set_ac97; 26cc8f70f5SDmitry Osipenko }; 27cc8f70f5SDmitry Osipenko 28cc8f70f5SDmitry Osipenko struct tegra_machine { 29*8c1b3b15SDmitry Osipenko struct clk *clk_pll_a_out0; 30*8c1b3b15SDmitry Osipenko struct clk *clk_pll_a; 31*8c1b3b15SDmitry Osipenko struct clk *clk_cdev1; 32*8c1b3b15SDmitry Osipenko unsigned int set_baseclock; 33*8c1b3b15SDmitry Osipenko unsigned int set_mclk; 34cc8f70f5SDmitry Osipenko const struct tegra_asoc_data *asoc; 35cc8f70f5SDmitry Osipenko struct gpio_desc *gpiod_ext_mic_en; 36cc8f70f5SDmitry Osipenko struct gpio_desc *gpiod_int_mic_en; 37cc8f70f5SDmitry Osipenko struct gpio_desc *gpiod_spkr_en; 38cc8f70f5SDmitry Osipenko struct gpio_desc *gpiod_mic_det; 39cc8f70f5SDmitry Osipenko struct gpio_desc *gpiod_ear_sel; 40cc8f70f5SDmitry Osipenko struct gpio_desc *gpiod_hp_mute; 41cc8f70f5SDmitry Osipenko struct gpio_desc *gpiod_hp_det; 42cc8f70f5SDmitry Osipenko struct snd_soc_jack *mic_jack; 43cc8f70f5SDmitry Osipenko struct snd_soc_jack_gpio *hp_jack_gpio; 44cc8f70f5SDmitry Osipenko }; 45cc8f70f5SDmitry Osipenko 46cc8f70f5SDmitry Osipenko int tegra_asoc_machine_probe(struct platform_device *pdev); 47cc8f70f5SDmitry Osipenko int tegra_asoc_machine_init(struct snd_soc_pcm_runtime *rtd); 48cc8f70f5SDmitry Osipenko 49cc8f70f5SDmitry Osipenko #endif 50