[alsa-devel] auto_mute for early patch issue
Kailang
kailang at realtek.com
Thu Jan 31 09:00:36 CET 2019
Hi Takashi,
I move check line to below. It will show value for hp_pins[0].
As I know, search from verb table in function snd_hda_parse_pin_defcfg().
It will fill pins at auto_pin_cfg.
Why it need to run below function to get cfg->hp_pins?
static int check_auto_mute_availability(struct hda_codec *codec)
{
struct hda_gen_spec *spec = codec->spec;
struct auto_pin_cfg *cfg = &spec->autocfg;
int present = 0;
int i, err;
- if (spec->suppress_auto_mute)
- return 0;
if (cfg->hp_pins[0])
present++;
if (cfg->line_out_pins[0])
present++;
if (cfg->speaker_pins[0])
present++;
if (present < 2) /* need two different output types */
return 0;
if (!cfg->speaker_pins[0] &&
cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) {
memcpy(cfg->speaker_pins, cfg->line_out_pins,
sizeof(cfg->speaker_pins));
cfg->speaker_outs = cfg->line_outs;
}
if (!cfg->hp_pins[0] &&
cfg->line_out_type == AUTO_PIN_HP_OUT) {
memcpy(cfg->hp_pins, cfg->line_out_pins,
sizeof(cfg->hp_pins));
cfg->hp_outs = cfg->line_outs;
}
+ if (spec->suppress_auto_mute)
+ return 0;
......
.....
......
}
BR,
Kailang
-----Original Message-----
From: Kailang
Sent: Thursday, January 31, 2019 12:08 PM
To: Takashi Iwai (tiwai at suse.de) <tiwai at suse.de>
Cc: (alsa-devel at alsa-project.org) <alsa-devel at alsa-project.org>
Subject: auto_mute for early patch issue
Hi Takashi,
Chrome OS use early patch firmware file to load model and use auto_mute =no hint options.
I find an issue for early patch issue about hint option auto_mute = no.
This will cause all spec->init_hook can't get hp_pin values.
For example: alc225_init() alc225_shutup() alc256_init() alc256_shutup() Early patch file hint auto_mute = no equal spec->suppress_auto_mute = 1 It will return function check_auto_mute_availability() in had_generic.c.
hp_pin = spec->gen.autocfg.hp_pins[0]; ==> It will get value 0.
I think this issue was for a long time.
Please see the attach dmesg. One is kill hint auto_mute option.
BR,
Kailang
More information about the Alsa-devel
mailing list