On Tue, 15 Jan 2019 08:43:40 +0100, Kailang wrote: > > > No, it not expected. > It will enter two times after boot ready. > I think it could add a flag in alc225_hp_init(). > To make sure it only excute one time. How do you think about? Where was it called, actually? The call of patch_ops.init is found in several places: once in snd_hda_codec_build_controls() just before creating controls (which is the boot time init), and at resume, alc269_resume(). And, as already explained, we have to call this at resume, because it's not guaranteed that it's been already called in the case of hibernation. thanks, Takashi > > -----Original Message----- > From: Takashi Iwai <tiwai@xxxxxxx> > Sent: Tuesday, January 15, 2019 2:37 PM > To: Kailang <kailang@xxxxxxxxxxx> > Cc: (alsa-devel@xxxxxxxxxxxxxxxx) <alsa-devel@xxxxxxxxxxxxxxxx> > Subject: Re: hp_pin was NULL value > > On Tue, 15 Jan 2019 03:31:33 +0100, > Kailang wrote: > > > > Hi Takashi, > > > > Could you receive this email? > > > > BR, > > Kailang > > > > -----Original Message----- > > From: Kailang > > Sent: Thursday, January 10, 2019 11:14 AM > > To: 'Takashi Iwai' <tiwai@xxxxxxx> > > Cc: (alsa-devel@xxxxxxxxxxxxxxxx) <alsa-devel@xxxxxxxxxxxxxxxx> > > Subject: RE: hp_pin was NULL value > > > > Hi Takashi, > > > > I simulate test your prefer function. > > I put alc225_hp_init() in alc225_init(). > > If system boot ready, I write 1 to power_save of /sys/module/.... > > The print message as below. It called two times until boot ready. > > If System enter to power save, play stream will wake up codec. It also call alc225_hp_init(). > > > > [ 21.497524] alc225_init hp_pin=0x21 > > [ 21.497526] alc225_hp_init-s hp=0x21 > > [ 22.140076] alc225_hp_init-e hp=0x21 > > [ 22.183496] snd_hda_codec_realtek hdaudioC0D2: Headset jack set to unplugged mode. > > [ 22.184681] snd_hda_codec_realtek hdaudioC0D2: Headset jack set to unplugged mode. > > [ 22.186846] alc225_shutup hp_pin=0x21 > > [ 22.187831] input: HDA Intel Line Out as /devices/pci0000:00/0000:00:1b.0/sound/card0/input5 > > [ 22.188055] input: HDA Intel Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input6 > > [ 22.205104] alc225_init hp_pin=0x21 > > [ 22.205108] alc225_hp_init-s hp=0x21 > > [ 22.852123] alc225_hp_init-e hp=0x21 > > [ 22.894772] snd_hda_codec_realtek hdaudioC0D2: Headset jack set to unplugged mode. > > ############ Boot ready ############## [ 116.832084] alc225_shutup > > hp_pin=0x21 ==> echo 1 to power_save > > [ 120.002582] alc225_init hp_pin=0x21 ==> play system sound > > [ 120.002586] alc225_hp_init-s hp=0x21 [ 120.644128] > > alc225_hp_init-e hp=0x21 > > It wasn't clear to me whether you meant this as a success or a failure... Did the patch work as expected, no? > > > thanks, > > Takashi > > ------Please consider the environment before printing this e-mail. > _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel