1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-24 09:13:20 -05:00
linux/sound/soc/tegra/tegra_asoc_machine.h
Dmitry Osipenko de8fc2b0a3
ASoC: tegra: Restore AC97 support
The device-tree of AC97 codecs need to be parsed differently from I2S
codecs, plus codec device may need to be created. This was missed by the
patch that unified machine drivers into a single driver, fix it. It should
restore audio on Toradex Colibri board.

Cc: <stable@vger.kernel.org>
Fixes: cc8f70f560 ("ASoC: tegra: Unify ASoC machine drivers")
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20211024192853.21957-1-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-25 12:36:16 +01:00

50 lines
1.2 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __TEGRA_ASOC_MACHINE_H__
#define __TEGRA_ASOC_MACHINE_H__
struct clk;
struct gpio_desc;
struct snd_soc_card;
struct snd_soc_jack;
struct platform_device;
struct snd_soc_jack_gpio;
struct snd_soc_pcm_runtime;
struct tegra_asoc_data {
unsigned int (*mclk_rate)(unsigned int srate);
const char *codec_dev_name;
struct snd_soc_card *card;
unsigned int mclk_id;
bool hp_jack_gpio_active_low;
bool add_common_dapm_widgets;
bool add_common_controls;
bool add_common_snd_ops;
bool add_headset_jack;
bool add_mic_jack;
bool add_hp_jack;
bool set_ac97;
};
struct tegra_machine {
struct clk *clk_pll_a_out0;
struct clk *clk_pll_a;
struct clk *clk_cdev1;
unsigned int set_baseclock;
unsigned int set_mclk;
const struct tegra_asoc_data *asoc;
struct gpio_desc *gpiod_ext_mic_en;
struct gpio_desc *gpiod_int_mic_en;
struct gpio_desc *gpiod_spkr_en;
struct gpio_desc *gpiod_mic_det;
struct gpio_desc *gpiod_ear_sel;
struct gpio_desc *gpiod_hp_mute;
struct gpio_desc *gpiod_hp_det;
struct snd_soc_jack *mic_jack;
struct snd_soc_jack_gpio *hp_jack_gpio;
};
int tegra_asoc_machine_probe(struct platform_device *pdev);
int tegra_asoc_machine_init(struct snd_soc_pcm_runtime *rtd);
#endif