ASoC: tegra: Restore headphones jack name on Nyan Big
commitdb635ba4fa
upstream. UCM of Acer Chromebook (Nyan) uses a different name for the headphones jack. The name was changed during unification of the machine drivers and UCM fails now to load because of that. Restore the old jack name. Cc: <stable@vger.kernel.org> Fixes:cc8f70f
("ASoC: tegra: Unify ASoC machine drivers") Reported-by: Thomas Graichen <thomas.graichen@gmail.com> # T124 Nyan Big Tested-by: Thomas Graichen <thomas.graichen@gmail.com> # T124 Nyan Big Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20211211231146.6137-2-digetx@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
f7fe9d3034
Коммит
6084a6c1ca
|
@ -124,10 +124,16 @@ int tegra_asoc_machine_init(struct snd_soc_pcm_runtime *rtd)
|
||||||
{
|
{
|
||||||
struct snd_soc_card *card = rtd->card;
|
struct snd_soc_card *card = rtd->card;
|
||||||
struct tegra_machine *machine = snd_soc_card_get_drvdata(card);
|
struct tegra_machine *machine = snd_soc_card_get_drvdata(card);
|
||||||
|
const char *jack_name;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (machine->gpiod_hp_det && machine->asoc->add_hp_jack) {
|
if (machine->gpiod_hp_det && machine->asoc->add_hp_jack) {
|
||||||
err = snd_soc_card_jack_new(card, "Headphones Jack",
|
if (machine->asoc->hp_jack_name)
|
||||||
|
jack_name = machine->asoc->hp_jack_name;
|
||||||
|
else
|
||||||
|
jack_name = "Headphones Jack";
|
||||||
|
|
||||||
|
err = snd_soc_card_jack_new(card, jack_name,
|
||||||
SND_JACK_HEADPHONE,
|
SND_JACK_HEADPHONE,
|
||||||
&tegra_machine_hp_jack,
|
&tegra_machine_hp_jack,
|
||||||
tegra_machine_hp_jack_pins,
|
tegra_machine_hp_jack_pins,
|
||||||
|
@ -660,6 +666,7 @@ static struct snd_soc_card snd_soc_tegra_max98090 = {
|
||||||
static const struct tegra_asoc_data tegra_max98090_data = {
|
static const struct tegra_asoc_data tegra_max98090_data = {
|
||||||
.mclk_rate = tegra_machine_mclk_rate_12mhz,
|
.mclk_rate = tegra_machine_mclk_rate_12mhz,
|
||||||
.card = &snd_soc_tegra_max98090,
|
.card = &snd_soc_tegra_max98090,
|
||||||
|
.hp_jack_name = "Headphones",
|
||||||
.add_common_dapm_widgets = true,
|
.add_common_dapm_widgets = true,
|
||||||
.add_common_controls = true,
|
.add_common_controls = true,
|
||||||
.add_common_snd_ops = true,
|
.add_common_snd_ops = true,
|
||||||
|
|
|
@ -14,6 +14,7 @@ struct snd_soc_pcm_runtime;
|
||||||
struct tegra_asoc_data {
|
struct tegra_asoc_data {
|
||||||
unsigned int (*mclk_rate)(unsigned int srate);
|
unsigned int (*mclk_rate)(unsigned int srate);
|
||||||
const char *codec_dev_name;
|
const char *codec_dev_name;
|
||||||
|
const char *hp_jack_name;
|
||||||
struct snd_soc_card *card;
|
struct snd_soc_card *card;
|
||||||
unsigned int mclk_id;
|
unsigned int mclk_id;
|
||||||
bool hp_jack_gpio_active_low;
|
bool hp_jack_gpio_active_low;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче