Re: auto_mute for early patch issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx) <tiwai@xxxxxxx>
Cc: (alsa-devel@xxxxxxxxxxxxxxxx) <alsa-devel@xxxxxxxxxxxxxxxx>
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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux